Information
‘assume power supply address is set to “6” on DIP switch
Call ibdev(0, 6, 0, T3s, 1, 10, intSupplyUD)
Call ibwrt(SupplyUD, “:volt 100”) ‘program output to 100 volts
Call ibwrt(SupplyUD, “:curr 2”) ‘program output to 2 amps
Wait 500 ‘wait 0.5 sec to settle
Call ibwrt(SupplyUD, “meas:volt?”) ‘ask “What is output voltage?”
Call ibrd(SupplyUD, strMeasVolt) ‘read back output voltage
txtOutVolt.Text = strMeasVolt ‘display output voltage on window
End Sub
Private Sub Wait(mSecWait As Long)
‘subroutine to wait “mSecWait” milliseconds
Dim StartTime As Long
StartTime = GetTickCount
Do
Loop While (GetTickCount - StartTime < mSecWait)
End Sub
1.10.3 EXAMPLE PROGRAM WRITTEN IN LABVIEW
The National Instruments LabVIEW programming language is a popular language which is opti-
mized for instrument control and data analysis. It is a graphical language where functions are shown
DVLFRQVZLWKFRQQHFWLRQSRLQWVDQGGDWDÀRZVDORQJGUDZQOLQHV+HUHLVDVLPSOHSURJUDPZKLFK
sends commands to a power supply to set the voltage, set the current and measure the voltage. The
program’s window only contains two items: a numeric control for the supply IEEE address and a text
indicator to show the measured voltage.