Visual Basic 6.0 Programming Demo
Enter the Visual Basic 6.0 programming environment and follow the steps below.
1. Build a standard application program project (Standard EXE).
2. Open Project→Add File… and add visa32.bas which contains all VISA
functions and constant statements to the project.
Then add the Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds
As Long) statement into the visa32.bas, or create a new module to declare
the Sleep function.
3. Add the Text, Edit and Button controls as shown in the figure below.
4. Encapsulate the write and read operations of VISA.
1) Encapsulate the write operation of VISA for easier operation.
'-----------------------------------------------------------
'Function Name:InstrWrite
'Function: Send command to the instrument
'Input: rsrcName,instrument(resource) name