EasyManua.ls Logo

YOKOGAWA 765501 - Page 228

YOKOGAWA 765501
277 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...
16-56
IM 765501-01E
‘—————————————————————————————————
‘ Generate triggers and read the measured results
‘ Generate triggers from a PC and read the results
‘—————————————————————————————————
Function TrigReadAsString(dev As Integer) As String ‘ String output
TrigReadAsString = CommQuery(dev, “:INIT;*TRG;:FETC?”)
End Function
Function TrigReadAsDouble(dev As Integer) As Double ‘ Real number output
TrigReadAsDouble = Val(TrigReadAsString(dev))
End Function
‘—————————————————————————————————
‘ Sample Sequence 2
‘ Set the GS610 to Setup 2 and vary the source level as follows: 2.8 V, 2.9 V,
‘ 3.0 V, 3.1 V, and 3.2 V. Then, generate a trigger, read the results, and turn
‘ the output OFF.
‘—————————————————————————————————
Function SampleSequence2()
Dim dev As Integer
Dim result(5) As Double
dev = CommOpen() ‘ Open the device
Call Setup2(dev) ‘ Set to Setup 2
Call CommSend(dev, “:SOUR:VOLT:LEV 2.8”) ‘ Set the level to 2.8 V
result(0) = TrigReadAsDouble(dev) ‘ Generate a trigger and read the
‘ result
Call CommSend(dev, “:SOUR:VOLT:LEV 2.9”) ‘ Set the level to 2.9 V
result(1) = TrigReadAsDouble(dev) ‘ Generate a trigger and read the
‘ result
Call CommSend(dev, “:SOUR:VOLT:LEV 3.0”) ‘ Set the level to 3.0 V
result(2) = TrigReadAsDouble(dev) ‘ Generate a trigger and read the
‘ result
Call CommSend(dev, “:SOUR:VOLT:LEV 3.1”) ‘ Set the level to 3.1 V
result(3) = TrigReadAsDouble(dev) ‘ Generate a trigger and read the
‘ result
Call CommSend(dev, “:SOUR:VOLT:LEV 3.2”) ‘ Set the level to 3.2 V
result(4) = TrigReadAsDouble(dev) ‘ Generate a trigger and read the
‘ result
Call CommSend(dev, “:OUTP:STAT OFF”) ‘ Turn the output OFF
Call CommClose(dev) ‘ Close the device
End Function
16.4 Sample Programs

Table of Contents

Related product manuals