background image

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 4: ...0 3 EXAMPLE PROGRAM WRITTEN IN LABVIEW 6 2 PROGRAMMING COMMANDS 7 2 1 COMMAND NOTES 7 2 2 PROGRAMMING AND MESUREMENT COMMANDS 7 2 2 1 PROGRAM OUTPUT VOLTAGE 7 2 2 2 READ PROGRAMMED VOLTAGE COMMAND 8 2...

Page 5: ...TE COMMAND 19 2 6 12 READ OPERATION COMPLETE COMMAND 19 2 6 13 SAVE POWER SUPPLY SETTINGS COMMAND 19 2 6 14 RECALL POWER SUPPLY SETTINGS COMMAND 19 2 7 INSTRUMENT SELECT COMMANDS 20 2 7 1 SELECT SUPPL...

Page 6: ...T SWITCH LOCATION 3 FIGURE 3 IEEE SELECT SWITCH 3 FIGURE 4 STATUS AND ERROR REGISTER TREE POINT TO POINT MODE 31 FIGURE 5 STATUS AND ERROR REGISTER TREE MULTI DROP MODE 32 FIGURE 6 INSTRUMENT SUMMARY...

Page 7: ...control 2 Point to Point Mode will mean that 1 IEEE Interface can control only 1 GEN supply 3 Multi Drop Mode will mean that 1 IEEE Interface can control more than 1 GEN supply 4 When in Multi Drop Mo...

Page 8: ...l use the same commands as another s The Interface follows all of these standards Because many instruments may be connected and independently controlled by a single IEEE controller each instrument mus...

Page 9: ...face and activate the Power Supply s Serial RS232 or RS485 I O capability The position of Switch 1 may be changed at any time but the new setting will not take affect until the power is switched off a...

Page 10: ...ed If a command error exists or the Power Supply reports an error all subsequent commands in the buffer will be terminated and the status returned to the user I WKH XVHU HQWHUV PRUH WKDW HOGV DQ HUURU...

Page 11: ...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 t...

Page 12: ...ait 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 programmi...

Page 13: ...COND CURRENT CURR ENABLE ENAB ERROR ERR EVENT EVEN GLOBAL GLOB INSTRUMENT INST IMMEDIATE IMM ISUMMARY1 ISUM1 ISUMMARY2 ISUM2 ISUMMARY3 ISUM3 LEVEL LEV LIMIT LIM MEASURE MEAS MODE MOD NSELECT NSEL OPE...

Page 14: ...ntroller does the next IEEE Read the interface will send the measured voltage to it Example MEASURE VOLTAGE 2 2 4 PROGRAM OUTPUT CURRENT COMMAND The output current is programmed by sending the command...

Page 15: ...TATE 1 Notes 1 can be replaced with ON 2 2 8 DISABLE THE SUPPLY OUTPUT COMMAND The power supply output can be shut off by sending this command OUTPut STATe SP 0 This command is equivalent to programmi...

Page 16: ...upply is in Remote Mode and a 2 if the supply is in Remote Mode with Local Lock Out Syntax SYSTem SET Example SYSTEM SET Returns LOC REM LLO 2 3 GLOBAL OUTPUT COMMANDS 2 3 1 USAGE Global Commands are...

Page 17: ...URRENT AMPLITUDE 15 77 2 3 4 GLOBAL EANBLE THE SUPPLY OUTPUT COMMAND All power supply outputs can be turned on by sending this command GLOBal OUTPut STATe SP 1 The output will immediately jump to the...

Page 18: ...oltage Remote Local Mode Auto Safe Restart and Current Fold Back If the output of the supply was set to an OFF condition by the Front Panel Button before the RCL command was sent the supply will remai...

Page 19: ...e SOURCE VOLTAGE PROTECTION TRIPPED Read the response number The normal response is 0 zero If a 1 one is returned an over voltage has occurred and the output is shut down 2 4 1 4 SET THE UNDER VOLTAGE...

Page 20: ...TION STATE SP 0 Example SOURCE CURRENT PROTECTION STATE 0 2 4 2 3 READ CURRENT FOLD BACK STATE COMMAND Read if the Fold back is enabled or disabled The interface will return an ON if Fold Back Protect...

Page 21: ...he Output Queue Syntax SYSTem ERRor Example SYSTEM ERROR Returned Message Example 222 Data out of range 2 5 3 READ SUPPLY OUTPUT MODE COMMAND Read if the Power Supply is in the Constant Voltage Consta...

Page 22: ...command is in addition to the SCPI compliance requirements 2 5 6 READ SCPI VERSION COMMAND Read the SCPI Compliance year that this interface adheres to Syntax SYSTem VERSion Example SYSTEM VERSION 2 6...

Page 23: ...ary weighted number from 0 to 255 Syntax STB Example STB Notes The returned value is a decimal number representing the sum of all the bits The range of value is 0 to 255 2 6 5 SET STANDARD EVENT STATU...

Page 24: ...identity string format is Manufacturer Model max volt max curr S N supply serial REV power supply revision IEEE interface version Syntax IDN Example IDN Return message example Lambda 6 200 S N 11111 1...

Page 25: ...age Remote Local Mode Auto Safe Restart Current Fold Back etc can be stored in Memory To change one or more settings enter the one or more commands with new settings and then enter this command Syntax...

Page 26: ...turns the selected Supply number xx 2 8 STATUS COMMANDS 2 8 1 READ OPERATIONAL CONDITION EVENT REGISTER COMMAND Reads the Operational Condition Event Register and puts the result in the Output Queue S...

Page 27: ...e Example STATUS OPERATION ENABLE Notes The returned value is a decimal number representing the sum of all the enabled bits The range of value is 0 to 255 2 8 5 READ QUESTIONABLE CONDITION EVENT REGIS...

Page 28: ...BLE INSTRUMENT SUMMARY ENABLE REGISTER COMMAND See Figure 6 and Section 2 9 8 THE SUMMARY REGISTERS Enable an SRQ from a sup ply to set Bit 0 of the Questionable Condition condition register Syntax ST...

Page 29: ...ary register needs to be read to know if an HYHQW RFFXUUHG LQ DQ RWKHU UHJLVWHU 7KLV IDQ RXW DOORZV DXWRPDWLF WHVW SURJUDPV WR HI FLHQWO manage the remote programming mode A diagram of the register st...

Page 30: ...a signal onto the Service Request SRQ line in the IEEE cable The controller program can detect the SRQ read what the problem is from the power supply and clear the SRQ The bit assignments for the Stat...

Page 31: ...Not used 7 128 PON Power On Set when power is switched on Table 2 The Standard Event Status Register 2 9 5 1 THE STANDARD EVENT STATUS ENABLE REGISTER See the SET STANDARD EVENT STATUS ENABLE REGISTER...

Page 32: ...FW WKH FRQGL tions under which the power supply is operating 2 9 6 2 THE OPERATIONAL CONDITION ENABLE REGISTER See the READ OPERATIONAL CONDITION ENABLE REGISTER COMMAND STATUS OPERATION ENABLE the SE...

Page 33: ...ONDITION REGISTER COMMAND STATUS 48 67 21 21 7 21 DQG 7DEOH 7KH ELWV DV OLVWHG LQ 7DEOH UH HFW WKH TXHVWLRQDEOH error conditions under which the power supply is operating 2 9 7 2 THE QUESTIONABLE COND...

Page 34: ...1 2 3 The INSTRUMENT SUMMARY EVENT REGISTER ISUM1 through ISUM3 see Figure 6 will record the address of the supply causing an SRQ These are EVENT registers and the bits will remain set until read by t...

Page 35: ...Character A character was received that is not a z A Z 0 9 period space CR LF V LT 50 VOLT 50 102 Syntax error IEEE receives unrecognized command word BEAS VOLT VOLTS 150 104 Data type error IEEE rec...

Page 36: ...Enable Open shutdown Enable Open occurred from rear panel J1 340 Internal message fault HQHUDO QRQ VSHFL HG QWHUQDO PHVVDJH IDXOW 341 QSXW RYHU RZ IEEE receive data buffer is too full 342 QWHUQDO RYH...

Page 37: ...FLD OTP AC Output Enable Over Voltage Prot Fold Back Prot Over Temperature AC Fail Output Off Shut Off Spare ENA OFF SO OVP FLD OTP AC 6 5 4 3 2 1 LSB 0 MSB 15 8 9 10 11 7 6 5 4 3 2 1 LSB 0 MSB 7 Cons...

Page 38: ...Voltage Prot Fold Back Prot Over Temperature AC Fail Output Off Shut Off Instrument Summary ENA OFF SO OVP FLD OTP AC 6 5 4 3 2 1 0 MSB 15 8 9 10 11 7 6 5 4 3 2 1 LSB 0 MSB 7 Constant Voltage Local R...

Page 39: ...8 9 10 11 7 12 13 14 ISUM2 SRQ0 SRQ1 SRQ2 SRQ3 SRQ4 SRQ5 SRQ6 SRQ8 SRQ7 SRQ9 SRQ10 SRQ11 SRQ12 SRQ13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 STAT QUES INST ISUM1 ENAB STAT QUES INST ISUM1 ST...

Page 40: ...NOTES...

Page 41: ...NOTES...

Page 42: ...0HQDUD 0HUDLV 1R DODQ 6HFWLRQ 3HWDOLQJ D D 6HODQJRU DUXO KVDQ 0DOD VLD 7HO D ZZZ WGN ODPEGD FRP 1257 0 5 7 DPEGD PHULFDV QF VVH 5G 1HSWXQH 1 7HO D PDLO VDOHV XV WGN ODPEGD FRP ZZZ XV WGN ODPEGD FRP K...

Reviews: