Quantum Data 801GF Spezifikationen Seite 35

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 40
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 34
Publication # 68-00155 (Rev: B 26-JULY-95) Page 35
Appendix C: Visual Basic Source Code Listings
You can control and program the ISA generator using Visual Basic. The supplied Windows disk includes three files
to run a sample Visual Basic application. It does not include the required Visual Basic programming language. You
will need to have Visual Basic installed on your computer to run the sample application. The supplied files are called:
EXAMPLE.MAK EXAMPLE.FRM HEADER.BAS
The sample software puts up a small Window with five buttons in it. The buttons let you do the following things:
Open communications with a generator at ISA address Ø (Factory default jumper settings)
Download a Format to the generator
Download an Image to the generator
Retrieve an identification string from the generator
Re-initialize the generator’s memory to factory default conditions and recalibrate the outputs
To run the sample application, do the following steps:
Select the Visual Basic icon in the Windows Program Manager.
Select “Open Project” from the “FIle” menu.
Choose EXAMPLE.MAK in the dialog box.
Select “Run” to start the program.
You can use these files in creating your own Visual Basic applications. We have included listings for two of the files.
The HEADER.BAS file takes care of defining constants and variables used with the board’s low level communications
and error handling routines. It is also responsible for declaring the external functions in the DLL. Its contents should
be used with little or no modification.
The EXAMPLE.FRM file can be used as a starting point for your own programs. The listing shows the sub-routines
used for the different button functions. The portion of the file that defines the buttons’ positions and labeling is not
listed.
Listing of: HEADER.BAS
Option Explicit
Global Const NO_Connection = 0
Global Const ISA_Connection = 1
Global Const Com_Connection = 2
'Global definitions for the response from the DLL
Global Const PORT_OK = 0
Global Const PORTERROR_ISANUMBAD = 1
Global Const PORTERROR_ISAMISSING = 2
Global Const PORTERROR_COMNUMBAD = 3
Global Const PORTERROR_COMMISSING = 4
Global Const PORTERROR_NOCONNECT = 5
Global Const PORTERROR_ECHOTIME = 6
Global Const PORTERROR_ECHOCHAR = 7
Global Const PORTERROR_ECHOCMD = 8
Global Const PORTERROR_USERQUIT = 9
Global Const PORTERROR_CMDINVALID = 10
Global Const PORTERROR_EXEINVALID = 11
Global Const PORTERROR_BUFFOVRFLOW = 12
Global Const PORTERROR_BOARDHUNG = 13
'Taken from Constant.txt
Global Const MB_ICONSTOP = 16 ' Critical message
Global Const MB_YESNO = 4 ' Yes and No buttons
Global Const IDYES = 6 ' Yes button pressed
'Define the communication setup to send to the Hia.Dll
Seitenansicht 34
1 2 ... 30 31 32 33 34 35 36 37 38 39 40

Kommentare zu diesen Handbüchern

Keine Kommentare