9.9 Sample Programs
172
External Trigger Measurement 1
Measure and import according to the external triggering of the RM3542A (F4 [MANU] key or the TRIG signal
input), and save the measurements in a text file.
Private Sub MeasureTrigSub()
Dim buffer As String
∗
20
' Receiving buffer
Dim recvstr As String
' Receiving char string
Dim pad As Integer
' Controller address
Dim gpibad As Integer
' Device address
Dim timeout As Integer
' Timeout period
Dim ud As Integer
' State (unused)
Dim i As Integer
pad = 0
' Board address 0
gpibad = 1
' RM3542A address 1
timeout = T100s
' Timeout 100 s (because of the external trigger wait
state)
Call ibfind("gpib0", 0)
' Initialize GP-IB
Call ibdev(pad, gpibad, 0, timeout, 1, 0, ud)
Call SendIFC(pad)
Open App.Path & "\data.csv" For Output As #1
' Open a text file to save
Call Send(pad, gpibad, ":TRIG:SOUR EXT", NLend)
' Select external trigger
Call Send(pad, gpibad, ":INIT:CONT OFF", NLend)
' Continuous measurement OFF
For i = 1 To 10
Call Send(pad, gpibad, ":READ?", NLend)
' Send ":READ?" to measure and import the mea-
surement
Call Receive(pad, gpibad, buffer, STOPend)
' Receive
recvstr = Left(buffer, InStr(1, buffer, Chr(10)) - 1)
Print #1, Str(i) & "," & recvstr
' Write to the file
Next
Close #1
Call ibonl(pad, 0)
End Sub
Summary of Contents for RM3542-50
Page 1: ......
Page 2: ......
Page 6: ...Table of Contents iv...
Page 26: ...1 3 Screen Organization 20...
Page 32: ...2 3 Turning the Power On and Off 26...
Page 48: ...3 8 Confirming Faulty Measurements 42...
Page 72: ...4 14 Compensating for Thermal EMF Offset Offset Voltage Compensation OVC 66...
Page 84: ...5 7 Initializing Reset 78...
Page 94: ...6 4 Auto Exporting Measurement Values at End of Measurement Data Output Function 88...
Page 206: ...11 4 Disposing of the Instrument 200...
Page 216: ...Appendix 5 Dimensional diagram A10 Appendix 5 Dimensional diagram Unit mm...
Page 230: ...Index Index 4...
Page 231: ...HIOKI E E CORPORATION...
Page 232: ......
Page 233: ......
Page 234: ......