
DEVICE
DRIVERS
VISUAL BASIC
Select Kajei_oi7 driver as a reference in your
programming environment.
In Visual Basic, use Project, References, and then
checkmark the appropriate
Kajei_oi7 driver. Some examples:
Kajei oi725 Visa ActiveX EXE
Device Driver
Kajei oi736 Visa ActiveX EXE
Device Driver
Kajei oi742 Visa ActiveX EXE
Device Driver
. . .
You now can call the functions from your
program.
An example of a function call would be:
Private Sub
Command2_Click()
Dim DEV as
kajei_oi736, erc as Long,
temperature as Single
Set DEV = new
kajei_oi736
erc =
DEV.oi7_sessionOpen("ASRL1::INSTR", "5C7-361",
1) ' Start a session.
If erc <> 0 Then
Msgbox "Could
not start VISA session."
Exit Sub
End If
erc =
DEV.oi7_readTemperature(1, temperature) '
Get temperature from controller #1.
erc =
DEV.oi7_sessionClose() ' Close the
session.
Msgbox "The current
temperature is " &
temperature & " degrees C."
Set DEV = Nothing
End Sub
When you are done with a session, or if your
application needs to shutdown,
be sure to close the session. Note that you can use the close function
even if no session has been started, it will simply do nothing.
|