background image

PCLS-848-P

IEEE-488 INTERFACE CARD

PASCA SUPPORT PACKAGE

USER'S MANUAL

Summary of Contents for PCLS-848-P

Page 1: ...PCLS 848 P IEEE 488 INTERFACE CARD PASCA SUPPORT PACKAGE USER S MANUAL...

Page 2: ...anslated or transmitted in any form or by any means without the prior written permission of Advantech Co Ltd Information provided in this manual is intended to be accurate and reliable However Advante...

Page 3: ...the Card into a PC 10 2 3 3 Function Check 11 CHAVIJER 3 PROGRAM NGREFERENCE 15 3 1 Introduction 15 3 2 Using the IEEE 488 Drivers for Microsoft Pascal 16 3 3 Using the IEEE 488 Drivers for Turbo Pas...

Page 4: ...ntroduction 75 7 2 Block Diagram Description 75 CHAPTER 8 TROUBLE SHOOTING 79 8 1 Introduction 79 8 2 Periodic Maintenance 79 8 3 Troubleshooting Procedure 79 8 4 Part Iist 81 CHAPTER 9 BUS TUTORIAL 8...

Page 5: ...CHAPTER 12 SUMMARYOF PROCEDURES AND FUNCIIONS 97 12 1 IEEE488 Procedures for hlicrosoft Pascal 97 12 2 IEEE 488 Procedures for Turbo Pascal 99...

Page 6: ...Figures Figuree 7 1 PCL 848A B Block Diagram 77...

Page 7: ...you to interface your PC to the IEEE 488 bus The software is packaged in read only memory firmware and on a diskette to provide versatile and easy to use IEEE 488 procedures for your Pascal language F...

Page 8: ...nsure the compatibility to very high speed PC s PCL 848A offers the connectors of the IEEE 488 standard while PCL 848B uses the 25 pin D type connectors for the IEC 625 standard Each device on the IEE...

Page 9: ...w the procedures are used in typical applica tions and also provide you with useful program examples for your own applications If you want to know more details about this IEEE 488 interface card pleas...

Page 10: ...4 PCLS 848 P User s Manual...

Page 11: ...is any damage to the unit or it fails to meet specifications notify your local sales representative immediately 2 2 Switch and Jumper Setting This IEEE 488 interface card has two DIP switch SW1 and S...

Page 12: ...ess The digital output port takes the addresses of BASE 0 and BASE 1 and the IEEE 488 interface takes the addresses from BASE 8 to BASE 15 When using the IEEE 488 gt driver routines the IEEE 488 inter...

Page 13: ...y setting is hex D000 The range of these locations is out of the 640K system memory of the IBM PC PC XT and PC AT However choice of this location must be made to avoid any conflict with other interfac...

Page 14: ...starting address 2 2 3 Operating Mode Setting SW3 is a slide switch to select the operating mode When it is set to A this card is compatible with the easy to use PCL 748 IEEE 488 interface card excep...

Page 15: ...PCL 848A B is designed to permit access to interrupt level 2 up to level 7 and the interrupt is initiated by the NEC7210 GP interface controller The selection is made by setting JP3 Note Although the...

Page 16: ...rn the system unit so the back of the unit faces you 3 Remove the system unit cover See your computer user s guide if necessary 4 Locate the expansion slots at the rear of the unit and choose any unus...

Page 17: ...isted after the test steps 1 Connect the HP3478A DVM to the IEEE 488 bus connector of this card on the back of the PC with a standard IEEE 488 cable On the PCL 848B the connector is 25 pin D type defi...

Page 18: ...d by other add on cards Remove these cards if you can Otherwise change the DIP switch SW1 and the program for a new address such as hex 2A0 Contact your local sales representative for further assistan...

Page 19: ...input output I TBPGPIB INC var outstr instr str addr i ioport myaddr setting integer begin addr 23 ioport 2B8 myaddr 21 setting 0 ieinit ioport myaddr setting outstr FlTlNSRA ieoutput addr outstr for...

Page 20: ...14 PCLS 848 P User s Manual...

Page 21: ...IEEE 488 BUS similar to the way readln instring waits for a keyboard entry to assign to the string variable icinit clears the interface and sets up specific operating modes on the interface card as th...

Page 22: ...fault of SW2 setting is for segment hex D000 In most cases this setting is all right for operation Keep this setting unless another add on card occupies this memory space and cannot be changed Each IE...

Page 23: ...e ieenter addr integer var instr lstring extern L procedure ieabort extern procedure ieeol addr outeol integer var outeolstr lstring ineol ineolb integer extern procedure iedevclr addr integer extern...

Page 24: ...can put the needed definitions into the program or use the statement I TBPGPIB INC to get all the definitions in a single line The procedures are defined as ieabort iedevclr iedevice ieenter ieentera...

Page 25: ...abort begin inline 9A 09 04 00 DO end call D000 0409 procedure ieeol addr outeol integer var outeolstr lstring ineol ineolb integer begin inline 9A 0C 04 00 DO end call D000 040C procedure iedevclr ad...

Page 26: ...integer begin inline 9A 33 04 00 DO end call D000 0433 procedure ieouta addr dataseg datalen integer begin inline 9A 36 04 00 DO end call D000 0436 procedure iedevice addr portno integer begin inline...

Page 27: ...IPTION This procedure aborts all activities on the interface bus by pulsing the IFC line BUS ACTIVITY IFC is pulsed for 100 microseconds REN is set true ATN is set false CAUTION This procedure can be...

Page 28: ...lective Device Clear to the device specified Otherwise it executes a Device Clear to the bus DESCRIPTION This procedure sends a Selective Device Clear SDC command to a specified device or sends a Devi...

Page 29: ...ddr 30 the replacement of LPTn or COMn is disabled portno integer The port number which is to be replaced with the IEEE 488 device 1 assigned to LPT1 2 assigned to LPT2 3 assigned to LPT3 4 assigned t...

Page 30: ...data string entered DESCRIPTION This procedure enters a string from a device or from the interface Reading is terminated upon receiving the terminator specified by the EOL command or the maximum leng...

Page 31: ...be put The starting address offset is 0 maxlen integer The maximum input string length The range is from 0 to 65535 DESCRIPTION This procedure enters a long string can be up to 65535 bytes from a spec...

Page 32: ...26 PCLS 848 P User s Manual If addr 0 or addr 30 ATN is set false String is entered...

Page 33: ...o ocolstr 2 Terminated with oeolstr only No EOI Oeolstr lstring The EOL string which is to be sent following the output strings The string can be 8 character long at maximum The default string is deci...

Page 34: ...s Manual DESCRIPTION This procedure sets the terminators of input and output strings for the specified device The terminators of all devices are set to default values if this procedure is not called...

Page 35: ...ult value is hex 2B8 myaddr integer IEEE 488 address of the interface card The range is from 0 to 30 The default value is 21 setting integer An integer 16 bit to set the DMA IRQ and other parameters T...

Page 36: ...myaddr 21 setting 16X20 or 20 for Turbo Pascal bit 5 1 ieinit ioport myaddr setting 2 Set operation mode to System controller IRQ7 DMA1 Bus address is 0 I O port address is 0x3C8 Hex ioport myaddr set...

Page 37: ...CHAPTER 2 INSTALLATION 31 ieinit ioport myaddr setting...

Page 38: ...o Local Lockout LLO SYNTAX iello DESCRIPTION This procedure execUtes a Local Lockout LLO to disable a device s front panel It is received by all devices on the bus whether or not they are addressed to...

Page 39: ...then it executes a Go To Local GTL command to the specified device Otherwise it sets the REN line false High DESCRIPTION This procedure executes a Go To Local GTL or clears the REN line to enable a d...

Page 40: ...r lstring Data string to be output DESCRIPTION This procedure outputs a string to the specified device or to the interface bus After the string is sent the terminator specified by the procedure iecol...

Page 41: ...address offset is 0 length integer The output string length The range is from 0 to 65535 DESCRIPTION This procedure outputs a long string can be up to 65535 bytes to a specified device or to the inter...

Page 42: ...36 PCLS 848 P User s Manual If addr 0 or addr 30 ATN is set false Long string is sent...

Page 43: ...parallel poll response of the devices of the interface bus DESCRIPTION This procedure conducts a parallel poll of the interface bus It returns the value 0 255 of an eight bit byte representing the res...

Page 44: ...ine to respond Bits 4 15 are not used DESCRIPTION This procedure performs a Parallel Poll Configure In prepa ration for a parallel poll command it enables you to tell a device how to respond to the pa...

Page 45: ...CHAPTER 2 INSTALLATION 39 BUS ACTIVITY If O addr 30 ATN is set true UNL is sent LAD is sent MTA is sent PPC is sent PPE is sent If ADDR 0 or ADDR 30 ATN is set true PPC is sent PPE is sent...

Page 46: ...is 3 unconfigured Otherwise all the devices are unconfigured DESCRIPTION This procedure executes a Parallel Poll Unconfigure It directs a device to not respond to a parallel poll It can be addressed...

Page 47: ...0 addr 30 the specified device is set to remote Otherwise just the REN line is set true DESCRIPTION This procedure places a device in Remote Mode It can be addressed to a specific device or to the int...

Page 48: ...cedure SYNTAX ieseg firmseg firmseg word The memory segment of the firmware location DESCRIPTION This procedure defines the memory segment where the firmware is located This location is determined by...

Page 49: ...PE TCT MrA MTA IFC CMD LLO SEC EOI Example cmdstr UNL UNT MTA LISTEN 9 10 SEC 3 DATA See Section 6 4 for additional information DESCRIPTION This procedure sends user specffied IEEE 488 Interface comma...

Page 50: ...se 21 15P The following commands take some actions other than sending characters LISTEN Take following values as listener address TALK Take following values as talker address DATA Set ATN false EOI Se...

Page 51: ...er An integer with the value 0 255 of an eight bit byte represent ing the status of the device specified DESCRIPTION This procedure conducts a serial poll of the interface bus It returns the value 0 2...

Page 52: ...7 8 Error Number of last called command 9 Count of string bytes that are output or entered 10 Timeout interval in milliseconds 11 I O port address of NEC7210 12 DMA IRQ setting RETURN VALUE s integer...

Page 53: ...CHAPTER 2 INSTALLATION 47 Error Number Error Type 0 No error 1 Handshake timeout 2 Interface error 3 Call ABORT when non system controller 4 Invalid passed parameter s...

Page 54: ...timeout period When the bus handshake is stuck the called VO procedure will terminate at the time specified and the timeout flag will be set BUS ACTIVITY None CAUTION 1 The unit of the timeout period...

Page 55: ...red If 0 addr 30 the specified device is triggered Otherwise all the listeners of the bus are triggered DESCRIPTION This procedure sends a Group Execute Trigger GET to a device or to the interface bus...

Page 56: ...50 PCLS 848 P User s Manual...

Page 57: ...t output INCLUDE MSPGPIB INC Procedure iochk var errno origin 16YDCoo l6 2olA integer begin writeln case errno of 0 writeln Data transferredl 1 writeln uandshake timeout otherwise writeln Interface Er...

Page 58: ...again yin readln s writeln until s n end var sel i integer begin ieseg 16 D000 ieinit 16 2B8 21 0 ietimout 30000 repeat ioabort for i 1 to 24 do writeln clear screen writeln IEEE 488 Interface Demo P...

Page 59: ...errno integer absolute D000 201A begin writeln case errno of 0 writeln Data transferredt 1 writeln Handshake timeouti else writeln Interface Errorl end writeln end procedure outputdata var addr length...

Page 60: ...rite Enter data again y n read s writeln until s n end var sel integer begin ieinit S2B8 21 0 repeat ieabort clrscr writeln Demo Program for the IEEE 488 Interface writeln 1 OUTPUT DATA writeln writel...

Page 61: ...tring 255 PRINTER text begin ieseg 16 D000 icinit l6Y2B8 2l o Enter the IEEE 488 bus printer address addr 1 while addr 0 or addr 30 do begin write Enter the GP IB printer address 7 readln addr writeln...

Page 62: ...no integer s char outstr lstring begin ieinit 2B8 21 0 Enter the IEEE 488 bus printer address addr l while addr O or addr 30 do begin write Enter the GP IB printer address read addr writeln end portno...

Page 63: ...anguage Microsoft Pascal Program example3 input output INCLUDE MSPGPIB INC Procedure iochk I O error check routine var errno origin 16 D000 16 201A integer begin case errno of O 1 writeln TIME OUTi ot...

Page 64: ...47RA DMM If another model of voltmeter is used please check the operating manual and make necessary modifi cation to this program Language Microsoft Pascal Program example3 input output I TBPGPIB INC...

Page 65: ...Measurement start for i 1 to 10 do begin ietrig addr Trigger the DVM instr ieenter addr instr Enter DVM reading iochk Error check if instrtl then delete instr 1 1 val instr v code writeln i 4 v 4 7 VO...

Page 66: ...ADS00 has an address of 9 and HP3478A has an address of 23 Language Microsoft Pascal Program example4 input output INCLUDE MSPGPIB INC Procedure iochk I O error check routine var errno origin 16 DOoo...

Page 67: ...ag encode chstr i outstr DW0 concat outstr chstr ieoutput adS00 outstr Close ch I iochk for k 1 to 100 do dum dum Relay operation delay ietrig hp3478 Trigger the DVM ieenter hp3478 instr Enter DVM rea...

Page 68: ...s an address of 9 and BP3478A has an address of 23 Language Turbo Pascal Program example4 input output I TBPGPIB INC Procedure iochk I O error check routine var errno integer absolute D000 201A begin...

Page 69: ...ut adSOO outstr Close ch I iochk for k 1 to 100 do k k Relay operation delay ietrig hp3478 Trigger the DVM instr ieenter hp3478 instr Enter DVM reading iochk Error check if instr 1 then delete instr 1...

Page 70: ...Language Microsoft Pascal Program exampleS input output SINCBUDE MSPGPIB INC Procedure iochk I O error check routine var errno origin 16lD000 161201A integer begin case errno of 0 1 writeln TIME OUTII...

Page 71: ...he same time to make the measurement simultaneously Remark This program is written for the DP3478A DMN If another model of voltmeter is used please check the operating manual and make necessary modifi...

Page 72: ...r Send DVM 12 setting string iochk Error check Measurement start cmdstr UNL UNT MTA LISTEN 23 24 GET for i 1 to 10 do begin iesend cmdstr Trigger the DVM s instrl ieenter dvml instrl Enter DVM 1 readi...

Page 73: ...ility to continuously transmit or receive data blocks of up to 64K bytes without processor overhead These features can significantly improve system performance in applications where high speed transfe...

Page 74: ...e four possible DMA channels Channel O is used by the PC s memory refresh controller so channels 1 2 and 3 are the only ones available to the peripherals Bit O and 1 of setting of ieinit procedure mak...

Page 75: ...CKGROUNDoperation When data transfer is timing related with the software background operation cannot be used The IEEE 488 interface DMA is quite transparent to users Once you select the DMA mode by ca...

Page 76: ...he PC may be hung For factor 2 the interface software routine is written with a lot of effort to maximize execution speed by handling the overhead effectively For factor 3 the NEC7210 was chosen becau...

Page 77: ...er 2 of NEC7210 to clear the SRQ bit The port address is default to 2BAHex 5 4 More about the Procedure iesend The iesend procedure allows the user to control the IEEE 488 interface directly Therefore...

Page 78: ...ntermittently fails to execute this code you are l having a timing problem To avoid this put the data from datastr in cmdstr after the DATAstatement cmdstr UNL UNT MTA LISTEN 23 SEC 03 DATA chr 39 ABC...

Page 79: ...D O low byte D07 D06 D05 D04 D03 D02 DOl DOO BASE 1 D7 D6 D5 D4 D3 D2 Dl DO write port D O high byte D015 D014 D013 D012 DO11 DO10 DO9 D08 It is fairly straight forward to use your PCL 848A B digital...

Page 80: ...74 PCLS 848 P User s Manual...

Page 81: ...hen transparently passes the data string to or from the bus device All of the major elements of this card are interconnected by the data bus of the PC Bus When an IEEE 488 bus driver is called the CPU...

Page 82: ...ce controller chip and the chip will handshake the byte out to the bus via the IEEE 488 bus driver receiver When entering data from a bus device the driver routine sets the IEEE 488 rnterface controll...

Page 83: ...CHAPTER 7 THEORY OF OPERATION 77 Figuree 7 1 PCL 848A B Block Diagram...

Page 84: ...78 PCLS 848 P User s Manual...

Page 85: ...and the golden fingers for the PC I O slot should be cleaned to prevent wax and dirt build up Spray the contacts lightly with a good contact cleaner such as trichlorethIyene and use a cotton swab to r...

Page 86: ...re or I O address set or I O address settings conflict with tings other add on cards Instrument does not Wrong instrument Instrument address response address setting Bad bus connections Check bus data...

Page 87: ...ad capacitors C3 C4 21 0 1 microfarad capacitors C7 C25 C5 1 15 picofarad capacitor C6 1 10 picofarad capacitor R2 R7 1 4 7 Kohm resistor R3 R4 3 33 Kohm resistors R5 R6 1 150 Kohm resistor 52P1 1 4 7...

Page 88: ...74LS273 U6 U8 U14 3 74LS245 U91 1 6K SRAM 150ns NEC4016C 3 or Equ U10 1 64K EPROM 150ns NEC2764 or Equ U11 1 GPIB Interface Controller NEC NEC7210C U12 1 SN75160 TI or NS U13 1 SN75162 TI or NS U15 1...

Page 89: ...used to transmit data and the remaining eight are used for communication timing and control Data is transmitted on the eight data lines as a series of eight bit characters referred to as bytes Normal...

Page 90: ...An IEEE 488 bus has 24 lines including 7 ground return lines and one shield line The 16 lines with signals are 8 data lines 3 hand shake lines and 5 management lines 9 2 1 IEEE 488 Connector Pin Assi...

Page 91: ...er include 1 Talk Address A byte transmitted by the controller enables a specified device to talk Only one device can be the talker at a time When a new talker is assigned the old one is disabled 2 Li...

Page 92: ...of the devices Universal DCL DC4 14 Device Clear All devices are set to a known state Universal PPU NAK 15 Parallel Poll Unconfigure Universal SPE CAN 18 Serial Poll Enable Universal SPD EM 19 Serial...

Page 93: ...quested by this device 4 For each device that has requested service the controller takes appropriate action 5 When all devices have been polled the controller terminates the serial poll mode by issuin...

Page 94: ...In data mode there are no specific code assignments and data strings are recognized by the devices which receive the data The set of codes labeled Primary Command Group are the codes commonly used to...

Page 95: ...CHAPTER 7 THEORY OF OPERATION 89...

Page 96: ...ed Data transfer rate is determined by the slowest active device 3 Multiple devices can accept data at the same time The following definitions are used when discussing IEEE 488 bus 1 SOURCE A device s...

Page 97: ...CHAPTER 7 THEORY OF OPERATION 91 Handshake Timing Sequence...

Page 98: ...9 10 Bus Operating Considerations When a device is powered on during system operation it may activate IFC and cause the active controller on the bus to halt with an error The controller must send IFC...

Page 99: ...00 0C 12 0101100 2C 44 LA12 CR 0001101 0D 13 0101101 2D 45 LA13 SO 0001110 0E 14 0101110 2E 46 LA14 SI 0001111 0F 15 0101111 2F 47 LA15 DLE 0010000 10 16 0 0110000 30 48 LA16 DC1 0010001 11 17 LLO 1 0...

Page 100: ...SC12 M 1001101 4D 77 TA13 m 1101101 6D 109 SC13 N 1001110 4E 78 TA14 n 1101110 6E 110 SC14 O 1001111 4F 79 TA1S 0 1101111 6F 111 SC1S P 1010000 50 80 TA16 p 1110000 70 112 SC16 Q 1010001 51 81 TA17 q...

Page 101: ...PT7 CPT6 CPT5 CPT4 CPT3 CPT2 CPT1 CPT0 Through 6 Address 0 X DT0 DL0 AD50 AD40 AD30 AD20 AD10 7 Address 1 EOI DT1 DL1 AD51 AD41 AD31 AD21 AD11 Write Register Bit Contents 7 6 5 4 3 2 1 0 0 Byte Out BO...

Page 102: ...96 PCLS 848 P User s Manual...

Page 103: ...long string from a device ieeol addr outeol oeolstr ineol ineolb Sets the terminators of input and output string of a device ieinit ioport myaddr setting Initializes the interface and sets parameters...

Page 104: ...nd Parameters Activity iesend cmdstr Sends the IEEE 488 mnemonics commands to the bus p iespoll addr Serial Poll p iestatus cond Reads the status of thet interface ietimout tout Sets timeout interval...

Page 105: ...olstr ineol ineolb Sets the terminators of input and output string of a device icinit ioport myaddr setting Initializes the interface and sets parameters iello Local Lockout ielocal addr Sets a device...

Page 106: ...User s Manual Procedures and Parameters Activity iespoll addr response Serial Poll iestatus cond status Reads the status of the interface ietimout tout Sets timeout interval ietrig addr Triggers a dev...

Reviews: