32
Sample program
'
--------------------------------------- Definition ---------------------------------------
Option Explicit
Private StopFlag As Boolean 'Flag to stop the test
' Wait, time out detection, for msec time, Windows API
Private Declare Function GetTickCount Lib "kerne132" ( ) As Long
' Definition of enumeration form of 8526 status
Private Enum STB8526_ID
sTEST = &H1
'Test in operation
sTEST_END = &H2
'Test ends
sH_V_OUT = &H4
'High voltage being output
sREADY = &H8
'In waiting
sA_TEST = &H10
'AC Withstanding voltage test in operation
sD_TEST = &H20
'DC Withstanding voltage test in operation
sGOOD = &H40
'Total judgement passed
sNG = &H80
'Total judgement failed
sW_HIGH = &H100
'Withstanding voltage test failed for high limit
sW_LOW = &H200
'Withstanding voltage test failed for low limit
sPROTECTION = &H4000
'Protective circuit activated
End Enum
' Definition of enumeration form of error code
Private Enum EER8526_ID
eNo_Error = 0
'Normal
eSyntax_Error = 1
'Command writing error
eOut_Of_Range = 2
'Out of effective range
eCondition = 3
'Setting condition error
eInitializing = 4
'8526 in initialization
eTesting = 5
'Test in operation
eRemote_Off = 6
'REMOTE= is OFF status
eSet_Construction = 7
'SET structural error
eKey_Operating = 8
'Being set by key operation
End Enum