35
8. Sample program
'
○
Here is the sample program source for Microsoft Visual Basic of 8527 control.
'
' 1. When the form is loaded, setting of the communication of 8527 and the operational check
are done.
' 2. Click of the command1[SETTING] button makes a change of test condition, set value.
'
Content of the setting is as follows:
'
MODE
= WI
'
WMARK
= 2.50kV
'
WLEVEL
= OFF
'
WHIGH
= 10.0mA
'
WLOW
= OFF
'
WTIMER
= 5.0s
'
IVOLT
= 0.5kV
'
IHIGH
= OFF
'
ILOW
= 100MOHM
'
IMASK
= 0.3s
'
ITIMER
= 5.0s
'
DISCHARGE
= ON
' 3. Click of command2[START] button starts the automatic test with the above set values.
' 4. The test can be stopped by the command3[STOP] button.
' 5. Sample program finishes with the command4[QUIT] button.
' 6. Data of communication content, test result and so on are occasionally displayed to
the text box (Text1).
'
○
About the object to arrange on the form
' MSComm1
:Microsoft Comm Control Arrange the component (OCX) on the form.
' Text1
:TextBox ※. Set MultiLine property to True
' Command1
:CommandButton
' Command2
:CommandButton
' Command3
:CommandButton
' Command4
:CommandButton