Home

2801.5KB

image

Contents

1. M 39 GPIB National Instruments LabView Beispiel s eenes 43 GPIB Lotus Notes 44 GPIB Borland Delphi 50 Das GPIB 54 Funktionsprototypen f r Delphi und Vb 55 Kapitel VII GPIB 1 Device Treiber MS DOS 56 Installation Hall 56 57 Beispiele IM ME M MU 58 Programmierbeispiel in 59 Programmierbeispiele in 60 Programmierbeispiele in 61 62 Kunden Support und Hilfe sise 62 Technisches Support Formular siennes 65 Hardware und Software Konfigurationsformular nc 67 Dokumentations Formular uunnserseennnennnnnnnennnnnnnnnnnnnnnnnnnnnnnennnnnnnnnnnnnnnnnnnnn nennen nennen 69 Warenzeichen uirtute EIL 70 a BB o QUANCOM Informationssysteme GmbH QUANCOM 1 berblick INFORMATIONSSYSTEME 1 1 Einfuhrung Herzlichen Gl ckwunsch zum Kauf Ihrer QUANCOM Me technik Karte Sie sind nun stolzer Besitzer einer modernen MeB Steuer Regelkarte die den neusten Stand der Technik darstellt und deren Eigenschaften u
2. 3 PEIGPIB Rey b p 4 Karten bersicht 1 EE 4 Technische Daten MERNO a naaa EDOS EE svapcaccesuvesuacessusascueveverstaecsdedouvosunanesussnonceaverstacerdesodbessoanssuvanonssverstasevscsbee 4 Einstellung der Moduladresse mit dem 5 Wahl zwischen dem und dem Memory Modus Dipschalter 4 5 elici mE LUDERE 6 aee RC 6 6 Bu 19 MEM 7 USBGPIB REY 4 5 E 8 TS MM 8 Technische Daten 8 USBGPIB 1 Rev 9 Abbildung USBGPIB 1 uuneeessssnenannnnnnnnunnnnnnnnunnnnnnnnnnnnnunnnunnnnunnunnnnnunnnnnnnnnnnnnnnnnunnnnnnnunnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnennnen 9 Technische Daten m 9 GPa mecnm 10 Technische Daten 10 5151 annn 11 JP1 Adre jumper f r 1 0 Belegung 11 Andes 11 BIHnesngg de 12 EID DC E 13 Steckerbelegung USBGPIB1 PCIGPIB1 und GPIB 1 esee 14 Konzept iine IEIUNII niu cee 15 Installationsverfahren 16 Systemvoraussetz
3. QAPIExtSpecial handle JOB_LLO 1 NULL if result 0 then begin writeln Command LLO failed n end Send GET to device 3 result QAPIExtSpecial handle JOB_GET 3 NULL if result 0 then begin writeln Command GET failed n end Send SDC to device 3 result QAPIExtSpecial handle JOB_SDC 3 NULL if result 0 then begin writeln Command SDC failed n end Send GTL to device 3 result QAPIExtSpecial handle JOB_GTL 3 NULL if result 0 then begin writeln Command GTL failed n end QAPIExtCloseCard handle end QUANCOM Informationssysteme GmbH 53 54 6 6 Das GPIB Test Programm Uber das Mend Start Programme QLIB 32 Bit Program PCIGPIB ISA GPIB 1 and USBGPIB Controller k nnen Sie das Testprogramm starten mit dem die Karte getestet werden kann Dieses Tool befindet sich nur im Men wenn auch die Beispielprogramme mitinstalliert wurden Den Quelltext f r dieses Beispielprogramm finden Sie im Ordner d program files quancom qlib32 samples gpib vb QUANCOM Informationssysteme GmbH 6 7 Funktionsprototypen fur Delphi und Vb Parameter ULONG ULONG cardhandle ULONG device char buffer ULONG chars ULONG mode cardhandle Gibt das Handle einer ge ffneten Karte an device Gibt das Ger t auf dem Bus an Auf dem GPIB Bus ist dieses die Talkeradresse des sendenden Ger tes buffer Zeiger auf dem Schreibepuffer der den zu
4. Auch wahrend des Betriebs k nnen die Parameter der Karte verandert werden Hierzu dient das oben beschriebene Kommandozeichen Seine Voreinstellung ist das Semikolon Um nun die Parameter zu verandern muB direkt nach dem Offnen als erstes Zeichen das Kommandozeichen bertragen werden Nun folgen die Parameter die geandert werden sollen anschlieBend ein Semikolon und dann die zu Ubertragenden Daten 10 OPEN GPIB FOR OUTPUT AS 1 20 PRINT 1 d0e TOVITI 30 CLOSE 1 Zeile 10 weist der GPIB Controllerkarte den Ausgabestream 1 zu Sie kann nun wie eine Datei angesprochen werden Der Ausgabebefehl in Zeile 20 adressiert nun zunachst das Gerat mit der Adresse Oe als Listener und gibt TOV1T1 als Daten aus Der Befehl PRINT gibt im Anschlu an die Daten automatisch noch ein CR aus das als voreingestellte Endekennung die Ubertragung der Daten ausl st In Zeile 30 wird der Ausgabestream 1 geschlossen Auch das Einlesen von Daten ist ber den Device Treiber m glich 10 OPEN GPIB FOR INPUT AS 1 20 INPUT 1 30 PRINT AS 40 CLOSE 1 Zun chst wird in Zeile 10 der GPIB Controllerkarte der Eingabestream 1 zugewiesen In Zeile 20 werden nun die anstehenden Daten eingelesen und in Zeile 30 auf dem Bildschirm ausgegeben In Zeile 40 wird der Eingabestream 1 geschlossen QUANCOM Informationssysteme GmbH 59 60 7 3 Programmierbeispiele in C QUANCOM Informationssysteme GmbH Bil 7 4 Programmierbeispiele in PASCA
5. COPY D PRODUKTE GPIB GPIB1 DOS_BSP DEVDRV GPIB_DRV SYS Sollten Sie Probleme haben so schlagen Sie bitte im MS DOS Benutzerhandbuch nach 3 Nun mu der Treiber aktiviert werden Dazu m ssen Sie in der CONFIG SYS die Zeile DEVICE C GPIB_DRV SYS erg nzen Sie k nnen dies unter Verwendung des MS DOS Editors tun Geben Sie dazu EDIT C CONFIG SYS ein 4 Bewegen Sie mit den Pfeiltasten den Cursor an das Ende der Datei und f gen Sie ein DEVICEZCAGPIB DRV SYS 5 Wahlen Sie im Dateimen den Befehl Speichern und anschlieBend den Befehl Ende 6 Um den Treiber einsetzen zu k nnen m ssen Sie nun Ihren Rechner neu starten QUANCOM Informationssysteme GmbH 7 1 1 Kommandoparameter F r die weitere Steuerung des Device Treibers stehen Ihnen die folgenden Parameter zur Verf gung pxxx bergibt die Portadresse xxx 200 FFF im Hexadezimalformat Standard 330 HEX yxx Legt das Zeichen mit der Nummer xx 00 FF zum Einleiten der Kommandoeingabe fest Voreingestellt ist das Semikolon Wird dieses Zeichen direkt als erstes Zeichen nach dem Offnen der Datei GPIB gesendet so werden die nachfolgenden Zeichen als Kommando interpretiert Die Kommandosequenz wird durch Senden eines Semikolons beendet Beispiel Nach dem ffnen der Datei GPIB zur Ausgabe senden Sie d0D und anschlieBend den Text der an die Adresse OD verschickt werden soll Kommando dxx siehe weiter unten ix Setzt die Zeitspanne x 0 9 i
6. Erweitert QUANCOM Informationssysteme GmbH QUANCOM Informationssysteme GmbH QUANCOM Informationssysteme GmbH jobcode JOB_READSRQ Den Status der SRQ Leitung lesen SRQ wird gesetzt wenn ein Gerat auf dem Bus Daten im Statusbyte bereit halt Das ist z B bei einem DMM der Fall wenn das DMM dem PC mitteilen m chte dass es die Wandlung abgeschlossen hat und einen Messwert abgeholt werden kann JOB_SERIALPOLL Poll angegebenen Gerat durch Die Abfrage liefert F hrt eine Serial Abfrage auf dem ein Statusbyte Der Inhalt des Statusbytes wird durch den Hersteller des jeweiligen Sie jeweiligen Messger tes festgelegt Konsultieren hierzu bitte das Manual des Messger tes JOB_GTL Sendet das Kommando Goto Local an das angegebene Ger t Schaltet das Ger t vom Fernbedienungsmodus in den Modus um in dem es ber das Frontpanel bedient werden kann JOB_GET Sendet das Kommando Trigger an alle Ger te Das Kommando startet Group Execute dann auf allen Ger ten am Bus eine ger tespezifische Funktion z B Messwert aufnehmen JOB_SDC Sendet das Kommando Selected Device Clear an das angegebene Ger t Setzt das adressierte Ger t zur ck JOB_LLO Sendet das Kommando Local LockOut an alle Ger te Schaltet die M glichkeit aus die Ger te ber das Frontpanel zu bedienen JOB_DCL Sendet das Kommando Device Clear an alle Ger te Setzt a
7. Firmennamen die in dieser Anleitung erw hnt werden k nnte es sich um Marken ihrer jeweiligen Eigent mer handeln QUANCOM Informationssysteme GmbH
8. Gilt nur bei einer Installation in das Standartverzeichnis gpib bas Sample project for the GPIB 1 PCIGPIB and USB GPIB Modules Author Michael Reimer QUANCOM Informationssysteme GmbH Germany Website http www quancom de Information To use the QLIB Commands in your source do the following 1 Install the QLIB QUANCOM Driver Libarary 2 Add module qlib bas to your project Sub Main Dim s As String Dim handle As Long Dim result As Long Dim register As Integer Dim nCardID As Integer Dim nListener As Long Dim serial poll Byte As Long The following sequence tries to find the Bus Type PCI ISA or USB of the installed GPIB Controller handle QAPIExtOpenCard PCIGPIB 0 If handle 0 Then handle QAPIExtOpenCard GPIB 0 If handle 0 Then handle QAPIExtOpenCard USBGPIB 0 End If End If If handle 0 Then MsgBox Unable to find GPIB Controller Card 16 Error Exit Sub End If Ok we found a QUANCOM GPIB Controller Card Now we can send a string to the listner with address 3 Change the address to the appropriate address for your device normally set by DIP Switches on the back side PART la Writing a string to the DMM The DMM is a the listener Listener A device capable of receiving data over the interface when addressed to Listen by the active controller Examples of such devices are printers programmable power supplies or any other pro
9. If Instr CardName PCIGPIB Then nCardID PCIGPIB Elseif Instr CardName USBGPIB Then nCardID USBGPIB Else nCardID GPIB End If QUANCOM Informationssysteme GmbH Retrieve Listener Address Listener uidoc FieldGetText Listener nListener Val Right Listener 2 Retrieve Text to send to the GPIB Device S uidoc FieldGetText StringToSend handle OAPIExtOpenCard nCardID nDevice If handle 0 Then result QAPIExtWriteString handle nListener s Len s 0 If result Then data send to gpib device Else failure Msgbox Failure sending data 16 Information End If End If End Sub PART 2 Reading a GPIB IEEE 488 HPIB Device from Lotus Notes Talker A device capable of transmitting data over the interface when addressed to talk by the active controller Examples of such devices are voltmeters data acquisition systems or any other programmable instrument There can be only one addressed talker on the GPIB Bus at one time Select the talker address which is set by a DIP Switch on the back side of your instrument Sub ReadString Dim ws As New NotesUIWorkspace Dim uidoc As NotesUiDocument Dim nDevice As Long Dim nListener As Long Dim s As String Dim handle As Long Dim result As Long Dim nCardID As Integer Dim CardName As String Dim Listener As String Set uidoc ws CurrentDocument CardName uidoc FieldGetText SelectedCard If
10. Website http www quancom de Information To use the QLIB Commands in your source do the following 1 Add statement include glib h to your source file 2 Add in the Dialog Menu gt Project gt Settings gt C C gt Preprocessor S QLIB INC to the additional include directories entry 3 Add in the Dialog Menu gt Project gt Settings gt Linker gt General S QLIB_LIB qlib32 lib to the additional library and object modules directories entry include stdafx h include windows h include qlib h int main int argc char argv ULONG result ULONG listener ULONG talker char buffer 1024 The following sequence tries to find the Bus Type PCI ISA or USB of the installed GPIB Controller ULONG handle QAPIExtOpenCard PCIGPIB 0 if handle NULL handle QAPIExtOpenCard USBGPIB 0 if handle NULL handle QAPIExtOpenCard GPIB 0 The handle is NULL if there is a GPIB Controller installed if handle NULL MessageBox NULL No QUANCOM GPIB Controller found Error MB OK return FALSE Ok we found a QUANCOM GPIB Controller Card Now we can send a string to the listner with address 3 Change the address to the appropriate address for your device normally set by DIP Switches on the back side PART la Writing a string to the DMM The DMM is a the listener ird QUANCOM Inf
11. end else begin writeln SRQ was not asserted end PART3 Reading Serial Poll Status from DMM In a serial poll the active controller asks each device in turn to send back a status byte that indicates whether the device has asserted the SRQ Bit 6 of this byte where the bits are numbered 0 through 7 is set if the device is requesting service The definition of the other bits is device dependent under 488 1 at least 488 2 provides a much more concise definition of the status byte The program has to perform this same sequence with every device it needs to poll We poll all devices from 1 to 15 here This is normally not nescessary and very time consuming Poll only valid devices on the GPIB Bus serial_poll_byte 0 for device 1 to 15 do begin result QAPIExtSpecial handle JOB_SERIALPOLL device LongInt serial_poll_byte if result lt gt 0 then begin if serial_poll_byte and 40 0 then begin check for bit 6 device requested service writeln Device device requested service and returned status byte serial_poll_byt end else begin writeln Device device no SRQ requested Status is serial poll byte end end else begin writeln No answer from device device end end n mr x c oe PART4 Send a command to DMM The following comma
12. rng6enh cerros deis veu nr r ansa seEx run han Vau Se Ens anderen 16 Sicherheitsanweisungen 4 eeeeeeeee esee esee nennen nnne 16 Installation der PCI ISAGPIB 17 Installation des 05 15 nena nana sanum aa aaa nana uana aa 18 Programmierung der GPIB Karte 19 Welche Software brauche ich u2202000000000nnnan000000nunnnnannnnnnnnnnn 19 QUANCOM Informationssysteme GmbH Inhalt 2 Kapitel V QLIB Befehle 1 Kapitel VI 5 on 1 2 3 4 Kapitel VIII Anhang 1 QLIB High Level Programmierung Windows 2000 NT4 x ME 98 95 20 QLIB QUANCOM Driver Library 20 Schnellinstallation der QLIB f r USB und 22 Schnellinstallation der Software f r ISA und 23 24 Einfache QLIB Befehle ss 24 Verwaltungsfunktionen EE 24 GPIB 25 Erweiterte QLIB 26 Verwaltungsfunktionen 2 24444 11 26 GPIB Routinen Erweitert sise 30 GPIB Programmbeispiele 35 GPIB Visual C C 5 2 35 GPIB ViB BeiS ple leia
13. und 3 signalisieren den Status der folgenden Leitungen LED ON GPIB Karte sendet LED OFF GPIB Karte emf ngt Datenbits 3 Steuerleitungen handshake 5 Steuerleitungen QUANCOM Informationssysteme GmbH 13 14 2 9 Steckerbelegung USBGPIB1 PCIGPIB1 und GPIB 1 0105 0106 DIO7 DIO8 REN GND GND GND GND GND GND GND 0 0101 0102 DIO3 DIO4 EOI DAV NRFD NDAC IFC SRQ ATN ERDE QUANCOM Informationssysteme GmbH 2 10 Konzept IEEE 488 BUS Spannungs DVM Oszilloskop quelle Es k nnen maximal 30 Instrumente an die GPIB Controllerkarte angeschlossen werden Im Beispiel oben sind die Instrumente Plotter DVM Digital Voltmeter Oszilloskop und Spannungsquelle an der Kommunikationsleitung angeschlossen Nun kann man z B das Voltmeter als talker definieren die Spannungsquelle als listener M chte man die ankommenden Spannungswerte auch mit dem Oszilloskop analysieren und zus tzlich mit dem Plotter ausgeben k nnen zus tzlich das Oszilloskop und der Plotter als listener deklariert werden Nun stehen die vom talker gesendeten Daten an allen drei listeners zur Verf gung Die Deklaration des Voltmeters als talker und der anderen Instrumente als listener sowie die Kommunikationsorganisation wird von
14. CardName Then Msgbox Please select the GPIB Card 16 Error Exit Sub End If QLIB supports up to 8 GPIB Controller nDevice Val Right CardName 1 If Instr CardName PCIGPIB Then nCardID PCIGPIB Elseif Instr CardName USBGPIB Then nCardID USBGPIB Else nCardID GPIB End If Retrieve Listener Address QUANCOM Informationssysteme GmbH 45 46 Listener uidoc FieldGetText Talker nListener Val Right Listener 2 Create string buffer s Space 256 handle QAPIExtOpenCard nCardID nDevice If handle lt gt 0 Then result QAPIExtReadString handle nListener s Len s 0 If result Then data successfully read from gpib device Call uidoc FieldSetText String s Else failure Msgbox Failure reading data vbInformation Information End If End If End Sub PART3 Checking whether a device has requested service SRQ Service Request A device can interrupt the active controller by asserting the SRQ line The SRQ is a single line and if there are multiple devices on the GPIB Bus that have been configured to assert an SRQ the active controller will have to poll the devices to figure out which one actually asserted the SRQ More than one device could in principle assert an SRO at the same time The active controller can poll the devices in one of two ways serial poll or parallel polls Sub ReadSRQ Dim ws As New NotesUIWorks
15. Examples of such devices are voltmeters data acquisition systems or any other programmable instrument There can be only one addressed talker on the GPIB Bus at one time Select the talker address which is set by a DIP Switch on the back side of your instrument talker 3 SetLength buffer 1024 Read value from DMM with talker address 3 2 result QAPIExtReadString handle talker PChar buffer Length buffer 0 if result lt gt 0 then begin writeln Reading from device talker was buffer end else begin writeln Reading from device talker failed end PART2 Checking whether a device has requested service SRQ Service Request QUANCOM Informationssysteme GmbH 51 52 A device can interrupt the active controller by asserting the SRQ line The SRQ is a single line and if there are multiple devices on the GPIB Bus that nave been configured to assert an SRQ the active controller will have to poll the devices to figure out which one actually asserted the SRO More than one device could in principle assert an SRO at the same time The active controller can poll the devices in one of two ways serial poll or parallel poll result QAPIExtSpecial handle JOB_READSRO 0 0 if result lt gt 0 then begin writeln SRO was asserted
16. ExtSpecialSP handle JOB_SERIALPOLL nListener serial_poll_Byte If result Then data successfully read from gpib device MsgBox Serial poll from device amp nListener amp returns amp Val serial_poll_Byte Else failure MsgBox Failure reading data vbInformation Information End IE Next nListener PART4 Send a command to DMM The following commands are accepted by all devices on the GPIB Bus simultaneously The address part will be ignored JOB_DCL Device Clear The DCL command causes all devices to return to a device dependent initial state JOB_LLO Local Lockout The LLO command disables the return to local front panel key on the device The user can no longer change the device settings from its front panel The following commands need an address and are only accepted by addressed devices Whether the devices are the listeners or the talkers depends on the command The three commands are as follows JOB_GET Group Execute Trigger The GET command tells all the addressed listeners to perform some device dependent function like take a measurement GET allows for synchronizing a measurement function between multiple devices This is only used in specialized cases JOB_SDC Selected Device Clear The SDC command resets the addressed listeners to a device dependent state It performs the same function as DCL but only resets the addressed listeners not all the devices JOB_GTL Go To Loca
17. I Access 2 4 2 Technische Daten Controller uPD7210 kompatibel mit HW FIFO Steckverbinder 24 pol IEEE 488 Buchse mit M3 5 Gewinde Leuchtdioden 8 LEDs befinden sich auf der Karte f r die Anzeige der Steuerleitungen ATN SRQ NDAC NRFD DAV IFC REN EOI Sowie 2 LEDs um einen Zugriff auf die Karte und den PCI Konfigurations Status anzuzeigen Software Beispielsoftware in C C Visual Basic Lotus NotesLabWindows und Delphi QUANCOM Informationssysteme GmbH 2 4 3 Jumpereinstellungen 5V Versorgung JP1 3 3V Versorgung JP2 Zugriffsmodus JP3 Von VCC Von 3 3V Von 5V Interne M Mod QUANCOM Informationssysteme GmbH 2 5 USBGPIB Rev 4 xx 2 5 1 Ubersicht USBGPIB 1 INFORMATIONSSYSTEME QUANCOM USB GPIB Interface IEEE 488 2 www quancom de 2 5 2 Technische Daten Controller uPD7210 kompatibel mit HW FIFO Steckverbinder 24 pol IEEE 488 Buchse M3 5 Gewinde Leuchtdioden 2 LEDs zeigen den Power und Activation Status an 4 LEDs f r optionale Anwendungen Software Beispielsoftware in C C Visual Basic Lotus Notes LabWindows und Delphi QUANCOM Informationssysteme GmbH 2 6 USBGPIB 1 Rev 3 xx 2 6 1 Abbildung USBGPIB 1 QUANCOM INFORMATIONSSYSTEME USB GPIB Interface IEEE 488 2 www quancom de 2 6 2 Technische Daten Controller uPD7210 kompatibel mit HW FIFO Steckverbinder 24 pol IEEE 488 Buchse mit M3 5 Gewinde Leuchtdioden 8 LEDs befinden sich a
18. INFORMATIONSSYSTEME USB GPIB 1 PCIGPIB 1 GPIB 1 QUANCOM Informationssysteme GmbH Copyright QUANCOM Informationssysteme GmbH Alle Angaben in diesem Handbuch sind nach sorgf ltiger Pr fung zusammengestellt worden gelten jedoch nicht als Zusicherung von Produkteigenschaften QUANCOM haftet ausschlie lich in dem Umfang der in den Verkaufs und Lieferbedingungen festgelegt ist Weitergabe und Vervielf ltigung dieses Handbuches und die Verwertung seines Inhaltes sowie der zum Produkt geh renden Software sind nur mit schriftlicher Erlaubnis von QUANCOM gestattet Anderungen die dem technischen Fortschritt dienen bleiben vorbehalten Wesseling November 2011 Version 4 1 4 USB GPIB 1 PCIGPIB 1 GPIB 1 Inhaltsverzeichnis Kapitel OND A Kapitel Il 1 2 3 9 10 Kapitel Ill BoD LA Kapitel IV 1 berblick 1 iln me 1 Unsere Erfahrung ist ihr Gewinn eeeeeeeeeee sien eee nnne nennen nennen nnn nnn nn snnm n intensa 1 Kommunikation mit unseren 1 nderungen zu diesem Handbuch und 222222 2 ete 2 Technische Hardware Beschreibung 3 PAD uc 3 Funktionsweise der anda sa nada aa
19. L QUANCOM Informationssysteme GmbH 61 62 QUANCOM 8 Anhang INFORMATIONSSYSTEME 8 1 Kunden Support und Hilfe Sie benotigen Hilfe Wenn Sie nicht wissen was Sie wahrend einer Installation tun m ssen oder wie die Karte in Betrieb genommen wird lesen Sie bitte dieses Handbuch Tip Im Kapitel Frequently asked questions Haufig gestellte Fragen sind einige Antworten auf haufig gestellte Fragen Sie k nnen Ihnen bei der Probleml sung behilflich sein Auf der QUANCOM Installations CD finden Sie in Textform die Datei README TXT welche alle wichtigen Anderungen beinhaltet Wichtig Wenn Sie weitere Fragen haben kontaktieren Sie unser Support Team F r diesen Fall halten Sie bitte folgende Informationen bereit Genauer Karten Typ Version der Treiber Version der QLIB Betriebssystem Hardware Ausstattung und Bussystem Name und Version von dem Programm welches den Fehler ausgibt Eine genaue Fehlerbeschreibung versuchen Sie den Fehler zu wiederholen um diesen besser beschreiben zu k nnen QUANCOM Informationssysteme GmbH Wen kann ich erreichten QUANCOM Informationssysteme GmbH Die QUANCOM Internet Webseite www quancom de Per Fax 49 22 36 89 92 49 Per E Mail support quancom de Adresse QUANCOM INFORMATIONSSYSTEME GmbH In der Flecht 14 50389 Wesseling Wenn Sie Hilfe brauchen erreichen Sie uns unter QUANCOM Hotline Deutschland 0 22 36 89 92 20 Mon
20. Maus QUANCOM Karte Andere installierte Karten Festplatte Kapazitat frei Das Problem ist Auflistung der Fehlermeldung Folgende Schritte fuhren zur Wiederholung des Problems QUANCOM Informationssysteme GmbH 66 QUANCOM Informationssysteme GmbH 8 3 Hardware und Software Konfigurationsformular Dieses Formular hilft Ihnen die Einstellungen der Hardware und Software aufzulisten F llen Sie das Formular komplett aus bevor Sie sich an QUANCOM Informationssysteme GmbH wenden und nutzen Sie das Formular ebenfalls um die aktuelle Konfiguration nachzuschlagen QUANCOM Produkt Name Name der Karte Interrupt Level DMA Kanal Basis I O Adresse Betriebssystem e Andere Informationen Computer Model Prozessor Taktfrequenz Grafikkarte Betriebssystem Programmiersprache Programmiersprachen Version e Andere Karten im System Basis l O Adresse anderer Karten DMA Kan le anderer Karten Interrupt Level anderer Karten QUANCOM Informationssysteme GmbH 68 QUANCOM Informationssysteme GmbH 8 4 Dokumentations Formular QUANCOM Informationssysteme GmbH m chte Ihren Kommentar zum Produkt und zu der Uber diese Dokumentation oder eines Produktes Diese Informationen helfen uns unsere Qualit t zu verbessern Titel USB GPIB 1 PCIGPIB 1 GPIB 1 Erstellungsdatum 25 11 2011 Nehmen Sie Stellung zur Kom
21. OM Internet WWW Seiten unter www quancom de erhalten 1 5 Lieferumfang GPIB Interface Karte Modul Benutzerhandbuch auf der CD als PDF QUANCOM CD USB Kabel nur USB Version Sollten eine oder mehrere Komponenten fehlen wenden Sie sich bitte an Ihren Handler QUANCOM beh lt sich das Recht vor Anderungen im Lieferumfang ohne Vorank ndigung vorzunehmen QUANCOM Informationssysteme GmbH QUANCOM 2 Technische Hardware Beschreibung 2 1 Allgemeines Beim IEEE488 Bussystem liegen alle Instrumente parallel zu den Kommunikationsleitungen Das Bussystem besteht aus 16 Signalleitungen Acht Datenleitungen drei handshake Leitungen data byte transfer control und f nf Leitungen zur Organisation zwischen den Instrumenten Ein Instrument wird als Sender talker und eines oder mehrere andere werden als Empf nger listener definiert Diese Aufgaben bernimmt die GPIB Controllerkarte 2 2 Funktionsweise der GPIB Karte Die GPIB Karte bietet ber die Datenleitungen jedem Instrument eine bestimmte Adresse an Diese Adresse steht zeitgleich an allen Instrumenten Jedes Instrument vergleicht nun seine eigene eingestellte Adresse mit der Anliegenden Stimmt sie berein so wird das Ger t initialisiert um Befehle aufzunehmen Anschlie end gibt die Controllerkarte an die initialisierten Instrumente den Befehl als talker oder listener zu arbeiten Sind alle Ger te initialisiert die am Datenaustausc
22. ULONG serial poll byte 0 for ULONG device 1 device lt 15 device result QAPIExtSpecial handle JOB_SERIALPOLL device ULONG amp serial_poll_byte if result if serial_poll_byte amp 0x40 check for bit 6 device requested service printf Device u requested service and returned status byte u n device serial_poll_byte else printf Device u SRQ requested Status is u Mn device serial poll byte else printf No answer from device uMn device WEST HH PART4 Send a command to DMM y The following commands are accepted by all devices on the GPIB Bus simultaneously The address part will be ignored JOB_DCL Device Clear The DCL command causes all devices to return to device dependent initial state JOB_LLO Local Lockout The LLO command disables the return to local front panel key on the device The user can no longer change the device settings from its front panel The following commands need address and only accepted by addressed devices Whether the devices are the listeners or the talkers depends on the command The three commands are as follows Fi d JOB GET Group Execute Trigger The GET command tells all the addressed listeners to perform some device dependent function ff like take a measurement GET allows for synchronizing a measurement function between mu
23. alten Windows starten und das USB Verbindungkabel mit dem Ger t HeD und dem USB Port des PCs verbinden UNIVERSAL SERIAL BUS Das Modul kann jederzeit wahrend des Betriebs des PCs angeschlossen werden Der Ort an dem sich der USB Port befindet ist in der Bedienungsanleitung Ihres PCs beschrieben Er ist je nach PC Modell verschieden QUANCOM Informationssysteme GmbH QUANCOM 4 Programmierung der GPIB Karte INFORMATIONSSYSTEME 4 1 Welche Software brauche ich Die Software die ich brauche ist abh ngig von der jeweiligen Anwendung und Betriebssystem Um Zugriff per Programm auf die Karte zu bekommen sind bestehen folgende M glichkeiten Methode 1 Direkter I O Zugriff Direkter Zugriff auf die Hardware Register der Karte des Moduls Methode 2 High Level Programmierung Zugriff auf die Karte ber die QLIB unter Windows XP 2000 NT4 x ME 98 95 Hiermit ist es m glich die Karte bzw das Modul z B ber Visual C Visual Basic Borland Delphi Lotus Notes u a Compilern und Interpretern anzusprechen Methode 3 Installation der QLIB in Zusammenhang mit einem anderen Programm Beispiele zu dem Einsatz mit Labview von National Instruments finden Sie im Internet unter hitp www quancom de qprod01 deu files download gpib_vi zip file gpib_ vi zip oder nach der Installation der QLIB im Verzeichnis d program files quancom qlib32 samples gpib Wenn Sie die Methode 1 und 2 anwenden m chten ben t
24. b und entfernen Sie das Netzkabel bevor Sie eine Karte ein oder ausbauen Verhindern Sie immer statische Elektrizitat Schauen Sie daf r bitte unter Sicherheitsanweisungen nach 1 Schalten Sie den Rechner und alle daran angeschlossenen Gerate aus und entfernen Sie die Stromzufuhr Entladen Sie sich vor dem Weiterarbeiten indem Sie eine Wasserleitung ein Heizungsrohr oder ein anderes Metallteil mit Erdverbindung berthren 2 Offnen Sie den PC Eventuell m ssen Sie einige behindernde Kabel entfernen merken Sie sich jedoch unbedingt die dazugeh rigen Buchsen 3 Die Einsteckpl tze befinden sich am hinteren Ende ihres Rechners Die R ckwand nicht benutzter Pl tze wird von einem Schutzblech verdeckt Suchen Sie einen freien Einsteckplatz und entfernen Sie das dazugeh rige Schutzblech indem Sie seine Halterungsschraube l sen 4 Stecken Sie die Erweiterungskarte in den freien Steckplatz Achten Sie auf festen Sitz und darauf dass Sie die Karte beim Einstecken senkrecht halten 5 Befestigen Sie das Halterungsblech der Karte mit der Schraube des Schutzbleches 6 Schlie en Sie das Geh use Ihres Rechners und befestigen Sie es mit den Sicherungsschrauben Kabel die Sie w hrend des Einbaus gel st haben sollten Sie nun wieder einstecken 7 Stecken Sie die das Anschlu kabel der Karte in die vorgesehenen Buchsen QUANCOM Informationssysteme GmbH 17 18 3 4 Installation des USBGPIB Moduls Den PC einsch
25. den Anweisungen des Programmes Rechner neu starten ffnen Sie nun die Konfiguration die sich unter START Programme QLIB32 QLIB 32 Bit Configuration Utility befindet Klicken Sie hier auf Hinzuf gen und wahlen nun Ihre Karte aus Es ffnet sich jetzt automatisch der Dialog mit dem Sie die I O Adresse der Karte ausw hlen k nnen berpr fen Sie ob die Einstellung der E A Adresse mit der Jumperstellung auf Ihrer Karte bereinstimmt Wenn nicht ffnen Sie bitte durch doppelklicken auf E A Basisadresse den Dialog zur Einstellung E A Adresse Rechner neu starten PAR Modul ISA Karte mit dem mitgelieferten Testprogramm auf Funktionst chtigkeit pr fen QUANCOM Informationssysteme GmbH 23 24 INFORMATIONSSYSTEME QUANCOM 5 aLIB Befehle Anbei sehen Sie eine auszugsweise Auflistung der QLIB Befehle f r die QUANCOM GPIB Karten Eine detaillierte Erkl rung aller QLIB Befehle finden Sie bei entsprechender Installation in der QLIB Windows Hilfe in Ihrem Startmenu 5 1 Einfache QLIB Befehle 5 1 1 Verwaltungsfunktionen QUANCOM Informationssysteme GmbH 5 1 2 GPIB Routinen QUANCOM Informationssysteme GmbH 26 5 2 Erweiterte QLIB Befehle 5 2 1 Verwaltungsfunktionen Erweitert QUANCOM Informationssysteme GmbH QUANCOM Informationssysteme GmbH 27 28 QUANCOM Informationssysteme GmbH QUANCOM Informationssysteme GmbH 29 5 2 2 GPIB Routinen
26. der GPIB Controller Karte bernommen QUANCOM Informationssysteme GmbH 15 16 QUANCOM installationsverfahren INFORMATIONSSYSTEME 3 1 Systemvoraussetzungen e Personal Computer Die QUANCOM Karten laufen in einem IBM AT Computer mit 80X86 oder kompatibel z B 80386 80486 Pentium e Bus Ihr Computer muB den entsprechenden Bus haben PCI ISA 3 2 Sicherheitsanweisungen Im Interesse Ihrer eigenen Sicherheit und einer einwandfreien Funktion Ihrer neuen QUANCOM Karte beachten Sie bitte die folgenden Hinweise e Ziehen Sie vor dem ffnen des Rechners den Netzstecker um sicherzustellen dass das Ger t nicht unter Spannung steht e Da PC Karten empfindlich gegen elektrostatische Aufladungen sind ist es wichtig sich vorher zu entladen bevor die Karte mit den H nden oder dem Werkzeug ber hrt wird Dies geschieht am einfachsten wenn Sie vorher ein metallisches Geh useteil ber hren Halten Sie die Karte immer am Rand fest und vermeiden Sie ein Anfassen der IC s e Legen Sie die Karten immer auf einen elektrogesch tzten Gegenstand solange sich die Karten noch nicht im PC Geh use befinden Ver nderungen die ohne ausdr ckliche Genehmigung der QUANCOM Informationssysteme GmbH an dem Ger t vorgenommen werden f hren zum Erl schen der Betriebserlaubnis und der CE Zertifizierung QUANCOM Informationssysteme GmbH 3 3 Installation der PCI ISAGPIB Karte Schalten Sie die Stromzufuhr a
27. eiber und Laufzeitumgebung sind Administratorenrechte erforderlich Ohne die entsprechenden Rechte kann der Treiber und die Laufzeitumgebung nicht korrekt installiert werden Windows XP 2000 USB Modul einstecken USB Modul einstecken Rechner starten Rechner starten USB Version wird vom Betriebsystem erkannt bitte USB Version wird vom Betriebsystem erkannt bitte den Pfad zu den Treibern angeben den Pfad zu den Treibern angeben Treiber befinden sich im Verzeichnis WinXP oder Treiber befinden sich im Verzeichnis WinME oder Win2000 der Installations CD Win98 der Installations CD QLIB Testprogramme und Beispiele QLIB Testprogramme und Beispiele installieren installieren Im Hauptverzeichnis der Installations CD Im Hauptverzeichnis der Installations CD QUANCOM EXE starten QUANCOM EXE starten Rechner neu starten Rechner neu starten QUANCOM Informationssysteme GmbH 4 2 3 Schnellinstallation der Software fur ISA und PAR F r die Installation der Treiber und Laufzeitumgebung sind Administratorenrechte erforderlich Ohne die entsprechenden Rechte kann der Treiber und die Laufzeitumgebung nicht korrekt installiert werden Eine detailiertere Installationsanleitung finden Sie in unserem Manual QLIB Windows XP 2000 95 98 ME NT4 x PAR Modul anschlieBen ISA Karte einstecken und die Jumpereinstellungen notieren Rechner starten Starten Sie die Datei QUANCOM EXE im Hauptverzeichnis der Installations CD und folgen Sie
28. empfangenden String enthalten soll chars Gr sse des durch den Buffer bereitgestellten Speicher der f r den Empfang von Daten zur Verf gung steht mode Gibt die Endekennung des zu lesenden Strings an 0 EOS Zeichen ist LF Der Lesevorgang wird bei EOI Anzahl der Bytes oder LF beendet 1 Kein EOS Zeichen Der EOS Endmodus ist deaktiviert 2 EOS Zeichen ist CR Der Lesevorgang wird bei EOI Anzahl der Bytes oder CR beendet 3 EOS Zeichen ist LF Der Lesevorgang wird bei EOI Anzahl der Bytes oder LF beendet x Jeder andere Modus bezeichnet die Nummer dezimal des gew nschten EOS Zeichens R ckgabewert Wurde die Funktion erfolgreich ausgef hrt so wird eine Anzahl der empfangenen Zeichen gr er Null geliefert Im durch den Buffer bergebenen Speicherblocks befindet sich die Antwort des Ger tetes Wenn die Funktion fehlgeschlagen ist so ist der R ckgabewert immer OL Anmerkungen Siehe auchQAPIWriteString QAPIReadString QAPIExtWriteString QAPIExtWriteStringEX QUANCOM Informationssysteme GmbH 55 56 QUANCOM 7 GPIB 1 Device Treiber MS DOS INFORMATIONSSYSTEME 7 1 Installation Der mitgelieferte Device Treiber GPIB_DRV SYS wird ben tigt um die GPIB Controller Karte als Ger t ansteuern zu k nnen Um diese Option zu nutzen m ssen Sie den Treiber auf Ihrem Rechner installieren 1 Legen Sie die mitgelieferte Programm CD in Laufwerk D ein 2 Geben Sie an der MS DOS Eingabeaufforderung ein
29. en gpib_receive vi und gpib_send vi welche die QLIB Funktionen aufrufen Die folgenden VI s stehen momentan zur Verf gung gpib_receive vi Lesen eines Strings von einem Ger t am Bus gpib_send vi Senden eines Strings an ein Ger t am Bus Die folgenden werden in den n chsten Tagen zur Verf gung gestellt gpib_spoll vi Serialpoll der Ger te am Bus gpib checksrq vi Lesen des SRQ Status auf dem Bus gpib command vi Senden eines Kommandos auf dem Bus Bitte berpr fen Sie unsere Website in den nachsten Tagen auf Updates Updates der QLIB finden Sie unter http www quancom de qlib Um die GPIB Kontrollerkarte von LabView aus anzusprechen sind die folgenden Schritte n tig Schritt 0 Installieren Sie die QLIB QUANCOM Driver Library Schritt 1 F gen Sie die Makros gpib receive vi und gpib send vi Ihrem Projekt hinzu QUANCOM Informationssysteme GmbH 43 44 6 4 GPIB Lotus Notes Beispiel Der fettgedruckte Text enthalt Script Beispiele f r die Einbindung der QLIB in Lotus Notes Das folgende Beispiel stellt nur die Scripte dar die sich nat rlich auch auf Felder in Masken beziehen Details entnehmen Sie bitte der Beispieldatenbank Nach der Installation der QLIB befindet sich diese Beispieldatenbank im Ordner files quancom qlib32 samples gpib otus Gilt nur bei einer Installation in das Standartverzeichnis Welche Schritte n tig sind um die QLIB zu eigenen Projekten hinzuzuf gen ent
30. enCard GPIB 0 end end QUANCOM Informationssysteme GmbH The handle is lt gt NULL if there is a GPIB Controller installed x if handle 0 then begin s No QUANCOM GPIB Controller found writeln s halt 0 end Ok we found a QUANCOM GPIB Controller Card Now we can send a string to the listner with address 3 Change the address to the appropriate address for your device normally set by DIP Switches on the back side PART 1a Writing a string to a IEEE 488 GPIB HPIB Device Listener A device capable of receiving data over the interface when addressed to Listen by the active controller Examples of such devices are printers programmable power supplies or any other programmable instrument There can be up to 14 Listeners on the GPIB Bus at one time Select the listener address which is set by a DIP Switch on the back side of your instrument listener 3 Send z to the listener 3 which resets the DMM to the initial settings S z 0 if QAPIExtWriteString handle listener Pchar s Length s 0 0 then begin writeln Writing to device listener was successful end else begin writeln Writing to device listener failed end VS EE PART 1b Reading a DMM or any other IEEE 488 device Talker A device capable of transmitting data over the interface when addressed to talk by the active controller
31. grammable instrument There can be up to 14 Listeners on the GPIB Bus at one time Select the listener address which is set by a DIP Switch on the pack side of your instrument nListener 3 z QUANCOM Informationssysteme GmbH 39 40 Send z to the listner 3 which resets the DMM to the initial settings result QAPIExtWriteString handle nListener s Len s 0 If result Then data send to gpib device Else failure MsgBox Failure sending data vbInformation Information End If PART 1b Reading a DMM The DMM is a talker Talker A device capable of transmitting data over the interface when addressed to talk by the active controller Examples of such devices are voltmeters data acquisition systems or any other programmable instrument There can be only one addressed talker on the GPIB Bus at one time Select the talker address which is set by a DIP Switch on the back side of your instrument nListener 3 S Space 1024 create buffer 1024 chars Read value from DMM with talker address 3 result QAPIExtReadString handle nListener s Len s 0 If result Then data successfully read from gpib device MsgBox Read from device amp nListener amp String amp s Else failure MsgBox Failure reading data vbInformation Information End If PART2 Checking whether a device has requested service SRO Service Request A device can
32. h beteiligt sein sollen wird mittels der Dreidraht handshake funktion der Datentransfer organisiert und berwacht QUANCOM Informationssysteme GmbH 2 3 PCIGPIB Rev 4 xx 2 3 1 Karten bersicht PCIGPIB 1 REN EOI GPIB controller JeAuc 49 IEEE 488 Buchse PCI DECODER PCI Config PCI Access On Taga 2 3 2 Technische Daten Controller uPD7210 kompatibel mit HW FIFO Steckverbinder 24 pol IEEE 488 Buchse mit M3 5 Gewinde Leuchtdioden 8 LEDs befinden sich auf der Karte fiir die Anzeige der Steuerleitungen ATN SRQ NDAC NRFD DAV IFC REN EOI Sowie 2 LEDs um einen Zugriff auf die Karte und den PCI Konfigurations Status anzuzeigen Software Beispielsoftware in C C Visual Basic Lotus NotesLabWindows und Delphi QUANCOM Informationssysteme GmbH 2 3 3 Einstellung der Moduladresse mit dem Dip Schalter Sw2 SW3 Moduladresse CL o RUN or on On 5 Diese Tabelle zeigt wie man mit Hilfe der Dipschalter die Moduladresse des Ger tes verandern kann In den darunter liegenden Beispielen sind die Adressen 0 und 2 eingestellt Beispiele Adresse 0 Adresse 2 n 123 123 2 3 4 Wahl zwischen dem und dem Memory Modus mit Dipschalter 4 On On Off Memory Mode B 4 QUANCOM Informationssysteme GmbH 2 4 PCIGPIB 1 Rev 3 xx 2 4 1 Karten bersicht GPIB controller IEEE 488 Buchse PCI DECODER PCI Config PC
33. igen Sie den Quelltext der Anwendung Sie sind selbst f r das Hinzuf gen der Befehle in Ihre Anwendung verantwortlich Um diese Methoden zu benutzen sind Programmier Kenntnisse n tig Methode 3 erlaubt einem das man die QUANCOM Karte mit einer bestehenden Software laufen lassen kann z B LabView oder HP VEE Daf r m ssen Sie als erstes die QLIB von der Installations CD installieren Hinweise rund um die QLIB und Installation entnehmen Sie bitte dem QLIB Handbuch welches sich ebenfalls auf der CD befindet Auf der CD finden Sie gleichzeitig einige Beispielprogramme f r LabView und HP VEE QUANCOM Informationssysteme GmbH 19 20 4 2 QLIB High Level Programmierung Windows XP 2000 NT4 x ME 98 95 4 2 1 QLIB QUANCOM Driver Library Die QLIB die Abk rzung f r QUANCOM LIBrary bietet die M glichkeit alle QUANCOM Karten unter den Betriebssystemen Windows XP 2000 NT und ME 98 95 und den Programmiersprachen C C Delphi Visual Basic anzusprechen Sie wird zu allen QUANCOM Karten mitgeliefert und gestattet dem Anwender durch die Einfachheit der Befehle die QLIB in eigene Applikationen einzubinden Die Befehle und Funktionen gelten f r alle Betriebssysteme Unterstutzte Betriebssysteme Unterstutzte Compiler QUANCOM Informationssysteme GmbH Grafische Programmiersprache QUANCOM Informationssysteme GmbH 21 22 4 2 2 Schnellinstallation der QLIB f r USB und PCI F r die Installation der Tr
34. interrupt the active controller by asserting the SRO line The SRQ is a single line and if there are multiple devices on the GPIB Bus that have been configured to assert an SRQ the active controller will have to poll the devices to figure out which one actually asserted the SRQ More than one device could in principle assert an SRQ at the same time The active controller can poll the devices in one of two ways serial poll or parallel poli result QAPIExtSpecial handle JOB READSRQ 0 0 If result 0 Then MsgBox No service requested 16 Information Else MsgBox Device has requested service SRO 16 Information End If PART3 Reading Serial Poll Status from DMM a serial poll the active controller asks each device in turn to send back a status byte that indicates whether the device has asserted the SRQ Bit 6 of this byte where the bits are numbered 0 through 7 is set if the device is requesting service The definition of the other bits is device dependent under 488 1 at least 488 2 provides a much more concise definition of the status byte The program has to perform this same sequence with every device it needs to poll We poll all devices from 1 to 15 here This is normally not nescessary and very time consuming Poll only valid devices on the GPIB Bus serial poll Byte 0 QUANCOM Informationssysteme GmbH For nListener 1 To 15 result QAPI
35. ith every device it needs to poll Sub SerialPoll Dim ws As New NotesUIWorkspace Dim uidoc As NotesUiDocument Dim nDevice As Long Dim nListener As Long Dim s As String Dim handle As Long Dim result As Long Dim pollbyte As Long Dim nCardID As Integer Dim CardName As String Dim Listener As String Set uidoc ws CurrentDocument CardName uidoc FieldGetText SelectedCard If CardName Then Msgbox Please select the GPIB Card 16 Error Exit Sub End If QLIB supports up to 8 GPIB Controller nDevice Val Right CardName 1 If Instr CardName PCIGPIB Then nCardID PCIGPIB Elseif Instr CardName USBGPIB Then nCardID USBGPIB Else nCardID GPIB End If Retrieve Listener Address Listener uidoc FieldGetText Listener2 nListener Val Right Listener 2 Create string buffer S Space 256 handle QAPIExtOpenCard nCardID nDevice If handle 0 Then result QAPIExtSpecialSP handle JOB SERIALPOLL nListener pollbyte If result Then QUANCOM Informationssysteme GmbH data successfully read from gpib device Call uidoc FieldSetText String2 Hex amp Hex Val pollbyte Else failure Msgbox Failure reading data vbInformation Information End If End If End Sub PART5 Send a command to DMM simultaneously The address part will be ignored JOB DCL Device Clear The DCL command causes all devices to return to a device depende
36. kten hinzuzuf gen entnehmen Sie bitte dem Header im Quelltext program GPIB_CONSOLE_APP gpib pas Sample project for Borland Delphi shows how to program the GPIB 1 PCIGPIB and USB GPIB Modules Author Michael Reimer QUANCOM Informationssysteme GmbH Germany Website http www quancom de Product GPIB PCI Controller http www quancom de qprod01 deu pb pcigpib_1 htm GPIB ISA Controller http www quancom de qprod01 deu pb GPIB_1 htm GPIB USB Controller http www quancom de qprod01 deu pb usb_gpib_1 htm Information To use the QLIB Commands in your source do the following 1 Add statement include qlib pas to your source file 2 Copy QLIB PAS from QLIB Installation Directory d program files quancom glib32 include to your working directory CONSOLE SINCLUDE QLIB pas X var handle longint result longint listener longint talker longint buffer string s string serial_poll_byte longint device longint begin The following sequence tries to find the Bus Type PCI ISA or USB of the installed GPIB Controller serial_poll_byte 3 result LongInt 80serial poll byte result result 1 writeln result handle QAPIExtOpenCard PCIGPIB 0 if handle 0 then begin handle QAPIExtOpenCard USBGPIB 0 if handle 0 then begin handle QAPIExtOp
37. l The GTL command sets the addressed listeners back to local mode Send DCL to all devices result QAPIExtSpecial handle JOB_DCL 1 0 If Not result Then MsgBox Command DCL failed 16 Information End If Send LLO to all devices result QAPIExtSpecial handle JOB_LLO 1 0 If Not result Then MsgBox Command LLO failed 16 Information End If Send GET to device 3 result QAPIExtSpecial handle JOB_Get 3 0 If Not result Then MsgBox Command GET failed 16 Information End If Send SDC to device 3 result QAPIExtSpecial handle JOB_SDC 3 0 If Not result Then MsgBox Command SDC failed 16 Information End If Send GIL to device 3 result QAPIExtSpecial handle JOB_GTL 3 0 QUANCOM Informationssysteme GmbH 42 If Not result Then MsgBox Command GTL failed 16 End If QAPIExtCloseCard handle End Sub Private Sub Form Load Call Main End Sub Information QUANCOM Informationssysteme GmbH 6 3 GPIB National Instruments LabView Beispiel Nach der Installation der befindet sich die LabView Vls im Ordner files quancom qlib32 samples gpib labview Gilt nur bei einer Installation in das Standartverzeichnis Die Datei GPIB VI ist das Beispielprogramm f r National Instruments LabView Um die Kartenfunktionen unter Labview zu testen k nnen Sie dieses Programm verwenden Das Beispiel l dt die Datei
38. lle Ger te zur ck JOB_REN Aktiviert bzw deaktiviert die REN Leitung Wird auf ein Ger t geschrieben geht es danach in den Remote Mode bis die Leitung wieder deaktiviert wird QUANCOM Informationssysteme GmbH i Talker adresse Listen Adresse Listen Adresse 1 Aktiviert die REN Leitung NE LLL 2 Ruckgabewert Ungleich 0 wenn ein Gerat die SRQ Leitung aktiviert hat Sonst 0 Gerateabhan giges Statusbyte Ungleich 0 wenn das Kommando erfolgreich ausgef hrt wurde Ungleich 0 wenn das Kommando erfolgreich ausgef hrt wurde Ungleich 0 wenn das Kommando erfolgreich ausgef hrt wurde Ungleich 0 wenn das Kommando erfolgreich ausgef hrt wurde Ungleich 0 wenn das Kommando erfolgreich ausgef hrt wurde Ungleich 0 wenn das Kommando erfolgreich ausgef hrt wurde 33 Deaktiviert die Leitung JOB_RESET JOB_TIMEOUT JOB_READ_TIMEOUT JOB_READ_ DEFAULT_TIMEOUT JOB_WRITE_ DEFAULT_TIMEOUT Fuhrt einen Hardware Reset auf dem GPIB Controller durch und berpr ft ob die Karte bzw das Modul vorhanden ist Da USB Module im Betrieb ausgesteckt werden k nnen liefert die Funktion den Status zur ck Setzt das GPIB Session Timeout in Millisekunden Eine Lese oder Schreiboperation wird abgebrochen wenn nach der angegeben Zeit keine weiteren Daten gesendet bzw empfangen wurden Liest das GPIB Sessi
39. ltiple devices This only used specialized cases JOB_SDC Selected Device Clear The SDC command resets LE the addressed listeners to a device dependent state It if performs the same function as DCL but only resets the addressed listeners not all the 2 devices JOB Go To Local The command sets the QUANCOM Informationssysteme GmbH 37 38 addressed listeners back to local mode Send DCL to all devices result QAPIExtSpecial handle JOB_DCL if result printf Command DCL failed n Send LLO to all devices result QAPIExtSpecial handle JOB LLO if result printf Command LLO failed n Send GET to device 3 result QAPIExtSpecial handle JOB GET if result printf Command failed n Send SDC to device 3 result QAPIExtSpecial handle JOB SDC if result printf Command SDC failed n Send GTL to device 3 result QAPIExtSpecial handle JOB GIL if result printf Command failed n QAPTExtCloseCard handle return 0 NULL NULL NULL NULL QUANCOM Informationssysteme GmbH 6 2 GPIB VB Beispiel Der fettgedruckt Text beschreibt wie man die QLIB in ein Visual Basic Projekt einbindet Nach der Installation der QLIB befindet sich das sofort kompilierbare Beispielprojekt im Ordner d program files quancom qlib32 samples gpib vb
40. n Sekunden fest die bis zu einem Timeout Fehler verstreichen mu Standard 1 ux Erm glicht oder verhindert Abbruch der bertragung mit einem Tastendruck 0 Abbruch nicht m glich 1 Abbruch durch den Benutzer erlaubt Standard 1 Hinweis Ein Abbruch durch den Benutzer f hrt immer zu einem allgemeinen Fehler ex Legt die Endekennung fest nach der die Ubergebenen Daten versandt oder im internen Puffer gespeichert werden G ltige Werte f r x CR EOI CR Standard LF EOI LF CR LF EOI CR LF LF CR EOI nur empfangen O O1 SXX Gibt die Talkeradresse xx 1 1E an dxx Gibt die Listeneradresse xx 1 1E an QUANCOM Informationssysteme GmbH 57 58 7 1 2 Beispiele DEVICE C GPIB_DRV SYS p330 Der Treiber wird unter Beibehaltung samtlicher Voreinstellungen geladen das heiBt Die Portadresse ist 330 hex das Kommandozeichen ist das Semikolon die Timeout Zeit betragt eine Sekunde Abbruch ist nicht m glich die Endekennung ist CR DEVICE C GPIB_DRV SYS p300 e4 t2 u0 y07 Die Portadresse wird festgelegt auf 300 hex Als Endkennung fungiert das Zeichen LF die Timeoutzeit wird auf zwei Sekunden festgesetzt Ein Unterbrechen der Daten bertragung durch einen Tastendruck ist nicht m glich das Zeichen welches die Kommando bergabe einleitet ist 07 hex also die Glocke Bell QUANCOM Informationssysteme GmbH 7 2 Programmierbeispiel in BASIC
41. n der Seite des Geh uses f r die Anzeige der Steuerleitungen SRQ NDAC NRFD DAV IFC REN EOI Sowie 2 LEDs um den USB Status anzuzeigen Software Beispielsoftware in C C Visual Basic Lotus Notes LabWindows und Delphi QUANCOM Informationssysteme GmbH 10 2 7 GPIB 1 2 7 1 Technische Daten Controller PC BUS DMA AdreBdekodierung Datenbus Steckverbinder Leuchtdioden Software NEC uPD7210 Interrupts schaltbar mit IRQ 2 3 4 5 6 7 DMA 1 2 oder 3 per Jumper w hlbar sieben verschiedene Adressen per Jumper w hlbar HEX 100 2B0 300 310 330 SEO 8 Bit Datenbus gepuffert 24 pol IEEE 488 Buchse mit M3 5 Gewinde 3 LEDs befinden sich auf der Karte mit Richtungsanzeige der Treiber f r Daten und Kontrolleitungen Beispielsoftware in C PASCAL und Basic DEVICE Treiber f r andere Programmiersprachen sowie zur direkten Plotteransteuerung QUANCOM Informationssysteme GmbH 2 7 2 Kartenubersicht Secale Treiber o O 5 en st LLI LLI 2 8 JP1 Adre jumper f r I O Belegung im PC IDO 2BO 300 310 330 3B0 3EO e Standard Adresse 2 8 1 JP2 IRQ Jumper IRQ2 IRQ3 IRQ4 IRQS IRQ6 IRQ7 e Standard Kein IRQ QUANCOM Informationssysteme GmbH 11 12 2 8 2 JP3 DMA Jumper DMA 1 DMA 2 3 e Standard Kein DMA QUANCOM Informationssysteme GmbH 2 8 3 Leuchtdioden Die drei Leuchdioden LED 1 2
42. nd Funktionalit t sich mit jedem anderem Ger t dieser Klasse messen kann und sie sogar noch bertrifft Zu den besonderen Eigenschaften dieser Karte geh ren Eigenschaften der Karte e einfach programmierbar e diverse Beispielprogramme in verschiedenen Programmiersprachen 1 2 Unsere Erfahrung ist ihr Gewinn Wir von QUANCOM sind auf die Entwicklung f r Hardware und Software spezialisiert QUANCOM geh rt mittlerweile zu einem der f hrenden Lieferanten f r Me technik und Automatisierung In ihrem Entwicklungszentrum hat QUANCOM eine eindrucksvolle Produktpalette entwickelt 1 3 Kommunikation mit unseren Kunden QUANCOM m chte gerne Ihren Kommentar zu unseren Produkten und zu unseren Handb chern Wir sind an Ihren Anwendungen interessiert die Sie mit unseren Produkten entwickeln Wir m chten gleichzeitig helfen wenn Sie Probleme haben Um das zu vereinfachen enth lt dieses Handbuch Kommentar und Konfigurationsformulare mit denen man direkt mit uns in Verbindung treten kann Diese Formulare befinden sich in dem Kapitel Dokumentations Formular am Ende dieses Handbuches QUANCOM Informationssysteme GmbH 1 4 Anderungen zu diesem Handbuch und Softwareupdates QUANCOM Produkte zeichnen sich u a durch stetige Weiterentwicklung aus Aktuelle Informationen Uber Anderungen k nnen Sie den README Dateien auf der Installations CD entnehmen Weitere Informationen und kostenlose Softwareupdates k nnen Sie jederzeit auf QUANC
43. nds are accepted by all devices on the GPIB Bus simultaneously The address part will be ignored JOB_DCL Device Clear The DCL command causes all devices to return to a device dependent initial state JOB_LLO Local Lockout The LLO command disables the return to local front panel key on the device The user can no longer change the device settings from its front panel The following commands need an address and are only accepted by addressed devices Whether the devices are the listeners or the talkers depends on the command The three commands are as follows QUANCOM Informationssysteme GmbH JOB GET Group Execute Trigger GET command tells all the addressed listeners to perform some device dependent function like take a measurement GET allows for synchronizing a measurement function between multiple devices This is only used in specialized cases JOB SDC Selected Device Clear The SDC command resets the addressed listeners to a device dependent state It performs the same function as DCL but only resets the addressed listeners not all the devices JOB_GTL Go To Local The GTL command sets the addressed listeners back to local mode Send DCL to all devices j result QAPIExtSpecial handle JOB DCL 1 NULL if result 0 then begin writeln Command DCL failed n end Send LLO to all devices result
44. nehmen Sie bitte dem Header im Quelltext gpib bas Sample project for the GPIB 1 PCIGPIB and USB GPIB Modules Author Michael Reimer QUANCOM Informationssysteme GmbH Germany Website http www quancom de Information To use the QLIB Commands in your source do the following Step 0 Install the QLIB QUANCOM Driver Library Step 1 Copy Script Library qlib to your database Step 2 Add Statement Use qlib to section Globals gt Options Change the address to the appropriate address for your device normally set by DIP Switches on the back side PART 1 Writing a string to a GPIB HPIB IEEE488 DMM The DMM is a listener from Lotus Notes Listener A device capable of receiving data over the interface when addressed to Listen by the active controller Examples of such devices are printers programmable power supplies or any other programmable instrument There can be up to 14 Listeners on the GPIB Bus at one time Sub SendString Dim ws As New NotesUIWorkspace Dim uidoc As NotesUiDocument Dim nDevice As Long Dim nListener As Long Dim s As String Dim handle As Long Dim result As Long Dim nCardID As Integer Dim CardName As String Dim Listener As String Set uidoc ws CurrentDocument CardName uidoc FieldGetText SelectedCard If CardName Then Msgbox Please select the GPIB Card 16 Error Exit Sub End If QLIB supports up to 8 GPIB Controller nDevice Val Right CardName 1
45. nt initial state JOB LLO Local Lockout The LLO command disables the return to local front panel key on the device The user can longer change the device settings from its front panel The following commands need an address and are only accepted by addressed devices Whether the devices are the listeners or the JOB GET Group Execute Trigger The GET command tells all the addressed listeners to perform some device dependent function like take a measurement GET allows for synchronizing a in specialized cases JOB SDC Selected Device Clear The SDC command resets the same function as DCL but only resets the addressed listeners not all the devices JOB_GTL Go To Local The command sets the addressed listeners back to local mode Sub SendCommand Dim ws As New NotesUIWorkspace Dim uidoc As NotesUiDocument Dim nDevice As Long Dim nListener As Long Dim s As String Dim handle As Long Dim result As Long Dim nCmd As Long Dim nCardID As Integer Dim CardName As String Dim Listener As String Dim CommandName As String Set uidoc ws CurrentDocument CardName uidoc FieldGetText SelectedCard CommandName uidoc FieldGetText CommandList If CardName Then Msgbox Please select the GPIB Card 16 Error Exit Sub End If QLIB supports up to 8 GPIB Controller nDevice Val Right CardName 1 If Instr CardName PCIGPIB Then nCardID PCIGPIB El
46. om device u failed n talker PART2 Checking whether a device has requested service SRQ Service Request A device can interrupt the active controller by asserting the SRQ line The SRO is a single line and if there are multiple devices on the GPIB Bus that have been configured to assert an SRQ the active controller will have to poll the devices to figure out which one actually asserted the SRO More than one device could in principle assert an SRQ at the same time The active controller can poll the devices in one of two ways serial poll or parallel poll nnn result QAPIExtSpecial handle JOB READSRQ 0 0 if result printf SRQ was asserted n QUANCOM Informationssysteme GmbH PART3 Reading Serial Poll Status from DMM In a serial poll the active controller asks each device in turn to send back a status byte that indicates whether the device has asserted the SRQ Bit 6 of this byte where the bits are numbered 0 through 7 is set if the device is requesting service The definition of the other bits is device dependent under 488 1 at least 488 2 provides a much more concise definition of the status byte The program has to perform this same sequence with every device it needs to poll We poll all devices from 1 to 15 here This is normally not nescessary and very time consuming Poll only valid devices on the GPIB Bus
47. on Timeout in Millisekunden Liest das GPIB Default Timeout in Millisekunden Dabei handelt es sich um den Timeoutwert mit dem eine GPIB Session initialisiert wird wenn eine GPIB Karte ge ffnet wird Setzt das GPIB Default Timeout in Millisekunden Dabei handelt es sich um den Timeoutwert mit dem eine GPIB Session initialisiert wird wenn eine GPIB Karte ge ffnet wird Ungleich 0 wenn das Kommando erfolgreich ausgef hrt wurde 0 wenn das USB GPIB Modul ausgesteckt wurde oder die ISA Karte nicht auf der richtigen Portadresse installiert ist Bei PCI GPIB Karten liefert die Funktion immer einen Wert ungleich 0 zur ck Ungleich 0 wenn das Kommando erfolgreich ausgef hrt wurde GPIB Session Timeout Ungleich 0 wenn das Kommando erfolgreich ausgef hrt wurde Ungleich 0 wenn das Kommando erfolgreich ausgef hrt wurde QUANCOM Informationssysteme GmbH QUANCOM 6 GPIB Programmbeispiele INFORMATIONSSYSTEME 6 1 GPIB Visual C C Beispiel Der fettgedruckt Text beschreibt wie man die QLIB in ein MFC C C Projekt einbindet Nach der Installation der QLIB befindet sich das sofort kompilierbare Beispielprojekt im Ordner d program files quancom qlib32 samples gpib vc Gilt nur bei einer Installation in das Standartverzeichnis gpib cpp Sample project for the GPIB 1 PCIGPIB and USB GPIB Modules Author Michael Reimer QUANCOM Informationssysteme GmbH Germany
48. ormationssysteme GmbH 35 36 Listener A device capable of receiving data over the interface when addressed to Listen by the active controller Examples of such devices are printers programmable power supplies or any other programmable instrument There can be up to 14 Listeners on the GPIB Bus at one time Select the listener address which is set by a DIP Switch on the back side of your instrument listener 3 Send z to the listner 3 which resets the DMM to the initial settings char 51 z if OAPIExtWriteString handle listener char amp sl strlen s1 0 printf Writing to device u was successful n listener printf Writing to device u failed n listener PART 1b Reading a DMM The DMM is a talker Talker A device capable of transmitting data over the interface when addressed to talk by the active controller Examples of such devices are voltmeters data acquisition systems or any other programmable instrument There can be only one addressed talker on the GPIB Bus at one time Select the talker address which is set by a DIP Switch on the back side of your instrument talker 3 Read value from DMM with talker address 3 result QAPIExtReadString handle talker char amp buffer sizeof buffer 0 if result printf Reading from device u was s n talker buffer else printf Reading fr
49. pace Dim uidoc As NotesUiDocument Dim nDevice As Long Dim nListener As Long Dim s As String Dim handle As Long Dim result As Long Dim nCmd As Long Dim nCardID As Integer Dim CardName As String Dim Listener As String Set uidoc ws CurrentDocument CardName uidoc FieldGetText SelectedCard If CardName Then Msgbox Please select the GPIB Card 16 Error Exit Sub End If QLIB supports up to 8 GPIB Controller nDevice Val Right CardName 1 If Instr CardName PCIGPIB Then nCardID PCIGPIB Elseif Instr CardName USBGPIB Then nCardID USBGPIB Else nCardID GPIB End If handle QAPIExtOpenCard nCardID nDevice QUANCOM Informationssysteme GmbH If handle lt gt 0 Then result QAPIExtSpecial handle JOB_READSRQ 0 0 If result 0 Then Msgbox No service requested 16 Info Else Msgbox Device has requested service SRO 16 Info End If End If End Sub PART4 Reading Serial Poll Status from DMM In a serial poll the active controller asks each device in turn to send back a status byte that indicates whether the device has asserted the SRQ Bit 6 of this byte where the bits are numbered 0 through 7 is set if the device is requesting service The definition of the other bits is device dependent under 488 1 at least 488 2 provides a much more concise definition of the status byte The program has to perform this same sequence w
50. petenz bersichtlichkeit und Inhalt dieses Handbuches Wenn Sie Fehler im Handbuch entdecken notieren Sie sich bitte die Seitenzahl Vielen Dank f r Ihre Hilfe Name Firma Adresse Telefon Fax Kommentar Email an support quancom de Fax an 49 2236 89 92 49 Adresse QUANCOM Informationssysteme GmbH In der Flecht 14 50389 Wesseling QUANCOM Informationssysteme GmbH 69 70 8 5 Warenzeichen Linux ist ein eingetragenes Warenzeichen von Linus Torvalds MS MS DOS Microsoft Visual Basic Windows Windows Vista XP 2000 NT ME 98 95 sind eingetragene Warenzeichen von Microsoft Corporation XT und PS 2 sind Warenzeichen und IBM OS 2 und AT sind eingetragene Warenzeichen der International Business Machines Corporation Intel Pentium ist ein eingetragenes Warenzeichen von Intel Corporation USB ist ein eingetragenes Warenzeichen von USB Implementers Forum Inc JAVA ist ein eingetragenes Warenzeichen von Sun Microsystems DELPHI und Pascal sind ein eingetragene Warenzeichen von Borland Corporation PCI ist ein eingetragenes Warenzeichen von PCI Special Interest Group PCI Express ist ein eingetragenes Warenzeichen der PCI SIG Nationalinstruments LABVIEW ist ein eingetragenes Warenzeichen von Nationalinstruments Corporation Agilent VEE ist ein eingetragenes Warenzeichen von Agilent Technologies Ethernet ist ein eingetragenes Warenzeichen der Xerox Corporation Bei anderen Produkt und
51. seif Instr CardName USBGPIB Then nCardID USBGPIB Else nCardID GPIB The following commands are accepted by all devices on the GPIB Bus talkers depends on the command The three commands are as follows measurement function between multiple devices This is only used addressed listeners to a device dependent state It performs the amp Dec 5 Val pollbyte QUANCOM Informationssysteme GmbH End If Retrieve Listener Address Listener uidoc FieldGetText Listener3 nListener Val Right Listener 2 handle QAPIExtOpenCard nCardID nDevice If handle lt gt 0 Then Select Case Left CommandName 3 Case GTL nCmd JOB GTL Case SDC nCmd JOB SDC Case GET nCmd JOB GET Case LLO nCmd JOB LLO Case DCL nCmd JOB DCL End Select result QAPIExtSpecial handle nCmd nListener 0 If result Then cmd successfully send to gpib device Else failure Msgbox Failure sending command vbInformation Information End If End If End Sub QUANCOM Informationssysteme GmbH 50 6 5 GPIB Borland Delphi Beispiel Der fettgedruckt Text beschreibt wie man die QLIB in ein Delphi Projekt einbindet Nach der Installation der QLIB befindet sich das sofort kompilierbare Beispielprojekt gpib pas im Ordner d program files quancom qlib32 samples gpib delphi Gilt nur bei einer Installation in das Standartverzeichnis Welche Schritte n tig sind um die QLIB zu eigenen Proje
52. tags Donnerstag von 9 00 bis 18 00 Freitags von 9 00 bis 17 00 63 64 Aktuelle Treiber Reparatur Auf unserer Internetseite http www quancom de k nnen sie immer die neusten Treiber Versionen und Updates finden Zudem finden Sie ebenfalls viele andere Informationen und die Frequently asked questions FAQ s Bevor Sie uns kontaktieren berpr fen Sie ob die neueste Version der QUANCOM Software installiert ist Wenn Sie nicht genau wissen ob die QUANCOM Karte defekt ist rufen Sie unsere QUANCOM Hotline an Tel 49 22 36 89 92 20 Bevor Sie uns die Karte zur Reparatur schicken rufen Sie unsere Hotline an Tel 49 22 36 89 92 20 Wenn Sie uns die Karte zur ckschicken legen Sie diese bitte in die Originalverpackung oder eine ad quate Verpackung um einen Transportschaden zu verhindern Zus tzlich bitten wir Sie uns eine Kopie der Originalrechnung mitzuschicken QUANCOM Informationssysteme GmbH 8 2 Technisches Support Formular Wenn Sie einen Internetzugang haben ffnen Sie folgende URL in Ihrem Browser http www quancom de quancom qshop nsf techniksupport OpenForm amp deu F llen Sie das Formular komplett aus bevor Sie sich an QUANCOM Informationssysteme GmbH wenden Wenn Sie andere QUANCOM Hardware oder Software nutzen f gen Sie das bitte dem Formular hinzu Name Firma Adresse Telefon Fax Computer Prozessor Betriebssystem Grafikkarte

Download Pdf Manuals

image

Related Search

2801.5KB 28015 bremen 28015 brandy creek ln 28015 burnett hills ln

Related Contents

For your own safety, please read this user manual carefully before  Mode d`emploi    Shatter Termite Bait Attention! Dangereux pour les humains et les  Brosse de prélèvement cytologique biliaire INFINITY®  MANUEL Remise BMSGBOO  USER MANUAl - Riello UPS  Samsung GT-S7220 Kasutusjuhend  Manual  Red Hat Network Satellite 5.5 Referenzhandbuch  

Copyright © All rights reserved.
Failed to retrieve file