EasyManua.ls Logo

Hioki BT3563A - Page 179

Hioki BT3563A
228 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
8.8 Sample Programs
173
8
Chapter 8 RS-232C/GP-IB/LAN Interfaces
(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 MeasureTrigSub()
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)
im 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 EXT", NLend) 'Select external triggering
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
HIOKI BT3562A981-09

Table of Contents

Related product manuals