8230 Optical Power Meter Operation Manual
4.7 Sample Programs
4-22
4.7 Sample Programs
This section shows examples of program that control the instrument.
Compatible PC: Manufactured by Fujitsu FMV - 6667ML6c Windows98SE
Driver: ADC Instruments USB Driver 1.0.1
Standard module:  ausb.bas which is included in the ADC Instruments USB Driver.
Compatible language: MS-EXCEL2000 VBA
4.7.1 Program Example 1
Acquires the measurement data for the specified number of times. Press [ENTER] for the specified num-
ber of times after pressing [START].
Figure 4-2    Measurement Image
Program list
Option Explicit 'All variables are clearly declared.
Private Const OK As Integer = 0 'Defines OK.
Dim enterF As Integer 'ENTER input flag
Sub Starts to acquire the measurement data in the specified number of times ().
'Subroutine for the START button on the
sheet.
    Dim OPM1 As Long 'USB handle
    Dim myID As Long 'MYID which is set in OPM
    Dim ret As Long 'Driver return value
    Dim mcnt As Integer 'Specified  number  of  times  in  which  the
data is acquired.
    Dim cnt As Integer 'Number  of  times  in  which  the  data  is
acquired.