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.
Summary of Contents for PEM-320
Page 2: ...PEM 320 Polarization Extinction Ratio Meter Operation Manual...
Page 7: ...PEM 320 Operation Manual...
Page 9: ...1 2 PEM 320 Operation Manual...
Page 11: ...2 2 PEM 320 Operation Manual...
Page 33: ...8 6 PEM 320 Operation Manual...
Page 37: ...9 4 PEM 320 Operation Manual...
Page 41: ...10 4 PEM 320 Operation Manual...
Page 43: ...11 2 PEM 320 Operation Manual...
Page 45: ...12 2 PEM 320 Operation Manual...