44
Sample program
'Initial setting of 8527
Private Sub Command1_Click()
Dim szBuf As String, nSTB As STB8527_ID
Dim Sets As String
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
'SET: Command transmission
If SendComm("STATUS?", szBuf) = False Then GoTo Exit_Command1_Click:
If ErrorHandler(szBuf) = False Then GoTo Exit_Command1_Click:
szBuf = "&H" & szBuf
If IsNumeric(szBuf) = False Then GoTo Exit_Command1_Click:
nSTB = CLng(szBuf)
If (nSTB And sREADY) = 0 Then
MsgBox "It is not the condition which can be setup.", vbCritical
GoTo Exit_Command1_Click:
End If
'Construction of SET: command
Sets = "SET:" & "MODE=WI"
Sets = Sets & "," & "WMARK=2.50kV"
Sets = Sets & "," & "WLEVEL=OFF"
Sets = Sets & "," & "WHIGH=10.0mA"
Sets = Sets & "," & "WLOW=OFF"
Sets = Sets & "," & "WTIMER=5.0s"
Sets = Sets & "," & "IVOLT=0.5kV"
Sets = Sets & "," & "IHIGH=OFF"
Sets = Sets & "," & "ILOW=100MOHM"
Sets = Sets & "," & "IMASK=0.3s"
Sets = Sets & "," & "ITIMER=5.0s"
Sets = Sets & "," & "DISCHARGE=ON"
'SET: command transmission
If SendComm(Sets, szBuf) = False Then GoTo Exit_Command1_Click:
If ErrorHandler(szBuf) = False Then GoTo Exit_Command1_Click:
'RESET command transmission
If SendComm("RESET", szBuf) = False Then GoTo Exit_Command1_Click:
If ErrorHandler(szBuf) = False Then GoTo Exit_Command1_Click:
Command2.Enabled = True
Command3.Enabled = True
Exit_Command1_Click:
Command1.Enabled = True
Exit Sub
End Sub
'Finish button
Private Sub Command4_Click()
Unload Me
End Sub
Contact Information
Name : Tsuruga Electric Corporation
Address : 1-3-23 Minami-Sumiyoshi, Sumiyoshi-ku, Osaka-shi
558-0041
Japan