background image

Summary of Contents for KM-488-DD

Page 1: ...KM 4881DD IEEE 488 Interface Board Keifhley MetraByte Corporation A Subsidiary of Keithle Instruments Inc 440 Myles Jandish Boulevard Taunton Massachusetts 02780...

Page 2: ......

Page 3: ...wise without the express prior written permission of I RYetra elthley ing Byte Corporation Information furnished by Keithley MetraByte Corporation is believed to be accurate and reliable However no re...

Page 4: ...es not cause harmful interference to radio jr television reception which can be determined by turning the equipment ff and on the user is encouraged to try to correct the interference by one or nore o...

Page 5: ...2 10 Part 2 Initial Software Installation and Configuration 2 5 Initial Software Installation and Configuration 2 12 Part 3 Driver Installation 2 6 Loading the KM 488 DD Driver from AUTOEXEC BAT 2 24...

Page 6: ...ile Description Format 5 l I O Commands 5 2 CHAPTER 6 INTRODUCTION TO PROGRAMMING VIA THE CALL INTERFACE 6 1 Accessing the Call Interface 6 l 6 2 GPIB Terminators 6 2 6 3 KCONFIG 6 3 6 4 Clear Devices...

Page 7: ...3 CHAPTER 12 WARRANTY INFORMATION 12 l 12 1 12 2 Warranty 12 l Return to Factory Information 12 l APPENDIX A ASCII EQUIVALENCE CHART APPENDIX B IEEE 488 TUTORIAL APPENDIX C IEEE MULTILINE COMMANDS AP...

Page 8: ...DD Block Diagram l 2 File I O Interface Direct Path l 4 Figure l 3 File I O Interface Direct Output Figure l 4 Input Path l 5 File I O Commands Buffered Output Path l 6 Figure l 5 Call Interface Path...

Page 9: ...t State Generator to adjust the bus timing This allows the KM 488 DD to perform within the operating specifications of the GPIB controller chip even on the fastest 386 or 486 based PC s The KM 488 DD...

Page 10: ...CALL interface and the FILE interface is a matter of personal preference Programmers familiar with using file I O Opening files and transferring data between the program and files may be more comfort...

Page 11: ...ake the form of character strings which are written to the driver output file opened through DOS Groups of commands and also data may be placed in one string but the maximum string length is 255 chara...

Page 12: ...rom the GPIB bus In either case the data is buffered in the driver awaiting an INPUT action To bring the data into the application program the program does an input from the file that was opened for d...

Page 13: ...set up the data will move directly between the program memory and the GPIB bus via the KM 488 DD s hardware Figure 1 4 illustrates the case of data send A data entry would appear similar with the dat...

Page 14: ...tack for use by the driver and the program enters the code of the interface module as diagrammed in Figure 1 5 The interface module for the particular language verifies that the driver is installed an...

Page 15: ...488 DD are as follows Dimensions One Short PC Slot size Weight 29 lb Data Transfer Rate 300 KB per second IEEE Controller Chip NEC D7210 Power Consumption 650 mA Operating Temperature O to50 C Storage...

Page 16: ...22El H42El or H62El Switch Selectable Channels 1 2 or 3 shareable Switch Selectable Levels 2 through 7 SHl AHI T6 TEO L4 LEO SRI Pl O RLO DCl DTl CO El 12 Controller Subsets Cl C2 C3 C4 and Cl0 Termin...

Page 17: ...with the GLIB protocol Chapter 2 Installation and Configuration provides all the necessary information for you to get the KM 488 DD up and running It details how to unpack inspect and install the KM 4...

Page 18: ...I Equivalence Chart This gives hexadecimal and decimal equivalents for the ASCII 128 Char acter Set Appendix B is an IEEE 488 tutorial Appendices C and D contain supplementary information to the IEEE...

Page 19: ...e KM 488 DD software Par 3 Driver insfallafion Once you have configured the software you will need to load the driver software before you can use the KM 488 DD This section describes how to load the d...

Page 20: ...lling multiple KM 488 DD s in the same GPIB system be sure to read Section 2 4 Multiple Board Installation Notes 2 1 UNPACKlNG AND INSPECTION Confirm that each item on the packing list has been shippe...

Page 21: ...e used The single jumper is used to select the source of the master clock signal The default switch and jumper selections are listed in Table 2 1 Figure 2 l Location of Iumpers and Switches A program...

Page 22: ...ddress Switch Remember to record your switch selections on the GPIB System Configuration Worksheet found in the rear of this manual The Base Address Switch 611 is a 7 slide DIP switch When a rocker is...

Page 23: ...e addresses in hex are 02E1 22E1 42El and 62E1 The default base address is 02El To select another base address move the switches to the positions Tib Qj shown in Figure 2 4 ot Et irzFml Figure 2 4 Bas...

Page 24: ...ect the Interrupt Level DMA Level and the Clock Source Remember to record your jumper selections on the GPIB System Configuration Worksheet found in the rear of this manual lnferrupf Level If you are...

Page 25: ...data quickly from to a peripheral to the computer The PC has four DMA channels of which one or three may be selected However based on your system configuration they may not all be available Select an...

Page 26: ...may be required by certain third party software uackatxes 2 3 BOARDlNSTALL4TlON This section provides general instructions for installing the KM 488 DD Board in an IBM PC XT AT 286 386 or compatible...

Page 27: ...rt of the PC AT cabinet This will safely discharge any static electricity which has built up in your body Unwrap the KM 488 DD from the anti static bag If you haven t already done so set the switches...

Page 28: ...TION NOTES When installing multiple KM 488 DD in the same GPIB system be sure to Assign a different Base Address to each KM 488 DD Assign a different Interrupt Level to each KM 488 DD if required by y...

Page 29: ...le Also know which language s you will be developing your programs in Do you wont fo be able fo refer to example programs A full selection of exam ple programs for each language and programming style...

Page 30: ...sk In most instances this will be disk drive A or B Thus at the DOS prompt type A for the A drive or B for the B drive Now type SETUP The SETUP program will now run This program allows you to copy the...

Page 31: ...ch you are going to develop your application programs in Choice of lan guages include C Microsoft PASCAL TURBO PASCAL BASICA and QuickBASIC Any combination of languages may be chosen You must indicate...

Page 32: ...o copy the C support files and the example programs the tree structure that would be created would look like this At this time you will also need to indicate whether or not you want the Example Progra...

Page 33: ...Y and follow the instructions Once the disk copying process has been completed SETUP will advance to the Device Configuration Screen Figure 2 12 DeviceConfiguration Screen In this part of the initial...

Page 34: ...ide of the work sheet Once you have completed your System Configuration you will need to save the parameters to the CONFIG DAT file This file is read into the KM 488 DD driver The CONFIG DAT file is d...

Page 35: ...can be assigned any one of four base addresses 02El hex 22El hex 42El hex and 62El hex The default base address is 02El hex To select a different base address Press Ito move to the CPU Base Address o...

Page 36: ...s a master clock signal This clock is normally connected to an on board 8 MHz clock oscillator You can however elect to drive this circuitry from the PC s clock The actual clock speed will vary accord...

Page 37: ...river then replaces these EOL terminators with a GPIB Bus Terminator sequence when communicating with the GPIB bus devices m ws are only used bv the File I O Commands SeeChapter 3 for more information...

Page 38: ...d from the KM 488 DD driver to the GPIB bus This terminator sequence ls com prised of one or two ASCII characters and may include an asserted GPIB EOI signal Any combination of ASCII characters and EO...

Page 39: ...dress enter each digit separately Then press m GPUIBUS Termhafon As explained above the BUS Input Terminator sequence marks the end of data transferred from the GPIB bus to the KM 488 DD driver This t...

Page 40: ...minator character sent The Bus Output Terminator Sequence is selected in the same manner as the Bus Input Terminator Sequence 5 Suvhg Your Configuration fcmxneters to CONf G DAT When you have checked...

Page 41: ...ation file CONFIG DAT which was created when the SETUP program was run The CONFIG DAT file is re generated every time the CON FIG EXE program is run or may be modified manually The CONFIG DAT program...

Page 42: ...rom AUTOEXECBAT When you load the driver via the AUTOEXECBAT file your files will remain loaded until you shut down the computer or manually unload the drivers from DOS Seesection 2 9 Note however tha...

Page 43: ...KM driver Addtheline D PATH KM D PATH FILE EXT Where D l is an optional parameter which indicates the DOS drive where KM EXE or FILE EXT exists You must only include this if the corresponding file is...

Page 44: ...an optional parameter which indicates the DOS drive where VI EXE or VIPARSE EXE ls installed You must only include this if the VI driver is not installed in the current directory PATE is an optional p...

Page 45: ...esponding file is not installed in the current directory Instructs DOS to pipe the contents of FILE EXT into KM at load time FILE EXT is the name of the configuration file to be piped into the KM 488...

Page 46: ...ia your AUTOEXECBAT file Seesection 2 8 To recon figure the software 1 2 3 4 Switch to the directory where the KM 488DD software is loaded At the DDS prompt type CONFIG Load the existing software conf...

Page 47: ...equired it is wasting computer memory DOS is optimized at power up through entries in the CONFZG SYSfile The entry which controls the number of files which can be opened is FILES n where n is some num...

Page 48: ...driver The driver recognizes this as a command places the copyright message followed by a carriage return line feed in a driver buffer associated with the device IEEE The DOS TYPE command reads the me...

Page 49: ...mand recognizes CTRL Z to mean that there is no more data and returns to the DOS prompt Note there is a blank line between message and the prompt because of the addition of the CR LF appended to the m...

Page 50: ...e two types of GPIB BUS Terminators Input and Output The GPIB BUS Output Terminator sequence delimits the data transferred from the KM 488 DD driver to the GPIB bus This terminator sequence is compris...

Page 51: ...may include detection of an EOI signal Any combination of ASCII characters and EOI may be selected including EOI alone If Qnly EOI is chosen to signal the end of input data then all the characters rec...

Page 52: ...pieces and because different GPIB devices use different GPIB terminators there will be cases where it will be necessary or desirable to change the GPIB terminators within a pro gram The OUTPUT comman...

Page 53: ...a CLEAR command If the clear command contains addresses then only those devices are cleared by means of the addressed GPIB selected device clear If no addresses are sent then all the GLIB bus devices...

Page 54: ...e background At some point the application program should use the WAIT command to verify that transfer is complete Because their data does not have to pass through XX buffered transfers are generally...

Page 55: ...HO TIMEOUT 8 6 IEEE followed by Enter The timeout can be disabled by sending 0 for the timeout value but this is not recom mended The timeout should be long enough so that a data transfer can complete...

Page 56: ...oll mechanism To eliminate the need for the controller to SPOLL a device when no change of status has occurred many devices can assert an SRQ service request line on a status change In this way the co...

Page 57: ...or another command 3 12 LIGHTPEN INTERRUPTS The KM 488DD board is capable of being configured to generate hardware interrupts on receipt of an SRQ the KM 488 DD driver does not support hardware interr...

Page 58: ...e device s which a parallel poll has revealed needed servicing This is to obtain more complete status information and to cause the device to unassert its SRQ and parallel responses The following monit...

Page 59: ...l response which can be read by a controller in charge The seventh bit when set is reserved to generate an SRQ when desired The significance of the other bits would be defined by the application An SR...

Page 60: ...followedbyIEnter TYPE IEEE 64 will be returned The P returned by STATUS verifies the KM 488 DD is a peripheral and the I indicates that it is in an idle state not addressed to talk or listen Sending...

Page 61: ...number of file handles Usually the number of files available for a program is small i e GW BASIC Version 3 2 allows two user files This is because BASIC needs at least three file handles just to suppo...

Page 62: ...pened properly the BASICA PRINT or INPUT command is used to pass through the File I O Command and communi cate with the KM 488 DD board The PRINT command is used to pass commands to the KM 488 DD and...

Page 63: ...DEF SEG command to define the code segment The particular place for a specific CALL to jump within the driver is defined by an offset from the beginning address The following code segment illustrates...

Page 64: ...ortant to note that BASIC is limited to a single 64K segment of data This data space ls shared by all data items arrays strings vari ables and the names and internal descriptors used by BASIC to manag...

Page 65: ...NT PACK BYTBS and UNPACK BYTES routines Syntax CODE ADDRESS Parameters None Returns An integer from 0 to 65535 which represents the segment address Programming 1 This routine is useful when defining t...

Page 66: ...of the BASIC variable space Offset 0 Syntax CALL GET SEGMENT dataseg Parameters None Returns dataseg is an integer variable which is set to the data space segment value Programming This routine ls us...

Page 67: ...Programming Guide Using the File I O Commands IOCTL Purpose When followed by BREAK it resets the KM 488 DD and its EOL terminators to their defaults Syntax IOCTL 2 BBBAK Returns None Programming None...

Page 68: ...en executed this routine returns one of the following values into the A variable 0 This indicates that the KM 488 DD is ready to receive a com mand 1 This indicates that the KM 488 DD has data availab...

Page 69: ...bit data value Syntax CALL PACK BYTES source O dest O count Ottset 5 Parameters source is the name of the integer array which contains the data to be con verted dest is the name of the integer array i...

Page 70: ...form a byte swap when exchanging data between the KM 488 DD and various IEEE 488 bus device Byte Swaps are necessary because the KM 488 DD stores integer vari ables as two consecutive bytes The lower...

Page 71: ...est to count source is the name of the integer array which contains the data to be con verted dest is the name of the integer array in which the converted data is to be stored count is an integer whic...

Page 72: ...easons First the QLB file contains KUNPACK KSWAP and KNACK routines for manipulating byte data stored within integer BASIC arrays Secondly KM488QB4 QLB contains the function SSEGADD which is intrinsic...

Page 73: ...IN4 IEEEOLJT4 Once the files have been opened properly the BASICA PRINT or INPUT command is used to pass through the File I O Command and communi cate with the KM 488 DD board The PRINT command is use...

Page 74: ...rray to consecutive 16 bit integers KSWAP BYVAL array 0 count This swaps the high and low bytes stored in the integer array Buffered Transfers Buffered transfers are normally used to send large amount...

Page 75: ...In Microsoft PASCAL File I O to and from the KM 488 DD driver ls accomplished via the intrinsic PASCAL type TEXT This type of file han dle allows files opened for input and output at the same time Re...

Page 76: ...ram These include IEEEWrite Write a command string to the selected KM 488 DD device IEEEReadStz Read data from the KM 48 DD driver into a STRING IEEEReadIntO Read an integer from the KM 488 DD driver...

Page 77: ...or by using the IEEEWrite procedure provided in the KMPASIOUB library Direct command writes appear in the following fashion WRITELN IEEE SELLO Rewrite IEEE Rewind after write The following is an exam...

Page 78: ...ation instructs the PASCAL compiler to pass these arguments by reference rather than by value Passing variables by reference passes the address of a variable rather than the contents of that variable...

Page 79: ...and is issued as follows IOCTL IEEE The maximum allowable string length for a command string writ ten to any of the KM 488 DD devices is 256 characters including the two character EOL sequence Any com...

Page 80: ...of the example programs used the CRT and DOS units supplied with TURBO PASCAL Users of version 4 0 of TURBO PASCAL should USES the unit IEEEIOV4 TPU rather than ieeeio tpuwhich is intended for users...

Page 81: ...i command assigns each device to a variable of type TEXT This is accomplished in the IEEEIO TPU unit in the following manner VAR IEEEIn IEEEOut TEXT KM 488 DD Device Eandle Variables BEGIN MAIN BEGIN...

Page 82: ...the following manner WRITELN IEEEChzt EELLO If a syntax error or GPIB bus error occurs as a result of writing a command to the KM 48 DD device the error will appear in the global TURBO PASCAL variabl...

Page 83: ...f Line terminator for PASCAL is the Carriage Return Line Feed combination The is the default for the KM 48 DD driver and should not be changed unless you are running other application programs requiri...

Page 84: ...EEWrito IEEE SEWD LISTEN 10 IEEEWrite IEEE SEND DATA 1 IEEEWrite IEEE SEND DATA 2 IEEEWrito IEEE SEWD DATA 3 IEEEWtite IEEE SEWD DATA 4I Consult the provided example programs fro further details about...

Page 85: ...our application should contain the line include ieeeio h instructing the C compiler to include the file 1EEEIO H which contains various definitions pertaining to the functions and variables in the 1EE...

Page 86: ...IEEEIOC several functions have been supplied to facilitate the handling of the KM 488 DD s devices including the function ieeei nit which opens the IEEE device via a UNIX style integer handle ieeeinit...

Page 87: ...ment value of a pointer Returns Offset value of a pointer Reads from specified IEEE device Writes to specified IEEE device Does nothing just returns false 0 Does nothing Checks if Light Pen interrupt...

Page 88: ...Likewise there are numerous ways of reading data from the KM 488 DD driver via the IEEE IEEEIN and IEEEOUT devices They include the Intrinsic C functions using the FILE style device handle fread Intr...

Page 89: ...to reset the default terminators to your needs Notice that the ieeeinit function in the IEEEIOC module performs this task automatically for you by setting the default input terminator to the NULL 0 ch...

Page 90: ...e broken up into several commands each of which is issued separately For example a lengthy SEND command can be sent as repeated smaller SEND commands ieeewt IR EE SEND DNT UNL MTA LISTEN 10 DATA 1 2 3...

Page 91: ...r perform a syntax and argument type check during the compile process File or device style I O to and from the KM 488 DD driver is accom plished either via a device handle of type FILE as defined in t...

Page 92: ...nto raw mode No Carriage Return Line Feed Translation is performed as characters are passed through DO 3 en route to your program from the KM 488 DD driver issues the IOCTL BREAK command to reset the...

Page 93: ...transfer to Binary Initializes KM 488 Special printff Special scanffl Once you have successfully opened or fopened the IEEE device for reading and writing you can then send commands to the driver and...

Page 94: ...ice handle fread Intrinsic C buffered file read fgets 0 Intrinsic C file gets0 fgetchar Intrinsic C file getchar0 fgeto Intrinsic C file getc fFlcanf Intrinsic C file scanf The intrinsic C functions u...

Page 95: ...ally for you by setting the default input termina tor to the NULL 0 character and the default output terminator sequence to Line Feed OxA 3 It is often necessary to provide the KM 488 DD driver with a...

Page 96: ...ral commands each of which is issued separately For example a lengthy SEND command can be sent as repeated smaller SEND commands ieeewt IEEE SEND UNT UNL MTA LISTEiN 10 DATA 1 2 3 4 is equivalent to i...

Page 97: ...ypeface Square Brackets f I 1enclose a list of optional parameters You may select any combination of these options as described in the command specific parameters section Parameters This section descr...

Page 98: ...ars designated deviccW Returns a memory segment address Alters drwer parameters Disables a lIghtpen Interrupt co dltionW Deftne DMA transfer mode Read data from a bus device Sets the EOL terminators 3...

Page 99: ...s devices Table5 1 List KM DD MODE BUS ACTION I A Y _ A Y A Y System Gmtrolln Active Controller Unasserts REM I TCt TN the UNL MTA LAG Actlve Controller Asserts A fN then LLO Active Controller Ue I O...

Page 100: ...tem Controller Assert REN t 8n pHonally addresses them to System Controller and Assert RRN then ATN and UNL Active Controller MTA wtth addreeaks LAG EQUEST Defines own Serial Poll Response Peripheral...

Page 101: ...ommands COMMAND NAME DESCRIPTION KM4S DD MODE BUS ACTION TBRM Sets the GPIB bus terminators A Y TIME OUT Sets theout elapse A Y TRIGGER TrIggem device s Active Controller With yt ATN UNL MTA LAG and A...

Page 102: ...ices on the bus to the idle state KM 488 DIJ mu be the Act e Controlls ABORT None None If the KM 488 DD is both the Active and System Controller ABORT asserts the IFC line to retain control of the bus...

Page 103: ...The lightpen status will become true when the KM 488 DD CLEAR TALK LISTEN IDLE which has been acting as a Peripheral becomes the Active Controller The lightpen status will become true when a KM 488 D...

Page 104: ...s marked by an asterisk 9 will generate an interrupt only when the KM 488 DD s address status has changed This is indicated by the state of the Address Change Bit in the Status byte Seethe STATUS comm...

Page 105: ...DECREMENT where INCREMENT increases the buffer address after each byte is transferred DECREMENT decreases the buffer address after each byte is transferred None Programming When using INCREMENT durin...

Page 106: ...n the integer returned represents the number of characters transferred thus far into the operation 2 It is useful to call this command after an ENTER count BUFFER terra This will help you determine if...

Page 107: ...ary address 00 30 with an optional sec ondary address 00 31 each of which must be specified as two digits i e 05 10 0901 etc None Programmlng 1 Notes 2 When no address is specified the universal GPIB...

Page 108: ...rs You can EOIJ select one or two GPIB bus terminators followed by EOI or just EOI If you just specify T the GPIB bus termina tors will be reset to no terminators Where term is an optional parameter w...

Page 109: ...terminator a valid terminator sequence or both are detected Use of the EOI terminator is further described in Chapter 4 Sets the input GPIB bus terminators You can select one or two GLIB bus terminat...

Page 110: ...tor settings name is the name of the device addr is the primary GPlEJaddress 00 to 30 see addr is the secondary GPIB address 00 to 31 If the options string is not given then the configuration will rev...

Page 111: ...he KM 488 DD is TRIGGER CLEAR TALK LISTEN IDLE CFIANGE _ acting as an Active Controller The lightpen status will not change when a KM 488 DD act ing as a Peripheral receives a GPIB Trigger command The...

Page 112: ...es If interrupt is not provided then all conditions which will cause a light pen interrupt to occur will be disabled Example This will disable the KM 488 DD from causing a lightpen interrupt condition...

Page 113: ...quest signal is unasserted Once this signal has been unasserted for more than one microprocessor clock cycle control of bus is returned to the microprocessor This mode allows the DMA controller chip t...

Page 114: ...curring within one DMA page Also note that DMA AUTOINITIALIZE transfers specified for buffers that are located in more than a single DMA page are unpredictable 2 It is impossible for a program to halt...

Page 115: ...ay specify a count m a one or two character GPIB bus terminator with or without EOIQB just EOI alone The parameters are count is an optional parameter It ls a long integer representing the number of c...

Page 116: ...st not be included and an Active Controller must address a device to talk and the KM 488 DD to listen before the ENTER command is called unless that bus has already been addressed 2 3 4 5 If the terml...

Page 117: ...ust be preceded with an H i e H300 represents 768 bytes buf addr represents the memory buffer address buf addr may be given either as segmenboffset the colon is required or as an absolute memory addre...

Page 118: ...ts trans fer If CONT INUE is used and the DMA AUTOINITIALIZE has been enabled then the DMA transfer will continue until a STOP command is invoked or an GLIB BUS input terminator is detected term is an...

Page 119: ...transfer takes place in the background through DMA At some point when the ENTER data to be used the application program should issue a WAIT command If the DMA transfer is still in progress the progra...

Page 120: ...The File I O Commands KM 488 DD Programming Guide ENTER BUFFER cont d Example This will read 95 characters from device 19 into memory at H40000 ENTER 19 95 BDFFER hB4OOO O 5 24...

Page 121: ...o terminators are to be used or one or two ASCII character s to be used as the EOL This terminator character can be represented in any of the following manners char where char is an integer representi...

Page 122: ...the string When the driver returns a string it will append the EOL input terminator It the programmer s responsibility to know what EOL s are appended by a programming language Example 3 EOL terminat...

Page 123: ...y of error messages ERRORX x is an optional parameter which determines whether the error message dis play function will be enabled or disabled If ON is specified the error mes sage display is enabled...

Page 124: ...t a specific ASCII character be returned This charac ter is designated according to the following conventions char where char is an integer representing the hex or decimal equivalent of the terminator...

Page 125: ...KM 48 l DD Programming Guide The File I O Commands Example This will generate an error message and will not return any characters if no data is available when requested FILL ERROR 529...

Page 126: ...Parameters Returns Returns an identification string from the KM 488 DD driver EELLO None A string similar to the following copyright c 1991 Keithley MetraByte Carp Programming None Notes Example This...

Page 127: ...given addr is a primary address 00 30 with an optional secondary address 00 311 each of which must be specified as two digits i e 05 10 0901 etc None Programming 1 Notes If the KM 488DD is the System...

Page 128: ...Notes local state for manual programming or control The Active Controller can return specific devices to local with lockout state whereby an operator can then use the front panel controls When the dev...

Page 129: ...imal or from Hl to HFFFFFFFF hex All hex values must be preceded with an H i e H300 would specify 768 bytes data is a string of characters to be sent to the GPIB bus This string will be terminated by...

Page 130: ...The File I O Commands KMd88 DD Programmlng Guide OUTPUT Example This example will send the string CAT to devices 9 and 25 OUTPUT 09 25 CAT 5 34...

Page 131: ...dress can be represented in segmenboffset or absolute format segmenboffset The segment and offset values be separated by a colon The segment portion of the address represents a particular 64KByte area...

Page 132: ...the first byte to check for time out Unless TIME OUT 0 before continuing DMA CONTINUE execution concludes when the KM 488 DD completes its transfer If the DMA AUTOINITIALIZ E Seethe DMA command descri...

Page 133: ...IB BUS device address addr is a primary address 00 301with an optional secondary address 00 311 each of which must be specified as two digits i e 05 10 0901 etc None Programming If the KM 488 DD which...

Page 134: ...ll The KM 488 DD be an Active NOTE Many GPIB devices do not support parallel polling Check your device s documentation PPOLL None An integer in the range 0 to 255 decimal that indicates the Data Lines...

Page 135: ...which must be specified as two digits i e 05 10 0901 etc is an optional delimeter response is an integer which represents the desired Parallel Poll Response Byte This decimal integer is of the follow...

Page 136: ...mmands KM 488 DD Programming Guide PPOLLCONFIG cont d Returns None Programming None Notes Example This would configure device 12 to assert 1 DI04 when it is parallel polled and needs service PPOLL CON...

Page 137: ...E addr PPD addr ad specifies the GPIB BUS address of the device s which is to be parallel poll disabled Multiple addr parameters can be included addr is a primary address 00 30 with an optional second...

Page 138: ...rnate Syntax Disables the Parallel Poll Response of all GPIB bus device The KM 488 DD be an Active Controllet PPOLL UNCONWIG PPV Parameters None Returns None Programming None Notes Example This will d...

Page 139: ...h an optional secondary address 00 311 each of which must be specified as two digits i e 05 10 0901 etc None 1 If addr is included those devices will be addressed to listened and the GPIB REN line wil...

Page 140: ...3 2 10 Dl06 RSV Dl06 Dl05 Dl04 Dl03 Dl02 DlOl Bits 1 through 8 of this device s Serial Poll Response Byte correspond to data lines DIOl DIO8 If this bit is 1 the SRQ Service Request line will be asse...

Page 141: ...uing the following commands Notes l STOP l ERRORON l DISARM l FILLNULL CONFIG l LOCAL l ABORT l REOUEST 0 If Periuheral l BUFFERINCREMENT l Clear CHANGE TRIGGER and l DMASINGLE CLEAR STATUS TIMEOUT10...

Page 142: ...ween two non Active Controller GPIB devices by unasserting the ATN line The KM 488 DD p Syntax BESVME Parameters None Returns None Programming This command is normally called after a SEND command has...

Page 143: ...numeric equivalent of an individual ASCII char acter e g 13 decimal or HOD hex for a Carriage Return Hex values must be preceded by H Multiple quoted strings or ASCII values bytes may be sent if they...

Page 144: ...reted as data This ls the technique which is to be used to send device dependent commands Seethe IEEE 4888 Tutorial in Appendix C for more infor mation The data may be sent as either a quoted string i...

Page 145: ...display to a plotter so that data passes between the devices without passing through the KM 488 DD In this case a RESUME command must follow 4 If a DATA subcommand is not included in the SEND string...

Page 146: ...ill read its internal SRQ status bit This means that response will contain an integer either of value 0 or 64 decimal If response is 64 a device is asserting SRQ If the KM 488 DD 1sa Pen _ _ ohen it w...

Page 147: ...ddress the internal serial poll bit as indicated by Bit 6 of the Serial Poll byte or Sl from the STATUS command will be cleared So that a subsequent SPOLL or STATUS will not reveal an SRQ until a new...

Page 148: ...om 00 to 30 5 2 Addressed Indkates If the device has changed addressed state Le tf It has cyded between the Talker Listener or Actbe Confm n states This Is meet whenever a STATUS Is read This can be o...

Page 149: ...ered State values are TO No trigger command has been received Tl A Mgger command has been received Indicates if a Peripheral KM 488 DD has received a GPlB Clear command IhIs is not updated during DMA...

Page 150: ...ters None Returns None Programming 1 If the DMA CONTINUE transfer has been completed a STOP com Notes mand will have no effect 2 Use the BUFFERED command to determine the actual number of char acters...

Page 151: ...used This terminator byte can be represented as any of the following Qchar where char is an integer representing the hex or decimal equivalent of the terminators ASCII representation See Appendix B fo...

Page 152: ...M command will change the default set Notes tlngs for the GPIB terminators made during software installation 2 The termination characters can also be modified by CONFIG 3 EOI is used differently in in...

Page 153: ...actual time out interval Time out intervals from 0 01 to 0 11 seconds are rounded to 0 11 seconds Larger intervals are rounded to the nearest multiple of 55 msec Returns None Programming 1 If no time...

Page 154: ...of the device to be triggered Multiple devices may be specified If addr is not specified then the Active Controller must have previously listened the devi ce s to be triggered addr is a primary addre...

Page 155: ...ies a terminator Remember that the DMA CONTINUE function allows your application program to do some processing while DMA ls finishing in the background 2 Time out checking if enabled is performed whil...

Page 156: ...The File I O Commands KM 488 DD Programming Guide This page intentionally left blank...

Page 157: ...re discussed in the following chapters All calls contain an input parameter board nr and a returned value err code board nr is an integer O 3which selects the particular KM 488 DD that the command aff...

Page 158: ...n the sequence is transmitted Otherwise the terminator sequence character s is appended to the data characters and EOI if used is asserted on the last character sent The GPIB BUS Input Terminator sequ...

Page 159: ...truc ture is selected then all GPIB bus devices are cleared via the universal Device Clear 6 5 TRANSMITTING DATA Data is sent from the program to the GPIB bus by using the KOIJTPUT or in BASI CA Quick...

Page 160: ...atically while the application program performs other tasks At some point the application program will want to verify that the transfer is complete by calling KWAITC When KWAITC is issued the timeout...

Page 161: ...oard can be configured to generate hardware interrupts on receipt of an SRQ The KM 488 DD driver does not support hardware interrupts but does implement the lightpen pseudo interrupt To employ the lig...

Page 162: ...ause the device to unassert its SRQ and parallel responses A parallel poll is conducted by the KPPOLL call 6 13 KREQUEST The KM 488 DD can function in the non controller or peripheral mode In this mod...

Page 163: ...he offset for that routine The offsets of the routines in KM488BASBIN are not user selectable They have been defined for you in the file HEADER BAS For example the offset for the KABORT routine is alw...

Page 164: ...legal BASICA name can be assigned to these vari ables However they must be the correct data type and value and must be passed into a callable routines in the same order as shown in the routine descrip...

Page 165: ...be the same data type and appear in the same order as those given You can however change their names BASICA has no means for checking that the exact number of parameters are given or that the paramet...

Page 166: ...e file HEADER BAS has been provided to assist you with defin ing CALL routine offsets This is a BASICA source file which pre defines the offsets It can be modified to suit your needs 6 Do not name you...

Page 167: ...dress of a device The second is the secondary address If the first is set to 1 the device is assumed to not exist If no address is provided it ls assumed that the bus is already addressed When the KM...

Page 168: ...considerations for the routine Notes Example This section gives a programming example using the routine Note that all of the examples given assume that the offsets have been set The HEAD ER BAS file...

Page 169: ...ents the board to be pro grammed ERRCODE is a variable through which error codes are returned If this vari able is set to 0 then no error occurred If it is set to a value other than 0 then an error di...

Page 170: ...Where ADSC Address Status Change If this bit is set to 1 the lightpen status will become true when a change in address status has occurred i e a Talker becomes a Listener or a Peripheral becomes an A...

Page 171: ...addressed as a Talker and can output data to the GPIB IDLE Idle If this bit is set to one the lightpen status will become true when the KM 488 DD acting as a Peripheral is unaddressed as a Talker or...

Page 172: ...nue program BRDNDbl 0 First GPIB Board SET DP LIGET PBN INTBRRUPT Enable light pen interrupt detection on SRQ ON PEN GOSDB 2000 BASICA connection of subroutine to the light pen PEN ON BASICA comnand t...

Page 173: ...ented lf DIR is equal to 0 the buffer address will be decremented ERRCODE is a variable through which error codes are returned If this vari able is set to 0 then no error occurred If it is set to a va...

Page 174: ...han 0 then an error did occur The error codes are listed in Appendix G BCOUNT represents the number of characters which were transferred dur ing the last buffered transaction This will be an integer 1...

Page 175: ...application The MYGADS structure is described in section 7 1 Returns ERRCODE is a variable through which error codes are returned If this vari able is set to 0 then no error occurred If it is set to...

Page 176: ...g options T term term Sets the input and output GPIB bus terminators You EOII can select one or two GLIB bus terminators followed by EOI or just EOI If you just specify T the GPIB bus terminators will...

Page 177: ...inator a valid terminator sequence or both are detected TI term term Sets the input GPIB bus terminators You can select one EOIl or two GPIB bus terminators followed by EOI or just EOI If you just spe...

Page 178: ...ly be used if the application program also includes File I O Commands utilizing the named device configurations name is the name of the device addr is the primary GPIB address 00 to 30 secaddr is the...

Page 179: ...note that the CONFIG string for the KCONFIG call does not include the CONFIG keyword i e as it would if you were using the CONFIG File I O command 3 Primary and Secondary Addresses must each be two c...

Page 180: ...ll Interface In BASICA KM 488 DD Programming Guide KDIAGOFF Purpose Disables file diagnostics Ottset 18 Syntax xx CALL lanAGoET Parameters None Returns None Programming None Notes Example 1000 CALL KD...

Page 181: ...me of the file to which the diagnos tic information is to be written STRLEN is the length of the string representing the name of the file None Programming This will echo the value of call parameters i...

Page 182: ...PER DET SRQ OEC LA TA IDLE Where AOSC Address Status Change If this bit is set to 1 light pen status will not change when a change in address status has occurred i e a Talker becomes a Listener or a...

Page 183: ...ed as a Talker and can output data to the GPIB IDLE Idle If this bit is set to one light pen status will not change when the KM 488 DD is unaddressed as a Talker or a Listener Returns ERRCODE is a var...

Page 184: ...t to one the SINGLE mode is selected In this mode when the DMA Request line is asserted the DMA controller assumes control of the bus and transfers a single byte of data Control of the bus is then ret...

Page 185: ...turns None Programming 1 Notes All DMA AUTOINITIALIZE transfers should occur entirely within a single DMA 64 KByte page So if a DMA buffer operation involves a transfer of more than 64K or occur acros...

Page 186: ...an integer array large enough to accept the returned data If a non zero COUNT is specified DATA COUNT 2 will suffice for any returned data If COUNT is 0 and terminator characters are used then DATA m...

Page 187: ...r Seealso the KDMA call description MYGADS N L represents the GPIB bus address of the device to be accessed MYGADS is a pointer to an array of n n can range from 1 to 15 pairs of GPIB addresses You mu...

Page 188: ...nd GPIB bus terminator Possible values are l HFFFF Use the default terminator Note that if the default first terminator is used this will automatically be selected 0 to 255 Detect this ASCII character...

Page 189: ...sed to listen then MYGADS can specify no addresses Seesection 7 1 and the bus will not be re addressed 3 If COUNT is specified as 0 then KENTER will terminate when the ter minator s specified by TERML...

Page 190: ...address 5 910 GADS l 1 first secondary address NONE 920 G bDS 2 1 second primary address NONE 1000 1090 DIM TEBM 3 Default terminator array 1100 TEBl l O 1 Use default SOI 1110 TERM l 1 Use default f...

Page 191: ...ATA is a string large enough to accept the returned data If a non zero COUNT is specified the string should be of lengthCOUNT If COUNT is 0 and terminator characters are used the string must be large...

Page 192: ...the data transfer MYGADS N 2 represents the GPIB bus address of the device to be accessed MYGADS is a pointer to an array of n n can range from 1 to 15 pairs of GPIB addresses You must tailor MYGADS t...

Page 193: ...bus terminator Possible values are l HFFFF Use the default terminator Note that if the default first terminator ls used this will automatically be selected 0 to 255 Detect this ASCII character as the...

Page 194: ...y one address If a device has been pre viously addressed to talk and the KM 488 DD previously addressed to listen then MYGADS can contain no addresses Seesection 7 1 and the bus will not be m addresse...

Page 195: ...1 first secondary address NONE 620 EADS 2 1 second primary address NONE and NONB to follow 630 ONLY ONE address is allowed for ENTER EADS 2 must 1 640 820 Terminator Attays 830 840 DIM ETERM 3 ENTER...

Page 196: ...hich error codes are returned If this vari able is set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in Appendix G Programming 1 N...

Page 197: ...ault con dition returns a NULL character Valid integers are any one of the follow ing 1 OFF The KM 488 DD driver will not return any data charac ters or a DDS error message if no input data is availab...

Page 198: ...Programming Guide KF LL cont d Example 77OBRDNmd 0 First GPIB Board 780 FILUXiAR 88 Decimal equivalent of X 880 ERBNDN 0 1000 l Set Fill Character To X 1010 CALL KFILL BBDNDM E FILLCRAR 1020 IF ERRNDb...

Page 199: ...le through which error codes are returned If this vari able ls set to 0 then no error occurred If it ls set to a value other than 0 then an error did occur The error codes are listed in Appendix G Pro...

Page 200: ...through which error codes are returned If this vari able is set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in Appendix G Progr...

Page 201: ...0 BRRNDM 0 590 DIM GADS 3 addressing array for KXCAL conmand 600 GADS O 12 firat pri ma zy address 12 610 GADS l 1 first secondary address NONE 620 GADS 2 1 no second device 2000 Sand Devioe With GPIB...

Page 202: ...s set to a value other than 0 then an error did occur The error codes are listed in Appendix G 1 The LOCAL button is disabled so that a device cannot be returned to local state for manual programming...

Page 203: ...e number of characters to be output Valid counts are within the range 1 to 65535 decimal or from 1 to HFFFF hex MODE is an integer which represents whether or not DMA is to be used and if the CONTINUE...

Page 204: ...used during the KOUTl UTBUFF call These terminators are used in conjunction with COUNT to terminate the input process Terminator choices include whether or not EOI will be asserted to signal the end...

Page 205: ...ue repre sents the ASCII value of the termina tor character to be used An ASCII Equivalence Chart is provided in Appendix A The following default TERMLIST can also be used DIM TERb IST 3 TERMLIST 1 TE...

Page 206: ...DS does not have to specify addresses and the bus will not be re addressed A non zero COUNT must always be specified If you do not wish to append terminator characters then be sure to set the terminat...

Page 207: ...PUTBWF 640 820 Terminator Array 830 EBBNDM 0 840 DIM TF Raa 3 KOUTPUTBUFF terminator array 850 TKBM O 1 NO EOI OVERRIDE 860 TERM l 1 use default first terminator 870 TFml 2 1 use default second termin...

Page 208: ...counts are within the range 1 to 65535 decimal or from 1 to HFFFF hex Note however that the limit for a BASICA string is 256 bytes MODE is an integer which represents whether or not DMA is to be used...

Page 209: ...d during the KOUTPUTBUFF call These terminators are used in conjunction with COUNT to terminate the input process Terminator choices include whether or not EOI will be asserted to signal the end of in...

Page 210: ...epre sents the ASCII value of the termina tor character to be used An ASCII Equivalence Chart is provided in Appendix A The following default TERMLIST can also be used DIM TERblLIST 3 TERMLIST 1 TERML...

Page 211: ...he devices have been pre viously addressed then MYGADS can specify no addresses and the bus will not be re addressed 4 5 A non zero COUNT must always be specified If you do not wish to append terminat...

Page 212: ...20 GADS 2 1 no mcce devioes 640 Multiple addresses are allowed with KOUTPUTSTR 760 S STr NG 100 32 761 must initialize string before call 770 820 Terminator Arrays 830 840 DIM TBRM 3 KOUTPIJTSTR termi...

Page 213: ...gu ous bytes Syntax XX DIM SODRCE XX DIM DEST XX COUNT XX CALL KPACK SODRCE 0 DEST 0 CODNT Offset 60 Parameters SOURCE is the name of the integer array which contains the data to be con verted DEST ls...

Page 214: ...f integers 2 bytes in BASICA 1270 1280 DIM OUTARRAY NDMD Data To Send To Device 1290 DIM WOm NIJMD 2 Temporary Work Buffer 1300 1310 Code To Fill OKlTARRAY Here 1320 1330 Pack OUTABRAY Into Contiguous...

Page 215: ...N 2 represents the GPIB bus address of the device to be accessed MYGADS is a pointer to an array of n n can range from 1 to 15 pairs of GPIB addresses You must tailor MYGADS to your application The MY...

Page 216: ...ERBwDbf 0 960 DIM PERIADS 3 addressing array for PERIPHERAL 970 PERIADS O 2 first primary address 2 980 PERIADS l 1 first secondary address NONE 990 PERIADS 2 1 no more devices 2400 Pass Control To De...

Page 217: ...the board to be pro grammed ERRCODE is a variable through which error codes are returned If this vari able is set to 0 then no error occurred If it ls set to a value other than 0 then an error did occ...

Page 218: ...PCCFG BOARDNR is an integer which represents the board identification number This is an integer in the range 0 to 3 and represents the board to be pro grammed MYGADS N 2 represents the GPIB bus addres...

Page 219: ...bus device s ist individual status bit Refer to the Device s Id ocumentation for more information I PRPI m is a 3 bit value which tells the device being configured which data bit CD101 through DIOE it...

Page 220: ...0 DIM GADS 3 addressing array 510 GADS O 1 first primary address 1 520 GADS l 1 first secondary address NONE 530 GADSrb 2 1 no more devices 1240 Configure Device At GPIB Address 1 To Respond 1241 IOn...

Page 221: ...the range 0 to 3 and represents the board to be pro grammed MYGADS N 2 represents the GPIB bus address of the device to be accessed MYGADS ls a pointer to an array of n n can range from 1 to 15 pairs...

Page 222: ...70 BBDNDM 0 First GPIB Board 380 BRBNDM 0 500 DIM GADS 3 addressing array 510 GADS O 1 first primary address 1 520 GADS l 1 first secondary ad ass NONE 530 GADS 2 1 no mote devices 1240 Disable Device...

Page 223: ...les the Parallel Poll Response of all GPIB bus device s The KM 488 DD nut be the Active 75 xx BCABDNB xx ERRC ODE xx CALL BPPD BoARDNB EBBCODE BCABDNR is an integer which represents the board identifi...

Page 224: ...ress Status Change If this bit is set to 1 a change in address status has occurred i e a Talker becomes a Listener or a Peripheral becomes an Active Controller cc Controller in Charge If this bit is s...

Page 225: ...s currently in progress ERRCODE is a variable through which error codes are returned If this variable is set to 0 then no error occurred If it is set to a value other than 0 then an error did occur Th...

Page 226: ...ication number This is an integer in the range 0 to 3 and represents the board to be pro grammed MYGADS N 2 represents the GPiB bus address of the device to be accessed MYSADS is a pointer to an array...

Page 227: ...isten so they will be put in remote 2 It is good programming practice to issue a Local Lockout to prevent the device s from being returned to Local mode Example 370 BRDNUbf 0 Firat GPIB Board 500 KRRN...

Page 228: ...ing format 811 7 6 6 4 3 7 1 0 DlO6 rsv Dl06 D105 Dl04 Dl03 DIOZ DlOi Where Dl01 6 Bits 1 through 8 of this device s Serial Poll Response Byte correspond to data lines DIOl DIOE If this bit ls 1 the K...

Page 229: ...Interface in BASICA KRFQUEST cont d Example 370 BRDNDM 0 Birst GPIB Board 510 ERBxnd 0 3100 Set RSV Don t Set Any Other Bits In Status Byte 3110 WV 64 3120 CALL QUEST BRDNUM BRRNDbf RSV 3230 IB ERBNU...

Page 230: ...i able is set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in Appendix G 1 The KM 488 DD is reset to the following conditions l S...

Page 231: ...This ls an integer in the range 0 to 3 and represents the board to be pro grammed ERRCODE is a variable through which error codes are returned If this vari able ls set to 0 then no error occurred If i...

Page 232: ...acters The subcommands are as follows CMD Sends information with the ATN line asserted This indicates to the bus devices that the characters are to be interpreted as GPIB bus commands SeeAppendix B Th...

Page 233: ...ry address may be appended to the primary address LISTEN addr Addresses another GPIB device s or KM 488 DDf s to listen by sending a GLIB LAG Listen Address Group command with ATN asserted Addr is an...

Page 234: ...commas e g EOI 120 121 122 STRINGLEN is an integer between 0 and 255 which represents the length of the SEND string Returns ERRCODE is a variable through which error codes are returned If this vari ab...

Page 235: ...clude the word SEND within the KSEND string as you might do in the FILE I O SEND command 370 BRDNDbl 0 First GPIB Board 510 ERRNUM 0 2250 Address The Device At Address 2 TO Listen 2251 And The Device...

Page 236: ...pro grammed MYGADS N 2 represents the GPIB bus address of the device to be accessed MYGADS is a pointer to an array of n n can range from 1 to 15 pairs of GPIB addresses You must tailor MYGADS to you...

Page 237: ...ng SRQ will cause the device to unassert its SRQ The string returned by KSTATUS or the integer status word set by KQUIKSTAT can be checked to determine the presence of an SRQ before a serial poll is c...

Page 238: ...ith MyGADS containing no addresses SPR will be 64 if a device is asserting SRQ and 0 if not This same result could have been deter mined from KQIJIKSTAT or KSTATUS Note that if this call is issued whe...

Page 239: ...d to be pro grammed ERRCODE is a variable through which error codes are returned If this vari able is set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The e...

Page 240: ...enever a STATUS is read This can be one of the foBowing GO There has not been a change in the addrcsscd status Gl There has been a change in the addrcsscd status 1 mAddressed Indicates if the KM 4 DD...

Page 241: ...has been received IY A trigger command has been rccxivcd Indicates if the IEEE Clear command has been received or not This Is not updated during DMA CONTINUE transfers Clearec values are CO No Clear...

Page 242: ...ATUS coni d 370 BRDNDN 0 First GPIB Board 380 STAT STRING 75 32 390 EiRmmbl 0 3950 Log and check status for SRQ 3960 3970 CALL KSTATUS BRDNDM ERRNUM STATS 3971 Request status 3980 IF ERRNUN TEEN PRINT...

Page 243: ...iable through which error codes are returned If this vari able is set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in Appendix G...

Page 244: ...Notes This routine exchanges the bytes within individual elements of an inte ger array Byte swaps are necessary when communicating with devices that transfer binary data real or integer numbers in hi...

Page 245: ...240 DIM WORKB 100 1250 COUNT 101 WORXB lOO SAS 101 ELEMENTS 1260 1270 FILL WORKB WITE A SINE WAVE 1280 1290 FOR X 0 TO 100 1300 WORFE X 10 SIN X 1310 NEXT X 1320 1330 KSWAP DATA FOR A DEVICE EXPECTING...

Page 246: ...er This is an integer in the range 0 to 3 and represents the board to be pro grammed TERMLIST is an integer array which defines the GPIB bus terminators SeeChapter 6 for more information regarding the...

Page 247: ...r Possible values are 1 No default second GPIB bus termlna tor oto255 Use this ASCII character as the sec ond GPIB bus terminator instead of the default second GPIB Terminator The 0 255 decimal value...

Page 248: ...to initialize driver terminations 1040 DRVTERW O O 1041 set both input L output default terminators 1050 DRVTRRbl l 1 Asrrert Detect EOI 1060 DRVTEBM 2 1 no first terminator character 1070 DRVTRRM 3 1...

Page 249: ...error did occur The error codes are listed in Appendix G Programming 1 Notes To suppress Timeout checking set TVALB to 0 2 If a DMA CONTINUE transfer is in progress the KM 488 DD will check for timeo...

Page 250: ...ts the board to be pro grammed MYGADS N 2 represents the GLIB bus address of the device to be accessed MYGADS is a pointer to an array of n n can range from 1 to 15 pairs of GPIB addresses You must ta...

Page 251: ...BRRNDM 0 590 DIM oADS 3 I addressing array for KTRIGGER command 600 GADS O 12 first primary address 12 610 GADS l 1 first secondary address NONE 620 GADS 2 1 no mope devices 2000 I Trigger Device With...

Page 252: ...be twice the size of SOURCE COUNT is an integer which represents the number of bytes to unpack from the SOURCE array The number of elements needed in the DEST array in COUNT 2 Returns dest will conta...

Page 253: ...ror codes are returned If this vari able is set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in Appendix G Programming 1 Notes Ti...

Page 254: ...Usingthe Call Interface in BASICA KM 4WDD Programming Guide This page intentionally left blank 7 92...

Page 255: ...library files where needed From within the QuickBASIC Environment Be sure that the appropriate QLB file KM488QB4 QLB or KM488QB7 QLB is located where QuickBASIC can find it Then invoke QuickBASIC by t...

Page 256: ...GLIB bus terminator settings The KTO call can be used to change the default device timeout value To create a Standalone Program This process compiles the QuickBASIC source code and links it to the Qui...

Page 257: ...However QuickBASIC treats them as signed mag nitudes 32768 to 32767 When you need to express a value which is greater than or equal to 32768 you will need to express it in one of two ways l Convert i...

Page 258: ...ses structures which are required by various calls for address ing the bus A single GADS structure consists of two integers The first is the primary address of a device The second is the secondary add...

Page 259: ...be 0 if no error was detected It is good practice to check errcode after each call and provide a routine to handle errors if they arise Returns Thii section describes any values which are returned by...

Page 260: ...codes are returned If this vari able is set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in Appendix G Programming If the KM 488...

Page 261: ...tatus Change If this bit is set to 1 the lightpen status will become true when a change in address status has occurred i e a Talker becomes a Listener or a Peripheral becomes an Active Controller This...

Page 262: ...addressed as a Talker and can output data to the GPIB IDLE Idle If this bit is set to one the lightpen status will become true when the KM 48 DD acting as a Peripheral is unaddressed as w a Talker or...

Page 263: ...rror DIM ode AS INTEGER Integer to hold interrupt enable mask brdnum 0 First GPIB Board SET UP LIGHT PEN INTERRUPT Enable light pen interrupt detection on SRQ ON PEN GOSW 2000 QB connection of subrout...

Page 264: ...e through which error codes are returned If this varl able is set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in Appendix G Prog...

Page 265: ...ch were transferred dur ing the last buffered transaction This will be a long integer 32 b in the range 0 to 1 048 575 0 to 20z0 1 Programming 1 Notes 2 If data is transferred in the DMA CONTINUE mode...

Page 266: ...eturned If this varl able is set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in Appendix G Programming 1 If mygads contains no a...

Page 267: ...string This string can be comprised of any of the following options T term term Sets the input and output GPIB bus terminators You EOI can select one or two GPIB bus terminators followed by EOI or jus...

Page 268: ...that the last character has been sent Data will continue to be read until this terminator a valid terminator sequence or both are detected TI term term Sets the input GLIB bus terminators You can sele...

Page 269: ...that this should only be used if the appli cation program also includes File I O Com mands using named devices name is the name of the device addr is the primary GPIB address 00 to 301 secaddr is the...

Page 270: ...e the CONFIG keyword i e as you would if you were using the CONFIG File I O command 3 Primary and Secondary Addresses must each be two characters long e g 01 or 0209 Example DIM Str AS STRING String t...

Page 271: ...be written strlen is the length of the string representing the name of the file Returns None Programming 1 This will echo the value of the call parameters into a disk file Notes Example DIM Str AS SI...

Page 272: ...gthe Call Interface in QuIckBASiC KM 488 DD Programming Guide KDIAGOFF Purpose Disables file diagnostics Syntax CALL KDIAGOFF Parameters None Returns None Programming None Notes Example CALL KDIAGOFB...

Page 273: ...t is set to 1 light pen status will not change when a change in address status has occurred i e a Talker becomes a Listener or a Peripheral becomes an Active Controller Controller in Charge If this bi...

Page 274: ...t change when the KM 488 DD is unaddressed as a Talker or a Listener Refurns errcode is a variable through which error codes are returned If this variable issetto0 then no error occurred Ifitissettoa...

Page 275: ...the DMA Request line is asserted the DMA controller assumes control of the bus and transfers a single byte of data Control of the bus is then returned to the microprocessor Note that SINGLE and DEMAN...

Page 276: ...KOUTPUT transfer in DMA CON TINUE mode is selected the AUTOINlTlALlZE option will only be in effect for that transfer Returns None Programming 1 All DMA AUTOINITIALIZE transfers should occur entirely...

Page 277: ...IM ertnum AS INTEGER Era or code returned if any 0 indicates no error DIM aingleauto AS INTEGER Integer to hold DblA command brdnum 0 First GPIB Board errnuln 0 singleauto 4 1 Singla autoinitialiee Db...

Page 278: ...t is a long integer representing the number of characters to be read Valid counts are within the range 0 to 4294967295 1 decimal or from 0 to HFFFFFFFF When 0 is used the KENTERBUF will stop when the...

Page 279: ...the GPIB bus terminators to be used during the KENTERBUF call These terminators are used in con junction with count to terminate the input process Terminator choices include whether or not EOI will b...

Page 280: ...selected 0 to 255 Detect this ASCII character as the sec ond GPIB bus terminator instead of the default second GPIB Input Terminator The 0 255 value repre sents the ASCII value of the termina tor char...

Page 281: ...previously addressed to listen then mygads can be naadd Seesection 8 1 and the bus will not be re addressed 3 If count is specified as 0 then KENTER will terminate when the ter minator s specified by...

Page 282: ...nter DIM dmain 514 Array to hold DblA input waveform from scope SCOPEadd 0 primad 5 first primary address 5 SCOPEadd O secad 1 first secondary address NONE SCOPEadd l primad 1 second primary address N...

Page 283: ...read Valid counts are within the range 0 to 4294967295 232 1 decimal or from 0 to HFFFFFFFF Note however that QuickBASIC strings have a maximum length of 65535 HFFFF When count is 0 the KENTERSTR will...

Page 284: ...the GPIB bus terminators to be used during the KENTERSTR call These terminators are used in con junction with count to terminate the input process Terminator choices include whether or not EOI will be...

Page 285: ...lected 0 to 255 Detect this ASCII character as the sec ond GLIB bus terminator instead of the default second GPIB Input Terminator The 0 255 value repre sents the ASCII value of the termina tor charac...

Page 286: ...n the terminator s specified by termlist is encountered If it is desirable to terminate on count only and not use the default terminators then you must select no terminator overrides in the ter mlist...

Page 287: ...ad 1 first secondary address NONE DMMadd l primad 1 second primary address NONE and NONE to follow brdnum 0 First GPIB Board ettnum 0 mode 0 DMA mode flag 0 no DblA 1 DMA Without CONTINDE 3 DMA With C...

Page 288: ...alue other than 0 then an error did occur The error codes are listed in Appendix G Programming 1 Notes If KERROR has been used to enable error messages the message will only reveal that Bn error has o...

Page 289: ...D driver to return a NULL character fillsw can be any one of the following 1 OFF The KM 488 DD driver will not return any data charac ters or a DOS error message if no input data is available 2 ERROR...

Page 290: ...d to be accessed DIM errnm AS INTEGER Error code returned if any 0 indicates no error DIM fillchar AS INTEGER ASCII value of fill character brdnum 0 First GPIB Board errnum 0 fillohar SE Decimal equiv...

Page 291: ...rdnum 0 First GPIB Board Must be long enough to hold returned id Str STRINGQ 50 32 Return ID from driver to verify its presence CALL KBELLO brdnum ermum Six IF errnum TEEN PRINT IEEE Error errnum STOP...

Page 292: ...which error codes are returned If this varl able is set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in Appendix G Programming 1...

Page 293: ...error DIM DblMadd 2 AS GADS thin structure will hold the primary and secondary addresses of the devices DbfMadd O primad 5 r first primary address 5 DMMadd O seoad 1 first secondary address NONE Db46a...

Page 294: ...d in Appendix G Programming 1 Notes The LOCAL button is disabled so that a device cannot be returned to local state for manual programming or control The Active Controller can return specific devices...

Page 295: ...range 1 to 4294967295 I decimal or from 1 to ISKHFFFFFFFF mode is an integer which represents whether or not DMA is to be used and if the CONTINUE mode is to be used This integer is interpreted as fol...

Page 296: ...IWTBUF call These terminators are used in conjunc tion with count to terminate the output process Terminator choices include whether or not EOI will be asserted with the last byte and whether or not a...

Page 297: ...na tor character to be used An ASCII Equivalence Chart ls provided in Appendix A 1 The following default termlist can also be used Returns DIM DTRM 3 AS INTEGER DTRM O 1 Use the default EOI choice DTR...

Page 298: ...rides in the tennlist array 6 If a listener does not accept a character a timeout will occur unless the timeout has been disabled Example DIM SCOPEtm 3 AS INTEGER Terminators for output DIM brdnm AS I...

Page 299: ...range 1 to 4294967295 23 1 decimal or from 1 to HFFFFFFFF hex mode is an integer which represents whether or not DMA is to be used and if the CONTINUE mode is to be used This integer is interpreted a...

Page 300: ...the KOUTIWTSTR call These terminators are used in conjunc tion with count to terminate the output process Termination choices include whether or not EOI will be asserted with the last byte and whethe...

Page 301: ...acter to be used An ASCII Equivalence Chart is provided in Appendix A The following default termlist can also be used DIM DTRM 3 AS INTEGER DTRM 0 1 Use the default EOI choice DTRM 1 1 r Use the defau...

Page 302: ...ed 4 5 A non zero count must always be specified If you do not wish to append terminator characters then be sure to set the terminator defaults accordingly This may be accomplished via CONFIG DAT or b...

Page 303: ...utput DItd SCOPEtrm 3 AS INTEGER Terminators for output DIM btdnum AS INTEGER r This variable will contain the board number to be accessed SCOPEadd O primad 5 first primary address 5 SCOPEadd O secad...

Page 304: ...ata is to be stored count is an integer which represents the number of elements comprising the source array The number of elements needed in the de array is count 2 Returns Result is stored in de Prog...

Page 305: ...15 GPIB bus addresses to be accessed mygads n is comprised of n structures of type GADS You must tailor mygads to your application The GADS structure is described in section 8 1 and defined in the Qui...

Page 306: ...x or DIM PERIadd 2 AS GADS this structure will hold the primary and aeoondary addresses of the devise to take control PERIadd O primad 2 first primary address 2 PERIadd O secad 1 first secondary addre...

Page 307: ...rned If this vari able is set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in Appendix G pprtn is an integer variable which will...

Page 308: ...entification number This is an integer in the range 0 to 3 and represents the board to be pro grammed mygads n is an array of n n can range from 1 to 15 GPIB bus addresses to be accessed mygads n is c...

Page 309: ...B bus device s ist bit individual status bit Refer to the Device s documentation for more information P2Pi PO ls a 3 bit value which tells the device being configured which data bit CD101through DIOE...

Page 310: ...Radd 2 AB GADS f this structure will hold the primary and I secondary addresses of the device to take to be confi gured WRadd O primad 1 first primary address 1 wRadd O secad 1 f first secondary addre...

Page 311: ...resents the board to be pro grammed mygads n is an array of n n can range from 1 to 15 GPIB bus addresses to be accessed mygads n is comprised of n structures of type GADS You must tailor mygads to yo...

Page 312: ...icates no error DIM PNRadd 2 AS GADS this structure will hold the primary and secondary addresses of the device to take to be disabled PWRadd O primad 1 first primary address 1 add O secad 1 first sec...

Page 313: ...brdnum ermum IF errnum TEEN PRINT IEEE Erzor errnum STOP Disables the Parallel Poll Response of all GPIB bus device s The KM be the Active ControlleD CALL KPPIJ boardnr errcode boardnr is an integer w...

Page 314: ...Status Change If this bit is set to 1 a change in address status has occurred i e a Talker becomes a Listener or a Peripheral becomes an Active Controller Controller in Charge If this bit is set to 1...

Page 315: ...error codes are rehwned If this variable is set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in Appendix G Programming None Note...

Page 316: ...ange 0 to 3 and represents the board to be pro grammed mygads n is an array of n n can range from 1 to 15 GLIB bus addresses to be accessed mygads n is comprised of n structures of type GADS You must...

Page 317: ...kout to prevent the device s from being returned to Local mode Example INCLDDE IiBADER BI DIM brdnum AS INTEGER Number of board to be accessed DIM errnum AS INTEGER Error code returned if any 0 indica...

Page 318: ...2 10 DKXI rsv Dl06 0105 Dl04 Dl03 Dl02 DlOl Where D101 0 Bits 1 through 8 of this device s Serial Poll Response Byte correspond to data lines DIOI DIOB ISV If this bit is 1 the KM 488 DD will generat...

Page 319: ...o be accessed DIM etrnum AS INTEGER Error ooda returned if any 0 indicates no error DIM srqreq AS INTEGER Integer to hold byte to request service brdnurn 0 Firet GPIB Board f Set RSV But Don t Set Any...

Page 320: ...ror did occur The error codes are listed in Appendix G Programming 1 The KM 488 DD is reset to the following conditions Notes l STOP l ERRORON DISARM l FILL NULL l CONFIG LOCAL l ABORT l REQUEST 0 If...

Page 321: ...urns errcode is a variable through which error codes are returned If this vari able is set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are...

Page 322: ...ne asserted This indicates to the bus devices that the characters are to be interpreted as GPIB bus commands The command may be sent as either a quoted string e g COMMAND or as a numeric equivalent of...

Page 323: ...teger representing the GPIB BUS device address of the device s to talk This integer ranges from 00 to 30 decimal Multiple listeners can be specified DATA Sends information with the ATN line unasserted...

Page 324: ...r did occur The error codes are listed in Appendix G Programming 1 Notes Typically KSEND is used to send commands to initiate communication directly between peripheral devices For example the KM 488 D...

Page 325: ...or DIM StrCnt AS INTEGER Length of Str DIM Str AS STRING String to hold returned message b nun 0 First GPIB Board I Address Device 2 To Listen Device 12 to talk str lJ JT UNL LISTEN 02 TALK 12 StrCnt...

Page 326: ...1 to 15 GPIB bus addresses to be accessed mygads n is comprised of n structures of type GADS You must tailor mygads to your application The GADS structure is described in section 8 1 and defined in th...

Page 327: ...l cause the device to unassert SRQ The string returned by KSTATUS or the integer status word set by KQUIKSTAT can be checked to determine the presence of an SRQ before a serial poll is conducted If on...

Page 328: ...g SRQ and 0 if not This same result could have been determined from KQUIKSTAT or KSTATUS Note that if this call is issued when a SRQ is pending it internally clears the SRQ pending bit even though the...

Page 329: ...he board to be pro grammed errcode is a variable through which error codes are returned If this vari able is set to 0 then no error occurred If it is set to a value other than 0 then an error did occu...

Page 330: ...eset whenever a STATUS is read This can be one of the following GO There has not been a change in the addressed status Gl Them has been a change in the addressed statw Current Indicates if the KM 488...

Page 331: ...n received Tl A trigger command has been received u Indicates if the IEEE Clear command has been received or not Tbisis not updated during DMA CONTINUE transfers Cleared values are CO No Clear command...

Page 332: ...M errnum AS INTEGER f Error code returned if any 0 indicates no Errol DIM Str AS STRING String to hold returned message brdnum 0 First GPIB Board errnum 0 str STRING 75 32 I Loop and check status for...

Page 333: ...i able is set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in Appendix G Programming 1 Notes 2 If the DMA CONTINUE transfer has b...

Page 334: ...h devices that transfer binary data real or integer numbers in high byte low byte order When such a device transfers data into a QuickBASIC integer array your program must swap the bytes in each array...

Page 335: ...board to be pro grammed termlist 0 is an integer array which contains the new default GPIB bus terminators for the KM 488 DD device specified by boardnr See Chapter 6 for more information regarding th...

Page 336: ...ble values are l HFFFF Don t use second GPIB bus termina tor 0 to 255 Use this ASCII character as the sec ond GPIB bus terminator instead of the default second GPIB Terminator The 0 255 decimal value...

Page 337: ...no erzo DIM modterm 4 AS INTEGER used to modify the default terminators brdnum 0 First GPIB Board I r Terminator Arrays modterm 0 0 reset both input b output terminators modterm 1 Enable EOI assert d...

Page 338: ...ndix G Programming 1 Notes If no timeout period is specified the default of 10 seconds will be used 2 3 To suppress Timeout checking set tval to 0 If a Dh4A CONTINLTE transfer is in progress the KM 48...

Page 339: ...n is an array of n n can range from 1 to 15 GPIB bus addresses to be accessed mygads n is comprised of n structures of type GADS You must tailor mygads to your application The GADS structure is descri...

Page 340: ...etcor this ektucture holds the primary and secondary addresses of the devices DIM DMMadd 2 AS GADS DbR dadd O primad 12 first primary address 12 DbQ dd O aeoad 1 first secondary address 3 NONE DblMadd...

Page 341: ...nts comprising the source array The number of elements needed in the de array is count 2 dest will contain the newly converted data Programming 1 Both source and dest must be declared as COMMON Notes...

Page 342: ...is set to a value other than 0 then an error did occur The error codes are listed in Appendix G Programming 1 Time out checking if enabled is performed while KWAITCing Notes 2 This is an wait The fol...

Page 343: ...e KM driver If either of these files resides in a directory other than the one in which you are compiling your program be sure to specify a complete path to each file Typically the following statement...

Page 344: ...es which are used to receive data require that a string or array be declared to store the received data The length of the string or size of the array should be sufficient to store the number of bytes...

Page 345: ...ocation 0 of the string where Microsoft PASCAL normally stores it The string length must be calculated in this manner as the KM 488 DD driver is unaware of which language is issuing the current call 5...

Page 346: ...an array of n 1 to 15 structures of type gads which contain the GPIB address information required by the call This GPIB address structure consists of TYPE gads RECORD primad INTEGER primary address o...

Page 347: ...group This part of the callable description describes any data which will be returned after execution of the callable has been completed err code All calls except KDIAGON and KDIAGOFF return an intege...

Page 348: ...the board to be pro grammed err code is a variable through which error codes are returned If this vari able set to 0 then no error occurred If it is set to a value other than 0 then an error did occu...

Page 349: ...C LA TA IDLE Where ADSC Address Status Change If this bit is set to 1 the lightpen status will become true when a change in address status has occurred i e a Talker becomes a Listener or a Peripheral...

Page 350: ...l is addressed as a Talker and can output data to the GPIB IDLE Idle If this bit is set to one the llghtpen status will become true when the KM 488 DD acting as a Peripheral is unaddressed as a Talker...

Page 351: ...KARM cont d CONS2 CARDNUN o Card Number Parameter For Calls SRQBNAB 16 BIT 4 SRQ Detection VAR ErrorFlag WORD BEGIN t Word TO Hold Error Code Enable Light Pen Interrupt Detection On SRQ I kann CAPDNU...

Page 352: ...e pro grammed dir selects the direction in which the buffer is to be read If dir is equal to 1 the buffer address will be incremented If dir is equal to 0 the buffer address will be decremented err co...

Page 353: ...UF CONST CARDm o Card Number Parameter Fat Calla DECFWlENT 0 Decrament Idawry Address on DMA VAR EzrorFlag WORD Word TO Hold Error Code BEGIN t Set Direction Of Memory Address Change With DblA uf CARD...

Page 354: ...h which error codes are returned If this vari ables set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in Appendix G bcount represe...

Page 355: ...ST CAFONUN o Card Number Parameter For Calls VAR ErrorFlag WORD Word TO Hold Error Code XferCount INTEGERQ Number Of Bytes Moved In Last Transfer BEGLN t Return Number Of Bytes In La GPIB BUS Data Tra...

Page 356: ...IB bus address of the device to be cleared mygads is an array of n n can range from 1 to 15 structures of type gads Seesection 10 1 for more information err code is a variable through which error code...

Page 357: ...WORD Word For Code Returned By Calls t Address Structure For Meter At GPIB Address 12 I add 12 O primad 12 1st Instrument Ha8 GPIB Address 12 add_l2 0 secad 1 1 Indicates 1st Instrument Has No Seconda...

Page 358: ...grammed cfg string is a user defined string This string can be comprised of any of the following options T term term Sets the input and output GPIB bus terminators You EOI can select one or two GPIB b...

Page 359: ...t assert the GPIB bus EOI line This would indicate that the last character has been sent Data will continue to be read until this terminator a valid terminator sequence or both are detected Sets the i...

Page 360: ...ld only be used if the appli cation program also includes File I O Com mands utilizing the named device configurations name is the name of the device addr is the primary GPIB address 00 to 30 set addr...

Page 361: ...note that the CONFIG string for the KCONFIG call does not include the CONFIG keyword i e as you would if you were using the CONFIG File I O command 3 Primary and Secondary Addresses must be two chara...

Page 362: ...formation is to be written strlen is the length of the string representing the name of the file Returns None Programming This will echo the value of the call parameters into a disk file Notes Example...

Page 363: ...sing the Call Interface in Microsoft PASCAL KDIAGOFF Purpose Temporarily disables file diagnostics Synlax kdiagoff Parameters None Returns None Programming None Notes Example BEGIN t Disable File Dia...

Page 364: ...0 0 ADSC CIC PER DET SRQ DEC LA TA IDLE ADSC Address Status Change If this bit is set to 1 light pen status will not change when a change in address status has occurred i e a Talker becomes a Listener...

Page 365: ...is set to one light pen status will not change when the KM 488 DD is addressed as a Talker and can output data to the GPIB IDLE Idle If this bit is set to one light pen status will not change when the...

Page 366: ...ode integer is interpreted as follows Bit 15 3 2 1 0 I 0 1 SIN 1 DEM 1 AUTO I Where SIN SINGLE When this bit is set to one the SINGLE mode is selected In this mode when the DMA Request line is asserte...

Page 367: ...only in effect until the next KENTER or KOUTPIJT buffered transfer is completed Addi tionally if a KENTER or KOUTPUT transfer in DMA CON TINUE mode is selected the AUTOINITIALIZE option will only be i...

Page 368: ...r Parameter For Calls AUTO 1 Auto Mode of DblA Transfer l DEMAND 2 Demand Mode of DMA Transfer SINGLE 4 Single Mod 3 of DMA Transfer VAB ErrorFlag WORD BEGIN t Word TO Hold Error Code Set Up D dA Mode...

Page 369: ...mmed darray is a character array large enough to accept the returned data If a non zero count is specified the array should be of size count If count is 0 and terminator characters are used then darra...

Page 370: ...in the data transfer mygads n represents the GPIB bus address of the device to be reset mygads is an array of n n can range from 1 to 15 structures of type gads You must tailor mygads to your applica...

Page 371: ...he first GPIB bus terminator instead of the default first GPIB Input Terminator The 0 255 value represents the ASCII value of the terminator character to be used An ASCII Equivalence Chart is provided...

Page 372: ...the KM 488 DD is the Active Controller it will automatically address itself as a listener and another device defined in mygads as the talker Since only one device can be a talker the address group myg...

Page 373: ...OF INTEGER Array Of GPIB Terminators For VSNTER And KOUTPUT BEGIN t Address Structure For Meter At GPIB Address 05 l Inat nt Has GPIB Address 5 l ad O5 0 primad 5 1 Indicates No Secondary Address add...

Page 374: ...ssage display is enabled This is the default If e sw O is specified the error message display is dis abled err code is a variable through which error codes are returned If this varl ables set to 0 the...

Page 375: ...PASCAL KERROR cont d Example CONST CARDNUN 0 Card Number Parameter For Calls ERP ON 1 Enable Error Display VAR ErrorFlag WORD BEGIN t Word To Hold Error Code Enable Error Display I kerror CARDNUM Err...

Page 376: ...and represents the board to be pro grammed fill sw is an integer which represents the Ii11condition The default con dition returns a NULL character Valid integers are any one of the follow ing 1 OFF T...

Page 377: ...hen no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in Appendix G Example CONST cARDNuM o Card Number Parameter For Calls FILL_SW 88 se X Au F...

Page 378: ...resents the board to be pro grammed id response will contain a string similar to copyright c 1991 Xexthley MetraByte Corp err code is a variable through which error codes are returned If this vari abl...

Page 379: ...mine String Length And Stuff It In Location 0 PRCCEDUPX char count VAR ch_stmg LSTRING BEGIN Check For NULL or 255 Characters i 1 WHILE 1 255 AND ch stmg i CHR 0 DO i i 1 Assign Calculated Count TO St...

Page 380: ...described in section 10 1 err code is a variable through which error codes are returned If this vari able set to 0 then no error occurred If it is set to a value other than 0 then an error did occur...

Page 381: ...p One Device At 12 ErrorFlag WORD Word For Code Returned By Calls t Address Structure For Meter At GPIB Address 12 adcm12 0 primad 12 1st Device Pri Address 12 add_l2 0 secad 1 1st Device NO Sec Addre...

Page 382: ...are returned If this vari ablez set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in Appendix G Programming 1 Notes The LOCAL but...

Page 383: ...erface in Microsoft PASCAL Example CONST CARDNUN o Card Number Parameter For Calls VAR Errorrlag WORD For Returned Error Code 0 OK BEGIN klol CARDNUbl ErrorFlag Lock Out Local Control Of Devices IF Er...

Page 384: ...st Parameters board nr is an integer which represents the board identification number This is an integer in the range 0 to 3 and represents the board to be pro grammed darray is an array of data to ou...

Page 385: ...data mygada is a pointer to an array of n fn can range from 1 to 15 struc tures of type gads You must tailor mygads to your application mygads structure is defined in the include file mp488dd inc and...

Page 386: ...CII Equivalence Chart is provided in Appendix A 2nd GPIB bus terminator Possible values are 1MFFFF Use the default terminator Note that if the default first terminator is used this will automatically...

Page 387: ...ive Controller and my gads contains the device s to be addressed the KOUTPUT will automatically assert the GPIE3REN Remote Enable line 3 If the KM 48 DD is the Active Controller and KOUTPUT is called...

Page 388: ...IB Terminators PO VENTER And KOUTPUT sdata AmAY O NuMD 11 OF CHAR Array Of Data TO OUTPUT BEGIN Structure For No Default Terminator E01 Overrides dtrm Ol 1 1 Assert EOI koutput Detect EOI kentar dtrm...

Page 389: ...IB bus address of the device to become the new Active Controller mygads is a pointer to an array of n n can range from 1 to 15 structures of type gads You must tailor mygads to your application mygads...

Page 390: ...ess Group One Device At 02 l BEGIN Address Structure For Peripheral At GPIB Address 02 add 02 0 primad 2 t 2 1st Instrument Has GPIB Address 02 add_02 0 secad 1 1 1st Inst nt Has No Secondary Address...

Page 391: ...None Notes board nr is an integer which represents the board identification number This is an integer in the range 0 to 3 and represents the board to be pro grammed err code is a variable through whi...

Page 392: ...ber Parameter For Calls l VAR ErrorFlag WORD Integer to Hold Error Code Retuned By Each CALL 0 false no error PP_reSP INTEGER Integer Folf Parallel Response t Conduct Parallel Poll And Print Result I...

Page 393: ...r which represents the board identification number This is z integer in the range 0 to 3 and represents the board to be pro grammed mygads n contains the GPIB bus addressfes of the device s to be conf...

Page 394: ...e GPIB bus device s ist individual status bit Refer to the Device s documentation for more information P2P1PO is a 3 bit value which tells the device being configured which data bit CD101 through DIO8...

Page 395: ...ads Address Group will have one device Q 1 BEGIN Device Supporting PPOLL IS At AddreSS 01 I add l Ol primad 1 1st Instrument Has GPIB Address 01 add_l Ol secad 1 1 1st Instrument Has NO Secondary Addr...

Page 396: ...in the range 0 to 3 and represents the board to be pro grammed mygads n contains the GLIB bus address of the device es to be dis abled mygads is a pointer to an array of n n can range from 1 to 15 st...

Page 397: ...AY O I OB gads Address Group will have one device 0 1 t Address Structure For Device At GPIB Address 01 I add_l O primad 1 1st Instrument Has GPIB Address 01 add_l Ol secad 1 1 1st Instrument Has No S...

Page 398: ...d represents the board to be pro grammed Returns err code is a variable through which error codes are returned If this vari able set to 0 then no error occurred If it is set to a value other than 0 th...

Page 399: ...2 1 0 0 ADSC CIC PEND DET SRQ DEC LA TA DMA Where ADSC Address Status Change If this bit is set to 1 a change in address status has occurred i e a Talker becomes a Listener or a Peripheral becomes an...

Page 400: ...M 488 DD is addressed as a Talker and can output data to the GI IB DMA DMA A DMA transfer is currently in progress err code is a variable through which error codes are returned If this vari le is set...

Page 401: ...number This is an integer in the range 0 to 3 and represents the board to be pro grammed mygads n contains the GPIB bus address of the device es 1to be put in the remote mode mygads is a pointer to a...

Page 402: ...ce to issue a Local Lockout to prevent the device s from being returned to Local mode CONST CARDNUN o Card Number Parameter For Calls VAR ErrorFlag WORD Integer to Hold Error Code Returned By Each CAL...

Page 403: ...4 4 3 3 2 2 10 10 DlO6 rsv Dl06 Dl05 D104 Dl03 Dl02 DlOl DIOB rsv Dl06 Dl05 D104 Dl03 Dl02 DlOl Where D101 6 Bits 1 through 8 of this device s Serial Poll Response Byte correspond to data lines DIOl...

Page 404: ...EQUEST cont d Example CONST CARDNUN o Card Number Parameter For Calls ABSERTSRQ 64 Set Reserved SRQ Bit In Status Byte ErrorFlag WORD Word For Code Returned By Calls BEGIN t Generate SRQ krequest CARD...

Page 405: ...a variable through which error codes are returned If this vari ables set to 0 then no error occurred If it ls set to a value other than 0 then an error did occur The error codes are listed in Appendi...

Page 406: ...DD Programming Gulde KRESET cont d Example CONST cARDNrJw o Card Number Parameter For Calls l VAR Errorslag WORD Word For Code Returned By Calls BEGIN t Reset Driver kreset CARDNUM ErrorFlag IF ErrorF...

Page 407: ...e 0 to 3 and represents the board to be pro grammed err code is a variable through which error codes are returned If this varl ables set to 0 then no error occurred If it ls set to a value other than...

Page 408: ...fied however the length of the SEND com mand string cannot exceed 255 characters The subcommands are as follows CMD Sends information with the ATN line asserted This indicates to the bus devices that...

Page 409: ...dresses another GPIB device or KM 488 DD to talk by sending a GPIB TAG Talk Address Group command with the ATN line asserted addr is an integer representing the GPIB BUS device address of the device t...

Page 410: ...t character ls transmitted This information is interpreted as GPIB bus data and may be sent as either a quoted string e g xyz or as a numeric equivalent of an individual ASCII charac ter e g 13 decima...

Page 411: ...ng be sure to call KRESUME immediately after the KSEND This is necessary because the ATN line must be dropped so that the transfer will pro ceed Example 6 Do not include the word SEND within the KSEND...

Page 412: ...mygads n contains the GPIB bus address of the devicetes to be dis abled mygads is a pointer to an array of n n can range from 1 to 15 struc tures of type gads You must tailor mygads to your applicati...

Page 413: ...sserting SRQ will cause the device to unassert SRQ The string returned by KSTATUS or the integer word by KQUIKSTAT can be checked to determine the presence of an SRQ before a serial poll is conducted...

Page 414: ...D the peripheral KM 488 DD unasserts the SRQ line For an example see KREQUEST The state of the SRQ bit can also be deter mined from the string returned by KSTATUS or the integer status word set by a K...

Page 415: ...rn Word For Coda Returned By Calls BEGIN t Address Structure For Meter At GPIB Address 12 add_l2 0 p imad 12 1st Instrument Has GPIB Address 12 add_l2 0 secad 1 1 Indicates 1st Instrument Has No Secon...

Page 416: ...3 and represents the board to be pro grammed Returns err code is a variable through which error codes are returned If this vari able set to 0 then no error occurred If it is set to a value other than...

Page 417: ...t whenever a STATUS is read Ibis can be one of the following GO There has not been a change in the addressed status G1 There has been a change in the addressed statw I mAddressed India if the KM488 DD...

Page 418: ...CO No Clear command has been received Cl A Ctear c mmand has been received 24 2 TransferStatus Indhtes if Pdata transfer is in progress Values which may appear are PO No transfer PI DMA CONTINUE Tran...

Page 419: ...Code i INTEGER t Proc TO Determine String Length And Put It In Loc 0 I PROCEDURE char count VAR ch 8tmg LSTRING BEGIN t Check For NULL or 255 Characters i 1 WHILE 1 255 AND ch stmg il Cm O DO i itl I...

Page 420: ...are returned If this vari ables set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in Appendix G Programming 1 Notes If the DMA CO...

Page 421: ...in the range 0 to 3 and represents the board to be pro grammed tern list is an integer array which defines the GLIB bus terminators See Chapter 6 for more information regarding the use of GPIB bus te...

Page 422: ...ator Possible values are l FFFF Don t use second GPIB bus termina tor 0 to 255 Use thii ASCII character as the sec ond GPIB bus terminator instead of the default second GLIB Terminator The 0 255 decim...

Page 423: ...O 31 OR INTEGER Array Of GPIB Terminators FOX KTEBM l BEGIN t Configure Terminators For BUS Operations t l Structure TO Reset Configuration Terminators tnn_lst o 0 0 Indicates Change Input AND Output...

Page 424: ...ow before a time out err code is a variable through which error codes are returned If this vari ables set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The e...

Page 425: ...N o Card Number Parameter For Calls FIFTEEN 273 15 seconds at 18 2 ticks per second VAR ErrorFlag WORD Word TO Hold Errol Code Returned By Each Call 0 false no errors BEGIN t Set Time Out TO 15 Second...

Page 426: ...d to be pro grammed mygads n contains the GPIB bus addressfes of the devicefes to be trig gered mygads is a pointer to an array of n n can range from 1 to 15 struc tures of type gads You must tailor m...

Page 427: ...e At 12 ErrorFlag WORD Word For Code Returned By Calls t Address Structure For Meter At GPIB Address 12 add_lZ O primad lZ 1st Instrument Has GPIB Address add_lZ O secad 1 1 Indicates 1st Instrument H...

Page 428: ...0 to 3 and represents the board to be pro grammed Returns err code is a variable through which error codes are returned If this varl ables set to 0 then no error occurred If it is set to a value othe...

Page 429: ...WAITC cont d Example CONST CARDNON o Card Number Parameter For Calls VAR F rrorI 1ag WORD Word For Coda Returned By Calls BEGIN Wait For DNA TO Finish DNA CONTINUE started here kwaitc CARDNUN ErrorFla...

Page 430: ...Uslng the Call Interface In Microsoft PASCAL KM 488 DD Programming Guide This page intentionally left blank 9 88...

Page 431: ...an the one in which you are compiling your program be sure to specify a complete path to each file The V is used throughout the example programs to relax string checking during procedure and function...

Page 432: ...out value Programming 1 Notes 2 Any values passed into a call in a variable may also be passed as a constant or as the returned value of a function Parameters which are also used to return values must...

Page 433: ...are limited to 255 bytes maximum When values are retuned to the calling program via a string vari able the string length must be calculated and placed in location 0 of the string where Turbo PASCAL n...

Page 434: ...s is an array of n 1 to 15 structures of type gads which contain the GPIB address information required by the call This GPIB address structure consists of TYPE gads RECORD primad INTEGER secad INTEGER...

Page 435: ...ns This part of the callable description describes any data which will be returned after execution of the callable has been completed err code All calls except KDIAGON and KDIAGOFF return an integer e...

Page 436: ...e board to be pro grammed err code is a variable through which error codes are returned If this vari ables set to 0 then no error occurred If it is set to a value other than 0 then an error did occur...

Page 437: ...TA IDLE Where ADBC Address Status Change If this bit is set to 1 the lightpen status will become true when a change in address status has occurred i e a Talker becomes a Listener or a Peripheral beco...

Page 438: ...eral is addressed as a Talker and can output data to the GPIEl Idle If this bit is set to one the lightpen status will become true when the KM 488 DD acting as a Peripheral is unaddressed as a Talker...

Page 439: ...n TURBOPASCAL CONST 0 ex Parknataz Fat Calls SRQENAN 16 BIT 4 SRQ Detection VAR ErrorFlag WORD Word To Bold Error Code BEGIN t Enable Light Pen Interrupt Detection On SRQ karm CARDNDM ErrorFlag SRQENA...

Page 440: ...pro grammed dir selects the direction in which the buffer is to be read If dir is equal to 1 the buffer address will be incremented If dir ls equal to 0 the buffer address will be decremented err cod...

Page 441: ...d CONST CARDNUM o Card Number Parameter For Calls DECREMENT 30 Decrement Memory Address on DMA VAN ErrorFlag WORD BEGIN t Word To Bold Error Code Set Direction Of Memory Address Change With DMA kbuf C...

Page 442: ...are returned If this varl ables set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in Appendix G bcount represents the number of ch...

Page 443: ...T CMDNUM o Card Number Parameter For Calls VAB ErrorRlag WORD Word To Bold Error Code XferCount INTEGEB4 Number Of Bytes Moved In Last Transfer BEGIN t Return Numbat Of Bytes In Last GPIB BUS Data Tra...

Page 444: ...address of the device to be accessed mygads is an array of n n can range from 1 to 15 structures of type gads Seesection 10 1 for more information err code is a variable through which error codes are...

Page 445: ...ag WORD Word For Code Returned By Calls t Address Structure FOL Meter At GPIB Address 12 I add 12 0 primad 12 1st Instrument Bas GPIB Address 12 add_l2 0 secad 1 1 Indicates 1st Instrument 888 No Seco...

Page 446: ...cfg string is a user defined string This string can be comprised of any of the following options T term term Sets the input and output Gl IB bus terminators You EOII can select one or two GPIB bus ter...

Page 447: ...e last character has been sent Data will continue to be read until this terminator a valid terminator sequence or both are detected TI term term Sets the input GPIB bus terminators You can select one...

Page 448: ...only be used if the appli cation program also includes File I O Com mands utilizing the named device configurations name is the name of the device addr is the primary GLIB address 00 to 30 set addr is...

Page 449: ...ote that the CONFIG string for the KCONFIG call does not include the CONFIG keyword i e as you would if you were using the CONFIG File I O command Primary and Secondary Addresses must be two character...

Page 450: ...tic information is to be written strlen is the length of the string representing the name of the file None Programming This will echo the value of the call parameters into a disk file Notes Example CO...

Page 451: ...de Using the Call Interface In TURBOPASCAL KDIAGOFF Purpose Temporarily disables file diagnostics Syntax kdiagoff Parameters None Returns None Programming None Notes Example BEGIN t Disable File Diagn...

Page 452: ...DSC CIC PER DET SRQ DEC LA TA IDLE Where ADSC Address Status Change If this bit is set to 1 light pen status will not change when a change in address status has occurred i e a Talker becomes a Listene...

Page 453: ...will not change when the KM 488 DD is addressed as a Listener and can accept data from the GPIB TA Talk Addressed If this bit is set to one light pen status will not change when the KM 488 DD is addre...

Page 454: ...ARM cont d CONST CARDNDM o Card Number Parameter For Calls SRQENAB 16 BIT 4 SRQ Detection VAR ErrorFlag WORD Word To Bold Error Code REGIN I Disable Light Pen Interrupt Detection On SRQ kdisarm CARDND...

Page 455: ...SINGLE When this bit is set to one the SINGLE mode is selected In this mode when the DMA Request line is asserted the Dh4A controller assumes control of the bus and transfers a single byte of data Co...

Page 456: ...ompleted Addi tionally if a KENTER or KOUTPUT transfer in DMA CON TINUE mode is selected the AUTOINITIALIZE option will only be in effect for that transfer Returns None Programming 1 All DMA AUTOINITI...

Page 457: ...Parameter For Calls ADTO l Auto bloda of DblA Transfer DEMAND 2 Demand blobodeof DMA Transfer SINGLE 4 Single Noda of DMA Transfer VAX4 ErrorFlag WORD Word To Bold Error Code BEGIN Set up DMA Mode To...

Page 458: ...rray is a character array large enough to accept the returned data If a non zero count is specified the array should be of size count If count is 0 and terminator characters are used then darray must...

Page 459: ...A DMA If this bit is set to one then DMA will be used in the data transfer mygads n represents the GPIB bus address of the device to be accessed mygads is an array of n n can range from 1 to 15 struct...

Page 460: ...terminator instead of the default first GPIB Input Terminator The 0 255 value represents the ASCII value of the terminator character to be used An ASCII Equivalence Chart ls provided in Appendix A te...

Page 461: ...488 DD is the Active Controller it will automatically address itself as a listener and another device defined in mygads as the talker Since only one device can be a talker the address group raygads ca...

Page 462: ...2 OF INTEGER Array Of GPIB Terminators For EBNTRR And KOUTPUT BEGIN Address Structure For Meter At GPIB Address 05 add_05 0 primad 5 Instrument Eas GPIB Address 5 add 05 0 secad 1 1 Indicate8 No Secon...

Page 463: ...lay is enabled This is the default If e sw O is specified the error message display is dis abled err code is a variable through which error codes are returned If this vari able set to 0 then no error...

Page 464: ...ramming Guide KERROR CONST CARDNUM 0 Card lluuber bamnbstet For Calls m l Enable Error Display VAN ErrorFlag WORD Word To Bold Error Code BEGIN t Enable Error Display I kerror CARDNUbf ErrorFlag ERR O...

Page 465: ...represents the board to be pro grammed fill sw is an integer which represents the fill condition The default con dition returns a NULL character Valid integers are any one of the follow ing 1 OFF Thi...

Page 466: ...0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in Appendix G Example CONST CARDNUN 0 Card Number Parameter For Calls FILL SW 88 Use X...

Page 467: ...ents the board to be pro grammed id response will contain a string similar to copyright c 1991 Kezthley MetraByte Corp err code is a variable through which error codes are returned If this vari ables...

Page 468: ...Prooedura To Determine String Length And Stuff It In Location 0 PROtXDDRX char count VAR ch strg STRING BEGIN Check For NULL or 255 Characters i 1 WRILE 1 255 AND ch strng i CER 0 DO i i 1 Assign Cal...

Page 469: ...rough which error codes are returned If this vari ables set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in Appendix G Programmin...

Page 470: ...ne Device At 12 ErrorFlag WORD Word For Code Returned By Calls t Address Structure For Nater At GPIB Address 12 I l dd_l2 0 primad 12 1st Devioe Pri Address 12 add_12 0 secad 1 1st Device No Sec Addre...

Page 471: ...rror codes are returned If this vari ablex set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in Appendix G Programming 1 Notes The...

Page 472: ...DD Programming Guide KLOL cont d CONST CAXDNUN o Card Number Parameter For Calls VAX ErrorFlag WOXD For Returned Error Code 0 OX I BEGIN klol CARDNUM ErrorFlag Look Out Local Control Of Devices IF Er...

Page 473: ...e pro grammed darray is an array of data to output count is a long integer representing the number of characters to be output Valid counts are within the range 1 to 4294967295 r l decimal or from 1 to...

Page 474: ...d during the KOUTPUT call These terminators are used in conjunc tion with count to terminate the output process Termination choices include whether or not EOI will be detected with the last byte and w...

Page 475: ...d GPIB Input Terminator The 0 255 value repre sents the ASCII value of the termina tor character to be used An ASCII Equivalence Chart ls provided in Appendix A The following default termlist can also...

Page 476: ...ally address itself as the talker and another device s con tained in my gads as the listener s If the devices have been pre viously addressed then my gads can be no add and the bus will not be re addr...

Page 477: ...rFlag WORD Word To Bold Error Code Returned By Each Call 0 false no errors no add AFtRAY O l OF gads Addr Group Signaling No Addressing dtrm ARRAY 0 2 OF INTEGER Array Of GPIB Terminators For KENTER A...

Page 478: ...he GPIB Bus no add O primad 1 1 Indicates No New Address I no add O eecad 1 1 Indicates No Secondary Ad em no add l primad 1 1 Indicates No Other In8tnumnta c data Array Initialized Xere koutput CARDN...

Page 479: ...ess of the device to become the new Active Controller mygads is a pointer to an array of n fn can range from 1 to 15 structures of type gads You must tailor mygads to your application mygade structure...

Page 480: ...Group One Device At 02 BEGIN Address Structute For Peripheral At GPIB Address 02 add_02 0 primad 2 t 2 1st Instrument Has GPIB Address 02 add OZ O secad 1 1 1st Instrument Bas No Secondary Address ad...

Page 481: ...an integer which represents the board identification number This is an integer in the range 0 to 3 and represents the board to be pro grammed err code is a variable through which error codes are retur...

Page 482: ...umber Parameter For Calls l VAR ErrorFlag WORD Integer to Bold Error Code Returned By Each CALL 0 false no error m p INTEGER Integer For Parallel Response P Conduct Parallel Poll And Print Result kppo...

Page 483: ...board nr err code mygads ppc cfg Parameters board nr is an integer which represents the board identification number This is an integer in the range 0 to 3 and represents the board to be pro grammed m...

Page 484: ...GPIB bus device s ist individual status bit Refer to the Device s documentation for more information P2PI Pa is a 3 bit value which tells the device being configured which data bit DIOl through DIO8 i...

Page 485: ...ds Address Group will have one device 1 BEGIN t Device Supporting PPOLL Is At Ad ass 01 add l O primad 1 1st Instrument Bas GPIB Address 01 add l O seoad 1 1 1st Instrument Bas No Secondary Addr add l...

Page 486: ...the board identification number This is G integer in the range 0 to 3 and represents the board to be pro grammed mygads n represents the GPIB bus address of the device to be accessed mygads is an arr...

Page 487: ...O l OF gads Address Group will have one device 1 t Address Structure For Device At GPIB Address 01 I add l O primad 1 1st Instrument 88s GPIB Address 01 add l O secad 1 1 1st Instrument Ras No Second...

Page 488: ...represents the board to be pro grammed err code is a variable through which error codes are returned If this vari ables set to 0 then no error occurred If it is set to a value other than 0 then an er...

Page 489: ...1 0 0 ADSC CIC PEND DET SRQ DEC LA TA DMA Where ADSC Address Status Change If this bit is set to 1 a change in address status has occurred i e a Talker becomes a Listener or a Peripheral becomes an A...

Page 490: ...tener and can accept data from the GPIB TA Talk Addressed If this bit is set to one the KM 488 DD is addressed as a Talker and can output data to the GPIB DMA DMA A DMA transfer is currently in progre...

Page 491: ...l Interface In TURBOPASCAL KQUIKSTAT cont l Example CONST msc WOO VAR board m INTEGER err code WORD qstat INTEGER BRGIN QSTAT 0 Initialim QSTAT To 0 kquikstat board nr err code q at IF QSTAT AND ADSC...

Page 492: ...nr is an integer which represents the board identification number This is an integer in the range 0 to 3 and represents the board to be pro grammed mygads n represents the GPIB bus address of the dev...

Page 493: ...ckout to prevent the device s from being returned to Local mode Example CONST CARDNUN o Card Number Parameter For Calls VAR ErrorFlag WORD Integer to Hold Error Code Returned By Each CALL 0 false no e...

Page 494: ...wing format Bll 7 6 6 4 3 2 10 Ill06 rsv Dl06 DlO5 Dl04 Dl03 DIOZ DlOl Where D101 6 Bits 1 through 8 of this device s Serial Poll Response Byte correspond to data lines DIOI DIO8 ISV If this bit ls 1...

Page 495: ...SCAL Example CONST cAFaNwN 0 Cord Number Pkn er Bar Cal18 ASSERTSRQ 64 Set Reserved SRQ Bit In Status Byte ErrotElag WORD Word For Code Returned By Calls BEGIN t Generate SRQ krequest CARDNUM ErrorFla...

Page 496: ...rammed err code is a variable through which error codes are returned If this vari ablez set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are...

Page 497: ...g the Call Interface In TURBOPASCAL KRESET CONST CARDNm 0 Card Number Parameter For Calls VAR ErrorFlag WORD Word For Code Returned By Calls BEGIN t Reset Driver kreset CAFUMJM ErrorFlag IF ErrorFlag...

Page 498: ...ange 0 to 3 and represents the board to be pro grammed err code is a variable through which error codes are returned If this vari able5 set to 0 then no error occurred If it is set to a value other th...

Page 499: ...the length of the SEND com mand string cannot exceed 255 characters The subcommands are as follows CMD Sends information with the ATN line asserted This indicates to the bus devices that the characte...

Page 500: ...sses another GPIE3device or KM 488 DD to talk by sending a GPIB TAG Talk Address Group command with the ATN line asserted addr is an integer representing the GPIB BUS device address of the device to t...

Page 501: ...haracter is transmitted This information is interpreted as GPIB bus data and may be sent as either a quoted string e g xyz or as a numeric equivalent of an individual ASCII charac ter e g 13 decimal o...

Page 502: ...ing be sure to call KRESUME immediately after the KSEND This is necessary because the ATN line must be dropped so that the transfer will pro ceed 6 Do not include the word SEND within the KSEND string...

Page 503: ...nge 0 to 3 and represents the board to be pro grammed mygads n represents the GPIB bus address of the device to be accessed mygads is an array of n n can range from 1 to 15 structures of type gads See...

Page 504: ...rting SRQ will cause the device to unassert SRQ The string returned by KSTATUS or the integer word by KQUIKSTAT can be checked to determine the presence of an SRQ before a serial poll is conducted If...

Page 505: ...D the peripheral KM 488 DD unasserts the SRQ line For an example see KREQUEST The state of the SRQ bit can also be deter mined from the string returned by KSTATUS or the integer status word set by a K...

Page 506: ...d For Code Returned By Calls BBGIN P Address Structure For Meter At GPIB Address 12 add_l2 0 primad 12 1st Instrument Has GPIB Address 12 add_l2 0 secad 1 1 Indicates 1st Instrument Bas No Secondary A...

Page 507: ...resents the board to be pro grammed Returns err code is a variable through which error codes are returned If this vari ables set to 0 then no error occurred If it is set to a value other than 0 then a...

Page 508: ...reset whenever a STATUS is read This can be one of the following GO There has not been a change In the addressed statw Gl There has been a change In the addressed stat 1 mAddressed Indicates if the K...

Page 509: ...eceived PO No transfer PI DMA CONTINUE Transfer occurring Pz DMA AUTOINITIALIZE Transfer occurring w Contains the Error Message Text assodated with the given error code EXX These emor mwa ges are list...

Page 510: ...i INTEGER t Ptoo To Determine String Length And Put It In Loo 0 PRCCEDIJRE char count VAR ch strg STRING BEGIN t Check For NDLL or 255 Characters i 1 WEILE 10255 AND ch strng i CER 0 DO i i l t Assig...

Page 511: ...If this vari able set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in Appendix G Programming 1 If the DMA CONTINUE transfer has b...

Page 512: ...the range 0 to 3 and represents the board to be pro grammed tern list is an integer array which defines the GPIB bus terminators See Chapter 6 for more information regarding the use of GLIB bus termi...

Page 513: ...tor Possible values are 1 FFFF Don t use second GPIB bus termina tor 0 to 255 Use this ASCII character as the sec ond GPIB bus terminator instead of the default second GPIB Terminator The 0 255 decima...

Page 514: ...INTEGER Array Of GPIB Terminators For KTEF34 BEGIN t Configure Terminators For BUS Operations I t Structure To Reset Configuration Terminators I tm lst ol 0 0 Indicates Change Input AND Output Termin...

Page 515: ...ertain to check that a DMA CONTINUE transfer has been com pleted Changes the timeout period VAR board nr INTRGER err code WORD tvai INTEGER4 BEGIN kto board nr err code tval board nr is an integer whi...

Page 516: ...Number Parameter For Calls FIFTEEN 273 15 seconds at 18 2 ticks per second VAN EEECXF O warn Word TO Bold Error Code Returned By Each Call 0 false no errors BEGIN t Set Time Out To 15 Seconds Approx 1...

Page 517: ...his is an integer in the range 0 to 3 and represents the board to be pro grammed mygads nl represents the GPIB bus address of the device to be accessed mygads is an array of n n can range from 1 to 15...

Page 518: ...rrorFlag WORD Word For Code Returned By Calla P Address Structure For Meter At GPIB Address 12 add_l2 O primad 12 1st Instrument Has GPIB Address add 12 0 secad 1 1 Indicates 1st Instrument aas No Sec...

Page 519: ...to 3 and represents the board to be pro grammed Returns err code is a variable through which error codes are returned If this varl ableG set to 0 then no error occurred If it is set to a value other t...

Page 520: ...Example CONST CARDNUN 10 Card Number Parameter For Calls VAR ErrorFlag WORD Word For Code Returned By Calls BEGIN t Wait For DblA To Finish t DM CONTINDB started here 1cwait c CARDNUN ErrorSlag IF Er...

Page 521: ...ction prototypes structures etc Compile your program in the normal manner being sure to link it with the library KM4881FCOBJ Far example when working in Microsoft C at the DOS prompt type either cl yo...

Page 522: ...into the KM 488 DD Routine 3 Any KM 488 DD routine which returns a value into a string requires an additional parameter This defines the total number of bytes available as string space for storage of...

Page 523: ...is is an array of n 1 to 15 structures of type gads which contain the GLIB address information required by the call This GPIB address structure consists oE struot gads int primad primary address o 30...

Page 524: ...le description describes any data which will be returned after execution of the callable has been completed err code All calls except KDIAGON and KDIAGOFF return an integer error code which will be 0...

Page 525: ...in the range 0 to 3 and represents the board to be pro grammed err code is a variable through which error codes are returned If this varl ables set to 0 then no error occurred If it is set to a value...

Page 526: ...cc PEW DET Address Status Change If this bit is set to 1 the lightpen status will become true when a change in address status has occurred i e a Talker becomes a Listener or a Peripheral becomes an A...

Page 527: ...is addressed as a Talker and can output data to the GPIB IDLE Idle If this bit is set to one the lightpen status will become true when the KM 48 DD acting as a Peripheral is unaddressed as a Talker or...

Page 528: ...Using the Call Interface in C KM 48 DD Programming Guide Example define LA 0x4 define PERI 0x40 int err ooda 0 int board m 0 karm board nr Cerr oode PERI 1 LA if err oode my errorhandler err oode 11 8...

Page 529: ...is equal to 1 the buffer address will be incremented If dir is equal to 0 the buffer address will be decremented err code is a variable through which error codes are returned If this vari ables set to...

Page 530: ...than 0 then an error did occur The error codes are listed in Appendix G bcount represents the number of characters which were transferred during the last buffered transaction This will be a long integ...

Page 531: ...lor mygads to your application The mygads struc ture is defined in the include file km488dd h and is described in section 11 1 Returns err code is a variable through which error codes are returned If...

Page 532: ...er pointer to a user defined string This string can be comprised of any of the following options T term term Sets the input and output GPIB bus terminators You EOI can select one or two GPIB bus termi...

Page 533: ...the last character has been sent Data will continue to be read until this terminator a valid terminator sequence or both are detected TI term term Sets the input GPIB bus terminators You can select on...

Page 534: ...nly be used if the appli cation program also includes File I O Com mands utilizing the named device configurations name is the name of the device addr is the prlmary GPIB address 00 to 30 sac addr is...

Page 535: ...ication program previously written using the File I O commands to callables be sure to note that the CONFIG string for the KCONFIG call does not include the CONFIG keyword i e as you would if you were...

Page 536: ...kdiagon filename strlen filename filename is string containing the name of the file to which the diagnostic information is to be written strlen is the length of the string representing the name of the...

Page 537: ...all Interface in C Purpose Temporarily disables file diagnostics Syntax kdiagoff Parameters None Returns None Programming None Notes Example char FileName WYDIAG DAT kdiagon FileName strlen FileName D...

Page 538: ...light pen status will not change when a change in address status has occurred i e a Talker becomes a Listener or a Peripheral becomes an Active Controller cc Controller in Charge If this bit is set to...

Page 539: ...not change when the KM 488 DD is addressed as a Talker and can output data to the GPIB IDLE Idle If this bit is set to one light pen status will not change when the KM 488 DD is unaddressed as a Talke...

Page 540: ...e when the DMA Request line is asserted the DMA controller assumes control of the bus and transfers a single byte of data Control of the bus is then returned to the microprocessor Note that SINGLE and...

Page 541: ...fect for that transfer Returns None Programming 1 All DMA AUTOINITIALIZE transfers should occur entirely within a Notes single DMA 64 KByte page So if a DMA buffer operation involves a transfer of mor...

Page 542: ...returned by the device and the termination char acters count is a long integer representing the number of characters to be read Valid counts are within the range 0 to 4294967295 23 l decimal or from...

Page 543: ...to be used during the KENTER call These terminators are used in conjunc tion with count to terminate the input process Terminator choices include whether or not EOI will be detected to signal end of i...

Page 544: ...cted 0 to 255 Detect this ASCII character as the sec ond GPIB bus terminator instead of the default second GPIB Input Terminator The 0 255 value repre sents the ASCII value of the termina tor characte...

Page 545: ...1 and the bus will not be re addressed If count is specified as 0 then KENTER will terminate when the ter minator s specified by term list is encountered If it is desirable to terminate on count only...

Page 546: ...is dis err code is a variable through which error codes are returned If this vari ables set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes ar...

Page 547: ...1 OFF This type of response will not return any data characters or a DOS error message if no input data is available 2 ERROR This type of a response will not return any data characters but will genera...

Page 548: ...err code is a variable through which error codes are returned If this vari ables set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed...

Page 549: ...code is a variable through which error codes are returned If this vari ablez set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in...

Page 550: ...gads add 05 15 int ErrorFlag 0 Addrem Structure For Device With GPIB Address 05 l let instrument has GPIB primary address 05 no second ary ad e00 add 05 O primad 05 add 05 0 secad 1 add_05 1 primad 1...

Page 551: ...e other than 0 then an error did occur The error codes are listed in Appendix G Programming 1 The LOCAL button is disabled so that a device cannot be returned to Notes local state for manual programmi...

Page 552: ...rs to be output Valid counts are within the range 1 to 4294967295 232 1 decimal or from 1 to OxFFFFFFFFhex mode is an integer which represents whether or not DMA is to be used and if the CONTINUE mode...

Page 553: ...1 term list 31 is an integer array which defines the GLIB bus terminators to be used during the KOUTRJT call These terminators are used in conjunc tion with count to terminate the output process Termi...

Page 554: ...ter to be used An ASCII Equivalence Chart is provided in Appendix A The following default tsrmlist can also be used int dtrm 3 dtrm O 1 Use the default EOI choice dtzm l 1 Use the default first termin...

Page 555: ...KCONFIG Andyselect no terminator overrldes in term_list 6 If a listener does not accept a character a timeout will occur unless the timeout has been disabled Example Message To Display On Digital Scop...

Page 556: ...of the device to become the new Active Controller mygads is a pointer to an array of n n can range from 1 to 15 structures of type gads You must tailor mygads to your application mygads structure is d...

Page 557: ...devioe 02 int ErrorFlag 0 struct gads add 02 2 1st instrument has BIB primary address 02 and no seaondary address add O2 0 primad 2 _02 0 secad 1 add_02 1 primad 1 no 2nd instrument Pass Control to a...

Page 558: ...o grammed Returns err code is a variable through which error codes are returned If this vari ables set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The erro...

Page 559: ...the board identification number This is an integer in the range 0 to 3 and represents the board to be pro grammed mygads n contains the GPIB bus address of the deviceces to be confi gured mygads is a...

Page 560: ...bus device s ist individual status bit Refer to the Device s documentation for more information PRPI m is a 3 bit value which tells the device being configured which data bit CD101 through DIO8 it sho...

Page 561: ...t mmenab integer for parallel poll enabling Set up 1st instrument with primary address 1 hex l no secondary address add l O primad Oxl add l O secad 1 add l l primad 1 no 2nd instrument Configure Inst...

Page 562: ...and represents the board to be pro grammed mygads n contains the GPIB bus address of the device es to be dls abled mygads is a pointer to an array of n n can range from 1 to 15 struc tures of type gad...

Page 563: ...ill have one device 1 int ErrcrPlag atruot gad8 add 1 15 Sat up 1st instrument with GPIB primary address 1 BEX 1 and no secondary address add l O primad Oxl add l O mcad 1 add l l primad 1 no 2nd inst...

Page 564: ...the board identification number This is an integer in the range 0 to 3 and represents the board to be pro grammed err code is a variable through which error codes are returned If this vari ables set t...

Page 565: ...SRQ Address Status Change If this bit is set to 1 a change in address status has occurred i e a Talker becomes a Listener or a Peripheral becomes an Active Controller Controller in Charge If this bit...

Page 566: ...output data to the GPIB DNA DMA A DMA transfer is currently in progress err code is a variable through which error codes are returned If this vari le is set to 0 then no error occurred If it is set to...

Page 567: ...nteger in the range 0 to 3 and represents the board to be pro grammed mygads n contains the GPIB bus address of the devicefes to be put in the remote mode mygads is a pointer to an array of n n can ra...

Page 568: ...ess then those devices will also be addressed to listen so they will be put in remote 2 It is good programming practice to issue a Local Lockout to prevent the device s from being returned to Local mo...

Page 569: ...t Bit 7 6 5 4 3 2 1 0 DIOB rsv Dl06 Dl05 D104 Dl03 Dl02 DlOl Where DlO1 S Bits 1 through 8 of this device s Serial Poll Response Byte correspond to data lines DIOl DI08X ISV If this bit is 1 the KM 48...

Page 570: ...xample int Errorrlag 0 pend 0 Generate SEaQand Wait for Controller to Respond krequeat O CErrorPlag 64 printf wWait For Controller To Read SRQ n n do 1 kspoll 0 CErrorFlag no add Spend if Errorrlagg a...

Page 571: ...to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in Appendix G Programming 1 The KM 488 DD is reset to the following conditions Notes...

Page 572: ...in the range 0 to 3 and represents the board to be pro grammed err code is a variable through which error codes are returned If this vari able set to 0 then no error occurred If it is set to a value o...

Page 573: ...on with the ATN line asserted This indicates to the bus devices that the characters are to be interpreted as GPIB bus commands The command may be sent as either a quoted string e g COMEbAND 1or as a n...

Page 574: ...he device s to talk This integer ranges from 00 to 30 decimal Multiple listeners can be specified If addr is not specified all other devices on the GPIB BUS will be designated listeners DATA Sends inf...

Page 575: ...did occur The error codes are listed in Appendix G Programming 1 Notes 2 3 4 5 6 Typically KSEND is used to send commands to initiate communication directly between peripheral devices For example the...

Page 576: ...xample int ErrorP18g String To Listen Peripheral Devioe 02 And Talk Peripheral Device 12 chu talk_listen UNT UNL LISTEN 02 TALK 12 ksend 0 CErtorFlag talk listen strlen talk listen if ErrorRlag err_ha...

Page 577: ...s the GPIB bus address of the device es to be dis abled mygads is a pointer to an array of n n can range from 1 to 15 struc tures of type gads You must tailor mygads to your application mygads structu...

Page 578: ...unassert SRQ The string returned by KSTATUS or the integer status word set by KQUIKSTAT can be checked to determine the presence of an SRQ before a serial poll is conducted If only one device is asser...

Page 579: ...KQUIKSTAT call 3 If the KM 488 DD is the Active Controller and issues KSPOLL with mygads equal to no addr spr will be 64 if a device is asserting SRQ and 0 if not This same result could have been dete...

Page 580: ...ents the board to be pro grammed err code is a variable through which error codes are returned If this vari ables set to 0 then no error occurred If it is set to a value other than 0 then an error did...

Page 581: ...never a STATUS ts read This can be one of the following GO There has not been a change in the addressed status Gl There has bean a change in the addressed status 3 1 Current Indicates if the KM Xl DD...

Page 582: ...been received Tl A trigger command has been received w Indicates tf the IEEE Clear command has been received or not This is not updated during DMA CONTINUE transfers Cleared values are CO 1 f No Clear...

Page 583: ...andler int err num I For Status String Returned By STATUS Conmand I ohar at 75 integer to hold Errol coda returned by each CALL 0 false no error int ErrorFlag printf nError d Consult List In KbMSSDD E...

Page 584: ...ariable through which error codes are returned If this vari ables set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in Appendix G...

Page 585: ...board to be pro grammed term list is an integer array which defines the GPIB bus terminators See Chapter 6 for more information regarding the use of GPIB bus terminators terralist 41 is defined in th...

Page 586: ...Possible values are l OxFFFF Don t use second GPIB bus termina tor 0 to 255 Use this ASCII character as the sec ond GPIB bus terminator instead of the default second GPIB Terminator The 0 255 decimal...

Page 587: ...o EOI Without Termination Chataotets trrc lst Ol O change input and output termi natora trm lat l l 1 indioates assert EOI tnr_lst 21 1 1 indioates no 1st terminator tnn at 31 1 1 indicates no 2nd ter...

Page 588: ...urned If this vari able set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in Appendix G 1 To suppress Timeout checking set tval to...

Page 589: ...mygads n contains the GPIB bus address of the devicefes to be trig gered mygads is a pointer to an array of n n can range from 1 to 15 struc tures of type gads You must tailor mygads to your applicati...

Page 590: ...ress Group will have one devise 12 atruct gads add_l2 15 Address Structure For Meter With GPIB Address 12 adt l2 O primad 12 add_12 0 secad 1 add 12 1 primad 1 no 2nd instrument Trigger DMbl To Perfor...

Page 591: ...e through which error codes are returned If this vari able5 set to 0 then no error occurred If it is set to a value other than 0 then an error did occur The error codes are listed in Appendix G Progra...

Page 592: ...Using the Call Interface in C KM 488 DD Programming Guide This page intentionally left blank 11 72...

Page 593: ...ginal pur chaser Any product that is found to be defective within the warranty period will at the option of Keithley MetraByte be repaired or replaced This warranty does not apply to products damaged...

Page 594: ...l need your invoice num ber and the date the board was purchased Please reference the RMA number on any corre spondence regarding the board When returning the Board for repair please include the follo...

Page 595: ...4 NAK Not Acknowledge SYN Synchronous Idle ETB End of Trans Blank CAN Cancel EM End of Medium SUB Substitute ESC Escape ES File Separator GS Group Separator RS Record Separator US Unit Separator SP Sp...

Page 596: ...60 61 62 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 a KM 488 DD Programming Guide ASCII CHARACTER i e f i ii 1 m n 0 P 9 r S t U V W X Y I LeftZ...

Page 597: ...he same time our expectations on collecting saving and manipulating the results of measurements has escalated from writing down meter readings and hand calculations to automated storage of and complic...

Page 598: ...om the Institute for Electrical and Electronic Engineers B 1 TOPOLOGY An IEEE 488 system allows different manufacturers devices to be connected Systems can be connected following a star or linear type...

Page 599: ...ces can also be a talker or controller however only one of these functions can be performed at a time Talkers A Talker is any device which can transmit data over the bus when properly addressed Only o...

Page 600: ...The System Controller has the unique ability to retrieve active control of the bus or to enable devices to be remotely programmed It takes control of the bus by issuing an IFC Interface Clear message...

Page 601: ...ependent Commands They are discussed extensively in section 8 4 Control Lines The control Lines perform a variety of control request and coordinating functions which assure the orderly flow of informa...

Page 602: ...REN Remote Enable If this tine Is asscrted bus devices can bc programmed via IEEE bus commands issued from an active talker IIis line can only be asserted by the System Control ler SRQ Service Request...

Page 603: ...e Appendix B IEEE 488Tutorial Section 8 4 describes the use of the handshaking lines Figures B 3 and B 4 illustrate the Handshaking Sequence NDACACCEPTOR i i I III I I 1to 11 12 Figure B 3 I II I 0 14...

Page 604: ...Appendix B IEEE 488Tutorial KM 488 DD Programming Guide Figure B 4 Transmission ofData from Talker to Listener B 8...

Page 605: ...AC lines and controlling the DIO lines and DAV as described above In terms of the codes of Appendix D they must have SHl capability Devices listed as SHOcannot act as sources Likewise all devices whic...

Page 606: ...this section System Initialization When a typical IEEE 488 system is initialized there will be one device which will be the Sys tem Controller The SystemController will usually assert the Interface Cl...

Page 607: ...te complete capability Addressing u Device Devices are addressed by the Active Controller issuing multiline interface messages from either the talk address group TAG or listen address group LAG as des...

Page 608: ...Receiving Data Device Commands Data Device Commands is a message which is sent over the bus with ATN unasserted For example a multimeter might send the results of several readings to a printer or disp...

Page 609: ...Usually devices provide some flexibility in the terminators they support By means of switches or programming one can choose whether or not termination will be used and if so whether termination charac...

Page 610: ...d in order to determine the status information If a device has asserted SRQ it must be polled before it will release SRQ At the end of a serial poll the controller will issue the serial poll disable S...

Page 611: ...in controller C codes support parallel poll B 5 BUSINTERfACE COMMANDS Bus commands are issued by the Active Controller There are five types of bus commands Universal Listen Address Group LAG Talk Addr...

Page 612: ...specified device to be an active taker Only one device can be an active talker at a time The message contains the primary address 0 to 30 of the device which is to talk This address consists of a pri...

Page 613: ...ands These commands are issued by the Active Controller and affect only those devices which have been properly addressed Not all devices support these commands In order to issue an Addressed Command t...

Page 614: ...to pass control to another controller on the system The second controller then becomes the controller Secondary Commands Secondary commands are sent immediately following a PI C Parallel Poll Configur...

Page 615: ...a parallel poll is conducted Setting the 4th lowest bit of the PPE command tells the device to assert its assigned line when service is required while setting the 4th lowest bit low will cause the de...

Page 616: ...488Tutorial KM 48 l DD Programming Guide Standard Commands for Programmable instruments Manual This document is available from SCPI Consortium 8380 Hercules Drive Suite I 3 La Mesa California 92042 61...

Page 617: ...KM 488 DD Programming Guide Appendix C IEEEMultiline Commands IEEEMULTILINECOMMANDS CG CG LAG t C l...

Page 618: ......

Page 619: ...iption OtherFunction Subsets Reouired SHO NOW3 SH1 Tl TB TEl TEB orC5 C26 TFunction Allowable W ldentilication Description TO T Basic P Talk Talker Only Mode N N N Y Unaddress il MLA OtherFunction Sub...

Page 620: ...H1 N N SHi andAH1 Y Y SHl andLl L4 orLEl LE4 N Y SHl andLl L4 orLEl LE4 Y Y SHl andLl L4 orLEl LE4 N Y SHl andLl L4orLEl LE4 RL Fmcfion Al avable Subsets OtherFunction Subsets Required NOIM Ll L4 orLE...

Page 621: ...Y N N AH1 Y Y Y AH1andTl T6 orTEl TEB Y N Y AH1andTl T6 orTEl TEE L Function wfihAddress Extension Allowable Subsets ldentilication Description OtherFunction SubsetsRequired Basic Listen Unaddress Lis...

Page 622: ......

Page 623: ...second LI TZ etc A logical deviceis a device which is currently configured to receive the data to be printed Logical devices are represented using a colon for example Lml This would indicate the devi...

Page 624: ...ample you might specify the device IEEE2022 LPTn identifies a physical printer port where n is the printer port number i e LPTl A Hioaddr is a requried parameter which follows the nl parameter It spec...

Page 625: ...les These examples assume that your PC has two functioning LPT ports KMLPT IEEE05 A H2El KMLPT LPTl IEEE05 A H2El KMLPT IEEE05 IEEE1201 A H2El Configures LPTI for output to IEEE device 05 on an interf...

Page 626: ...r until subsequent drivers are unloaded The IFC message is sent when the driver loads SERIALPORTRE DIRECTION Serial Port re direction is accomplished in the same manner as Parallel Port re direction T...

Page 627: ...is is a primary address with a secondary address ss if needed For example you might specify the device IEEE2022 COM port devices are denoted as COMn where COMn identifies a physical printer port where...

Page 628: ...lotter If for example a file such as corn1 dat is specified the pro gram will act as if it were writing the data to a genuine file However the output will really be sent to the IEEE bus device to whic...

Page 629: ...E05 COM2 IEEE1201 COM3 COMl COM4 COM2 Resulting GPIB Bus Activity When the KMCOM changes from one GPIB bus address to another the GPIB activity will occur as follows On a Wrik REN is asserted followed...

Page 630: ...when the driver loads APPLICATION NOTES You may encounter several problems which attempting to send plotter files to your GPIB plotter For example Direct 0 toutto I O ports can be a problem because m...

Page 631: ...n the program searching the DOS device driver list and finding a matching device name If this happens the application may refuse to create a file with the same name as a device If all else fails creat...

Page 632: ...Appendix E Printer and Serial Port Re Direction KM 48 l DD Programming Guide This page intentionally left blank E 10...

Page 633: ...T File The CONFIG DATfile is generated by the SETUP or CONFIG programs It must be piped into the KM 488 DD driver file when the driver is loaded This process is explained further in Chapter 2 To pipe...

Page 634: ...Appendix F The CONFIG DAT FILE KM 488 DD Programming Guide F 2...

Page 635: ...KM 488 DD Programmlng Guide Appendix F The CONFIG DAT File F 3...

Page 636: ...yd l Spdfy FEZ COKHNNT l COmNT t t tttt t t t t ttt t tt tt t CONNEAT CONFIG c Am 1 ID1 COhxENT CO NT t t t t t t t ttt t t CONnNNT l COmmNT h DNA Ia d CONmNT f CONmNP PURPOSE speoi y The DMA La d Use...

Page 637: ...MNNI IN oll o12 Ch r ot r oll d 12 tog her ma EOL l CONKENT CONNZNT her oll nd 12 r on of th fcll ing CONNNNTl CONMENT nnn LS LSCTl Ch r at e n 0 n 25 5 COWtENT l X Pri t l ASCII ch Z 0t r x CONNNNP l...

Page 638: ...k 1 XXXI Ch z Ot Z x CONMENT l CR carri g Faturn 13 oeoim1 COMXNNT LF I F d 10 D dtn 1 COMXENT COblkENT SPECIAL v ing IT 1n t s d Of IT 8 b Input txm Only CONDNT l o ing fro 1 t Of IT at Output tnn o...

Page 639: ...v a i n clo i ti g of UP to ight h r ot r CONXNNT l m iir t ai2 r ot r m t not im 1 digit t CO NT CONMNNT l ddr th d via CPIB ddr in th form xxyy CONt XNT l h e CONMNNT COMMNNT x i in the rrng 00 30...

Page 640: ......

Page 641: ...ses a 64 KBYTE page boundary TIME OUT ERROR ON DATA READ Expected bus data was not received within the TIME OUT INVALID CHANNEL FORDMA DMA transfer requested but the KM 488 DD was not configured TIME...

Page 642: ...DD without reading back a response to the previous command Internal System Error Report to Factory SeeSection 12 2 Internal System Error Report to FactorySee Section 12 2 Internal System Error Report...

Page 643: ...T BE 0 THROUGH 15 The response parameter has a NOT A PERIPHERAL The KM 488 DD must be a factory SeeSection 12 2 SYSTEM ERROR INVALID TIMER SYSTEM ERROR TIMER INTS ALREADY OFF ADDRESS REQU1PJ D Interna...

Page 644: ...which cannot be INVALID PRIMARY ADDRESS INVALID SECONDARY ADDRESS GPIB primary bus addresses must be in the range of 0 to 30 GPIB secondary bus addresses must be in the range of 0 to 31 NOT ADDRESSED...

Page 645: ...m OR LISTEN mand is a SEND command speci fied the controller s own address Use MTA or MLA instead TIMEOUT ON COMblAND A Time out error occurred dur ing a SEND CMD SPECIFIED BOARD BAS NOT BEEN INITIALI...

Page 646: ......

Page 647: ...ssage display kfill board nr err code fill sw Defines response If no data is available khellotbaard nr err code id response ReadsKhUS8 DD identification string klocal hoard nr en code mygads klol baar...

Page 648: ...en Sends low level bus commands and data kapollfboard nr en code spr mygads ketatusfboardnr en code stat katopfboard nr en code ktcrmfboudnr err code tmt list ktofbwardnr em code hvd ktriggerfboard nr...

Page 649: ...ated device s Resetsthe KM 4tWDD to its defaults Disables a lightpen interrupt condition s Define DMA transfer mode Read data from a bus device Readsdata from a bus device into a buffer Sets the langu...

Page 650: ...I DESCRlPTlON Readsresponse s to serial poll Returns K 4 DD status string STOP TBRM dir fcml term2 EOI TIME OUT ITUGGER add ddr WAIT Stops DMA transfers Sets the GPIB bus terminators sets timeout ela...

Page 651: ...KM 48t3 DD Programming Guide GPIB System Configuration Worksheet GPIB SYSTEMCONFIGURATION WORKSHEET KM 488 DDs TERMINATOR DEFAULTS 1 1 i...

Page 652: ...GPIB System Configuration Worksheet KM 488 DD Programming Guide DEVICES...

Reviews: