![Hioki BT3562 Instruction Manual Download Page 180](http://html1.mh-extra.com/html/hioki/bt3562/bt3562_instruction-manual_2137240180.webp)
8.8 Sample Programs
174
(4) External Trigger Measurement 2
Measure and import according to external triggering of the instrument (
TRIG
key or EXT I/O TRIG terminal
input), and save measurements in a text file.
(The instrument imports the most recent measurement by trigger input timing with the continuous measure
-
ment state)
Private Sub MeasureTrig2Sub()
Dim buffer As String
40
'Receiving butter
Dim recvstr As String
'Receiving char string
Dim pad As Integer
'Controller access
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
'BT3562-01, BT3563-01 Address 1
timeout = T100s
'Timeout 100s (because of 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 for saving
Call Send(pad, gpibad, ":TRIG:SOUR IMM", NLend)
'Select internal triggering
Call Send(pad, gpibad, ":INIT:CONT ON", NLend)
'Continuous measurement ON
'Clear confirmation of External I/O TRIG input
Call Send(pad, gpibad, ":IO:IN?", NLend)
Call Receive(pad, gpibad, buffer, STOPend)
recvstr = Left(buffer, InStr(1, buffer, Chr(10)) - 1)
For i = 1 To 10
'Wait for External I/O TRIG input
Do While 1
Call Send(pad, gpibad, ":IO:IN?", NLend)
Call Receive(pad, gpibad, buffer, STOPend)
If Left(buffer, 1) = "1" Then Exit Do
DoEvents
Loop
Call Send(pad, gpibad, ":FETCH?", NLend)
'Send ":FETCH?" to import the most recent 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
HIOKI BT3562A981-09
Summary of Contents for BT3562
Page 2: ...HIOKI BT3562A981 09...
Page 24: ...1 5 Measurement Flowchart 18 HIOKI BT3562A981 09...
Page 84: ...4 13 Reset Function 78 HIOKI BT3562A981 09...
Page 102: ...6 3 Printing 96 HIOKI BT3562A981 09...
Page 186: ...8 8 Sample Programs 180 HIOKI BT3562A981 09...
Page 198: ...10 3 Error Display 192 HIOKI BT3562A981 09...
Page 200: ...194 HIOKI BT3562A981 09...
Page 220: ...Appendix 11 Dimensional Diagram A20 HIOKI BT3562A981 09...
Page 224: ...Index HIOKI BT3562A981 09...
Page 225: ...HIOKI BT3562A981 09...
Page 226: ...HIOKI BT3562A981 09...
Page 227: ...HIOKI BT3562A981 09...
Page 228: ...HIOKI BT3562A981 09...