
4-44
GPIB Operation
KJM6335
4.6
Sample Program
The following demonstrates a sample program in which the
KJM6335 is GPIB-controlled, using Microsoft Visual Basic via a
National Instruments GPIB board meeting NI-488.2 specifications.
The program sets up each item, then displays a jitter value and
judgment result once.
'----------------------------------------------------
Dim rd As Integer
Call ibfind("DEV2", rd)
'Opens GPIB device.
Call ibconfig(rd, 6, 1)
'Sets device configuration (enable
'repetition of addressing).
'Model information acquisition [company name, model, and version number]
'----------------------------------------------------
Call ibwrt(rd, "*IDN?")
'Sends model information acquisition
'message.
Dim strModelInfo As String
strModelInfo = Space(128)
Call ibrd(rd, strModelInfo)
'Reads out model information and stores it
'to a variable.
MsgBox Left(strModelInfo, ibcntl)
'Front panel setup
'----------------------------------------------------
Call ibwrt(rd, "TIM:CON 0.3")
'Sets TIME CONST to 0.3s
Call ibwrt(rd, "SYM:MOD AUT")
'Sets SYMMETRY mode to AUTO
Call ibwrt(rd, "DEL:MOD AUT")
'Sets DELAY mode to AUTO
Call ibwrt(rd, "RF:TRIG:EDG POS")
'Sets trigger edge to POSITIVE
'(
) (RF SIGNAL INPUT)
Call ibwrt(rd, "RF:IMP 50")
'Sets impedance to 50
Ω
'(RF SIGNAL INPUT)
Call ibwrt(rd, "CLOC:TRIG:EDG POS")
'Sets trigger edge to POSITIVE
'(
)(CLOCK INPUT)
Call ibwrt(rd, "CLOC:IMP 50")
'Sets impedance to 50
Ω
(CLOCK
'INPUT)
Call ibwrt(rd, "MET:SCAL 20")
'Sets meter scale to 20%
Call ibwrt(rd, "JUD:LEV 7.77")
'Sets judgment level to 7.77%
Call ibwrt(rd, "PLL ON")
'PLL clock regeneration circuit to ON
Call ibwrt(rd, "EQ ON")
'Equalizer circuit to ON
' Jitter value acquisition
'----------------------------------------------------
Dim strImrStat As String
strImrStat = Space(16)
Do
Call ibwrt(rd, "IMR?")
'Sends a measurement status acquisition
'message.
Call ibrd(rd, strImrStat)
Loop Until Left(strImrStat, 1) = "1"
'Waits for the measured value to reach
'20% or less.
Summary of Contents for KJM6335
Page 10: ...VIII Contents KJM6335...
Page 12: ...P 2 Preface KJM6335...
Page 41: ...KJM6335 Operation 3 7...
Page 47: ...KJM6335 Operation 3 13...
Page 104: ...4 46 GPIB Operation KJM6335...
Page 112: ...5 8 Control Using EXT I O KJM6335...
Page 126: ...A 2 Appendix KJM6335...