
9.9 Sample Programs
152
External Trigger Measurement 1
Measure and import according to external triggering of the RM3542 (
F4
[MANU] key or TRIG signal 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 measurement
recvstr = ""
'From here on, continue receiving until an LF code occurs
While Right(recvstr, 1) <> Chr(10)
recvstr = r MSComm1.Input
DoEvents
'Input a trigger signal to the TRIG input pin of the EXT I/O
connector.
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
Summary of Contents for RM3542
Page 2: ......
Page 6: ...Contents iv ...
Page 16: ...Operating Precautions 10 ...
Page 26: ...1 3 Screen Organization 20 ...
Page 32: ...2 3 Turning the Power On and Off 26 ...
Page 46: ...3 8 Confirming Faulty Measurements 40 ...
Page 64: ...4 12 Compensating for Thermal EMF Offset Offset Voltage Compensation OVC 58 ...
Page 84: ...6 4 Auto Exporting Measured Values at End of Measurement Data Output Function 78 ...
Page 90: ...7 3 Printing 84 ...
Page 172: ...9 10 Device Compliance Statement 166 ...
Page 190: ...11 4 Disposing of the Instrument 184 ...
Page 200: ...Appendix 5 Dimensional Diagram A10 Appendix 5 Dimensional Diagram ...
Page 214: ...Index Index 4 ...
Page 215: ......
Page 216: ......
Page 217: ......
Page 218: ......