8.8 Sample Programs
168
(3) External Trigger Measurement 1
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.
Private Sub MeasureTrigSubRS()
Dim recvstr As String
'Receiving char string
Dim i As Integer
MSComm1.Settings = "9600,n,8,1"
'Comm port setting
MSComm1.PortOpen = True
'Open a port
Open App.Path & "\data.csv" For Output As #1
'Open a text file for saving
MSComm1.Output = ":TRIG:SOUR EXT" & vbCrLf
'Select external triggering
MSComm1.Output = ":INIT:CONT OFF" & vbCrLf
'Continuous measurement OFF
For i = 1 To 10
MSComm1.Output = ":READ?" & vbCrLf
'Send ":READ?" to measure and import the mea
-
surement
recvstr = ""
'From here on, continue receiving until an LF code
occurs
While Right(recvstr, 1) <> Chr(10)
recvstr = r MSComm1.Input
DoEvents
Wend
recvstr = Left(recvstr, Len(recvstr) - 2)
'Delete the terminator (CR+LF)
Print #1, Str(i) & "," & recvstr
'Write to the file
Next
Close #1
MSComm1.PortOpen = False
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...