User`s guide
Table Of Contents
- Agilent E3632A DC Power Supply
- Table of Contents
- List of Figures
- List of Tables
- 1 Getting Started
- 2 Operation and Features
- Overview
- Constant Voltage Operation
- Constant Current Operation
- Storing and Recalling Operating States
- Programming the Overvoltage Protection
- Programming the Overcurrent Protection
- Remote Voltage Sensing
- Disabling the Output
- System-Related Operations
- Remote Interface Configuration
- GPIB Interface Configuration
- RS-232 Interface Configuration
- Calibration
- 3 Remote Interface Reference
- SCPI Command Summary
- Introduction to the SCPI Language
- Simplified Programming Overview
- Using the APPLy Command
- Output Settings and Operation Commands
- Triggering Commands
- System-Related Commands
- Calibration Commands
- RS-232 Interface Commands
- SCPI Status Registers
- What is an event register?
- What is an enable register?
- SCPI status system
- The Questionable Status register
- The Standard Event register
- The Status Byte register
- Using Service Request (SRQ) and Serial POLL
- Using *STB? to read the Status Byte
- Using the Message Available Bit (MAV)
- To interrupt your bus controller using SRQ
- To determine when a command sequence is completed
- Using *OPC to signal when data is in the output buffer
- Status Reporting Commands
- Halting an Output in Progress
- SCPI Conformance Information
- IEEE-488 Conformance Information
- 4 Error Messages
- 5 Application Programs
- 6 Tutorial
- 7 Characteristics and Specifications
Application Programs 5
Example Program for Excel 5.0 (Windows 3.1 and GPIB)
E3632A User’s Guide 147
If InStr(SCPICmd, "?") Then 'If a query read the response string
errorStatus = viRead(vi, ByVal readbuf, 512, actual)
ReturnString = readbuf
'Strip out any nul's from the response string.
crlfpos = InStr(ReturnString, Chr$(0))
If crlfpos Then
ReturnString = Left(ReturnString, crlfpos - 1)
End If
SendSCPI = ReturnString 'return the remaining string
End If ' end of query to instrument for a response
Exit Function
VIerrorHandler:
'Display the error message in the txtResponse TextBox
MsgBox " I/O Error: " & Error$()
'Close the device session
errorStatus = viClose(vi)
Exit Function
End Function
Sub OpenPort()
Dim VISAaddr As String
'****************************
'Change the GPIB address here
'****************************
VISAaddr = "5"
errorStatus = viOpenDefaultRM(videfaultRM) 'open the visa session
'Open communication to instrument
errorStatus = viOpen(videfaultRM, "GPIB0::" & VISAaddr & "::INSTR",0, 1000, vi)
If errorStatus < VI_SUCCESS Then ' on error give message
Cells(1, 1) = "Unable to Open port"
End If
End Sub
Sub ClosePort()
errorStatus = viClose(vi)
'close the session
errorStatus = viClose(videfaultRM)
End Sub
End of program