16-62
IM 765601-01E
Call CommSend(dev, ":CHAN1:SOUR:LEV 0.2V") ' CH1 Source level 0.2 (The actual output has not changed.
' Will change on a subsequent trigger.)
Call CommSend(dev, ":CHAN2:SOUR:LEV -5mA") ' CH2 Source level-5 mA (The actual output has not changed.
' Will change on a subsequent trigger.)
Call CommSend(dev,":CHAN1:INIT") ' CH1 New measurement
Call CommSend(dev, ":CHAN2:INIT") ' CH2 New measurement
Call CommSend(dev, "*TRG") ' Generate a trigger (The CH1 and CH2 outputs change
' simultaneously at this point.)
Call CommSend(dev, ":CHAN1:FETC?") ' CH1 Read measured result
result(1, 0) = Val(CommRecvString(dev)) ' CH1 Convert the measured result to values and store in array
Call CommSend(dev, ":CHAN2:FETC?") ' CH2 Read measured result
result(1, 1) = Val(CommRecvString(dev)) ' CH2 Convert the measured result to values and store in array
Call CommSend(dev, ":CHAN1:SOUR:LEV 0.5V") ' CH1 Source level 0.5 V (The actual output has not changed.
' Will change on a subsequent trigger.)
Call CommSend(dev, ":CHAN2:SOUR:LEV -10mA") ' CH2 Source level-10 mA (The actual output has not changed.
' Will change on a subsequent trigger.)
Call CommSend(dev, ":CHAN1:INIT") ' CH1 New measurement
Call CommSend(dev, ":CHAN2:INIT") ' CH2 New measurement
Call CommSend(dev, "*TRG") ' Generate a trigger (The CH1 and CH2 outputs change
' simultaneously at this point.)
Call CommSend(dev, ":CHAN1:FETC?") ' CH1 Read measured result
result(2, 0) = Val(CommRecvString(dev)) ' CH1 Convert the measured result to values and store in array
Call CommSend(dev, ":CHAN2:FETC?") ' CH2 Read measured result
result(2, 1) = Val(CommRecvString(dev)) ' CH2 Convert the measured result to values and store in array
Call CommSend(dev, ":CHAN1:SOUR:LEV 1.0V") ' CH1 Source level 1.0 V (The actual output has not changed.
' Will change on a subsequent trigger.)
Call CommSend(dev, ":CHAN2:SOUR:LEV -20mA") ' CH2 Source level-20 mA (The actual output has not changed.
' Will change on a subsequent trigger.)
Call CommSend(dev, ":CHAN1:INIT") ' CH1 New measurement
Call CommSend(dev, ":CHAN2:INIT") ' CH2 New measurement
Call CommSend(dev, "*TRG") ' Generate a trigger (The CH1 and CH2 outputs change
' simultaneously at this point.)
Call CommSend(dev, ":CHAN1:FETC?") ' CH1 Read measured result
result(3, 0) = Val(CommRecvString(dev)) ' CH1 Convert the measured result to values and store in array
Call CommSend(dev, ":CHAN2:FETC?") ' CH2 Read measured result
result(3, 1) = Val(CommRecvString(dev)) ' CH2 Convert the measured result to values and store in array
Call CommSend(dev, ":OUTP OFF")
Call CommClose(dev) ' Close the device
End Function
16.4 Sample Programs