HQWHUµ(2,RQODVWE\WH¶ÀDJ
enter end-of-string mode/byte: 10
Program supply to
ud0: ibwrt “sour:volt 100”
100 volts output
[0100] ( cmpl )
count: 12
Program supply to
ud0: ibwrt “sour:curr 5”
5 amps output
[0100] ( cmpl )
count: 11
Query: “What is
ud0: ibwrt “meas:volt?”
output voltage?”
[0100] ( cmpl )
count: 10
Read response
ud0: ibrd 50
[2100] ( end cmpl )
Supply reported output voltage
count: 11
31 30 30 2e 30 38 0a 1 0 0 . 0 8 .
1.10.2 EXAMPLE PROGRAM WRITTEN IN VISUAL BASIC
Microsoft’s Visual Basic is a windows programming language that may be used to create
“virtual instruments” and automation programs. Here is a simple program which 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 “Start” button and a text box to show
the measured voltage. The syntax of the CALLed functions are correct only for National
Instruments and compatible IEEE controllers. Don’t forget to add the forms “Ni-global.bas”
and “Vbib-32.bas” to your project.
Example Program Written in Visual Basic
Option Explicit
Dim SupplyUD As Integer ‘supply device descriptor
Dim strMeasVolt As String * 50 ‘buffer for reading input message
Private Declare Function GetTickCount Lib “kernel32” () As Long
Private Sub cmdStart_Click()
‘start program here after “Start” button clicked
‘open IEEE port, get “User Device Description” = SupplyUD
Summary of Contents for Genesys Series
Page 1: ...6 3 3 0XOWL URS QWHUIDFH 2SWLRQ...
Page 2: ...USER MANUAL FOR IEEE PROGRAMMING INTERFACE FOR GENESYSTM POWER SUPPLIES 5HY...
Page 3: ...7KLV SDJH LQWHQWLRQDO OHIW EODQN...
Page 40: ...NOTES...
Page 41: ...NOTES...