6-6
Programming Options
Creating a Simple Visual Basic Application
1. Create a Visual Basic form.
2. Add the following source code to declare, open, close, read, and write
a PIO device:
Option Explicit
Dim PIO As New KISAPIO
Private Sub Close_Click()
PIO.CloseDevice
End Sub
Private Sub btOpen_Click()
PIO.OpenDevice (Val(tbDevice))
End Sub
Private Sub btRead_Click()
tbValue=Hex(PIO.Read(Val(tbAddr)))
End Sub
Private Sub btWrite_Click_()
Dim v As Byte
v=Val(tbValue)
PIO.Write Val(tbAddr), v
End Sub
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com