42
Sample program
'Initial setting of 8526 [DC withstanding voltage test]
Private Sub Command2_Click ( )
Dim szBuf As String, nSTB As STB8526_ID
Dim Sets As String
Command1. Enabled = False
Command2. Enabled = False
Command3. Enabled = False
Command4. Enabled = False
'STATUS? command transmission
If SendComm ("STATUS?", szBuf) = False Then GoTo Exit_Command2_Click:
If ErrorHandler (szBuf) = False Then GoTo Exit_Command2_Click:
szBuf = "&H" & szBuf
If IsNumeric (szBuf) = False Then GoTo Exit_Command2_Click:
nSTB = CLng (szBuf)
If (nSTB And sREADY) = 0 Then
MsgBox "It is not the condition which can be setup.", vbCritical
GoTo Exit_Command2_Click:
End If
'Construction of SET: command
Sets = "SET:" & "MODE=AC"
Sets = Sets & "," & "DVOLT=5.0kV"
Sets = Sets & "," & "DLEVEL=OFF"
Sets = Sets & "," & "DHIGH=5.0mA"
Sets = Sets & "," & "DLOW=OFF"
Sets = Sets & "," & "DTIMER=2.0s"
'SET: command transmission
If SendComm (Sets, szBuf) = False Then GoTo Exit_Command2_Click:
If ErrorHandler (szBuf) = False Then GoTo Exit_Command2_Click:
'RESET command transmission
If SendComm ("RESET", szBuf) = False Then GoTo Exit_Command2_Click:
If ErrorHandler (szBuf) = False Then GoTo Exit_Command2_Click:
Command3. Enabled = True
Command4. Enabled = True
Exit_Command2_Click:
Command1. Enabled = True
Command2. Enabled = True
Exit Sub
End Sub
'Finish button
Private Sub Command5_Click ( )
Unload Me
End Sub
Contact Information
Name : Tsuruga Electric Corporation
Address : 1-3-23 Minami-Sumiyoshi, Sumiyoshi-ku, Osaka-shi
558-0041
Japan