POLARIZATION EXTINCTION RATIO METER PEM-320
9-1
9
Example Programs
9.1. GPIB Program
‘Read PER Routine
‘Subroutine description
Private Sub PER_Read_dB()
‘Sets routine name to
PER_Read_dB
‘Define Variables
‘Comment
Dim Status_PER As String * 30
‘Dimensions Status_PER
array as String length 30
Dim pem320 As Integer
‘Dimensions pem320 as
integer
Dim pem320a As Integer
‘Dimensions pem320a as
integer for error checking
‘Initialise Device
‘Comment
Call SendIFC(0)
‘Initialise GPIB interface
Call ibdev(0, 1, 0, T10s, 0, 0, pem320)
‘Open and initialise device
Call ibln(pem320, 1, 0, pem320a)
‘Check for device presence
(error checking)
gpib_dl$ = Chr$(13) + Chr$(10)
‘Set Cr/Lf as delimitter
‘Read PER Subroutine
‘Comment
Call ibwrt(pem320, “PE” + gpib_dl$)
‘Set output variable to
PER in dB
Call ibrd(pem320, Status_PER)
‘Read set output variable
MsgBox (“PER = “ & Str(Status_PER))
‘Output read data to screen
End Sub
‘End subroutine
The following program provides an example of the use of the Control Commands for GPIB
communication. The program is written in Visual Basic and has an output function to read the
Polarization Extinction Ratio and an input function to set the measurement speed to 5Hz.
Содержание PEM-320
Страница 2: ...PEM 320 Polarization Extinction Ratio Meter Operation Manual...
Страница 7: ...PEM 320 Operation Manual...
Страница 9: ...1 2 PEM 320 Operation Manual...
Страница 11: ...2 2 PEM 320 Operation Manual...
Страница 33: ...8 6 PEM 320 Operation Manual...
Страница 37: ...9 4 PEM 320 Operation Manual...
Страница 41: ...10 4 PEM 320 Operation Manual...
Страница 43: ...11 2 PEM 320 Operation Manual...
Страница 45: ...12 2 PEM 320 Operation Manual...