主要内容

从Keysight AgE3633A直流电源使用IVI-C驱动器设置输出电压并进行测量

本示例展示了如何使用Keysight™Technologies E3633A直流电源初始化驱动程序,读取驱动器的一些属性,设置输出电压,启用所有输出并测量输出电压,禁用所有输出并测量输出电压,并在MATLAB®中输出结果。

需求

要运行此示例,您的计算机上必须安装以下程序:

  • Keysight IO库2021或更新版本

  • Keysight E36xx, E36xxx直流电源IVI和MATLAB仪表驱动版本1.8.0.0

查看已安装的IVI-C Drivers

查看您的计算机上使用的IVI-C驱动程序和相关MATLAB驱动程序的列表ividriverlist

List = ividriverlist
列表=19×4表VendorDriver MATLABDriver IVIClass SupportedModels  __________________ __________________ ______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ " 1 " Ag3446x Ag3446x”“IVIDmm”{(“34460”“34461”“34465”“34470”]}2“AgAC6800”“AgAC6800”"IVIACPwr" {["AC6801A" "AC6801B" "AC6802A" "AC6802B" "AC6803A" "AC6803B" "AC6804A" "AC6804B" ]} 3 "AgE36xx" "AgE36xx" "IVIDCPwr" {["E36102A" "E36102B" "E36103A" "E36103B" "E36104A" "E36104B" "E36105A" "E36105B" "E36106A" "E36106B" "E36231A" "E36232A" "E36233A" "E36234A" "E36311A" "E36312A" "E36313A" "E3631A" "E3632A" "E3633A" "E3634A" "E3640A" "E3641A" "E3642A" "E3643A" "E3644A" "E3645A" "E3646A" "E3647A" "E3648A" "E3649A" "EDU36311A"]} 4 "agl453xdni" "agl453xdni" "IVIDigitizer" {["L4532A" "L4534A" ]} 5 "IviACPwr" "IviACPwr" "IVIACPwr" {["" ]} 6 "IviCounter" "IviCounter" "IVICounter" {["" ]} 7 "IviDCPwr" "IviDCPwr" "IVIDCPwr" {["" ]} 8 "IviDigitizer" "IviDigitizer" "IVIDigitizer" {["" ]} 9 "IviDmm" "IviDmm" "IVIDmm" {["" ]} 10 "IviDownconverter" "IviDownconverter" "IVIDownconverter" {["" ]} 11 "IviFgen" "IviFgen" "IVIFgen" {["" ]} 12 "IviPwrMeter" "IviPwrMeter" "IVIPwrMeter" {["" ]} 13 "IviRfSigGen" "IviRfSigGen" "IVIRfSigGen" {["" ]} 14 "IviScope" "IviScope" "IVIScope" {["" ]} 15 "IviSpecAn" "IviSpecAn" "IVISpecAn" {["" ]} 16 "IviSwtch" "IviSwtch" "IVISwtch" {["" ]} ⋮

连接到仪器

连接到模拟Keysight AgE3633A电源使用ividev与仪器的MATLAB驱动程序名称和资源名称。本例使用AgE36xx驱动程序的模拟模式运行,无需物理连接任何硬件。由于启用了模拟模式,资源名可以指定为空。

Dev = ividev(“AgE36xx”""模拟= true)
dev = AgE36xx with properties: Model: "E3633A" Manufacturer: "Agilent Technologies" SerialNumber: "" ResourceName: " VendorDriver: "AgE36xx" simulation: 1 CalibrationIDs: "Calibration1" OutputIDs: "Output1" TriggerIDs: "Trigger1" InherentIVIAttributes: [1x1 InherentIVIAttributes] Calibrations: [1x1 Calibrations] DigitalPort: [1x1 DigitalPort] Display: [1x1 Display] DLog: [1x1 DLog] Output: [1x1 Output] Outputs: [1x1 Outputs] Status: [1x1 Status] System: [1x1 System] Trigger: [1x1 System] Trigger: [1x1 System] Trigger: [1x1[1x1 Trigger]触发器:[1x1 Triggers]显示所有功能

获取一般设备属性

查询驱动及其属性信息。您可以通过单击对象输出显示中的属性链接来查看对象的属性和子属性。

dev.InherentIVIAttributes
ans = InherentIVIAttributes with properties: AdvancedSessionInformation: [1x1 AdvancedSessionInformation] DriverCapabilities: [1x1 DriverCapabilities] DriverIdentification: [1x1 DriverIdentification] InstrumentIdentification: [1x1 InstrumentIdentification] UserOptions: [1x1 UserOptions]
dev.InherentIVIAttributes.DriverIdentification
ans =带有属性的DriverIdentification: SpecificDriverClassSpecMajorVersion: 3 SpecificDriverClassSpecMinorVersion: 0 SpecificDriverDescription: " Agilent E36xx家族可编程电源的IVI驱动程序[编译为64位。' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '

设置输出电压

配置Output1的电压为1.23伏configureVoltageLevel函数。

输出电压= 1.23;%伏configureVoltageLevel (dev,“Output1”outputVoltage)流(“输出1设置为:1.23伏特\n”);
输出1设置为:1.23伏

使能所有输出并测量输出电压

将所有输出enable属性设置为true。

dev.Outputs.Enabled = true;流("所有输出已启用\n");
启用所有输出

测量电压应与之前设置的输出电压一致。

measVol =测量(dev,“Output1”“MEASURE_VOLTAGE”);流("输出1测量= %。4 g伏\ n”, measVol);
输出1测量= 1.23伏

关闭所有输出并测量输出电压

将所有输出启用属性设置为false。

dev.Outputs.Enabled = false;

由于所有输出都已禁用,测量电压应为0。

measVol =测量(dev,“Output1”“MEASURE_VOLTAGE”);流("输出1测量= %。4 g伏\ n”, measVol);
输出1测量= 0伏

查询和显示任何错误

如果有任何错误,查询驱动程序检索并显示它们。

errorNum = 1;(errorNum ~= 0) [errorNum,errorMsg] = error_query(dev);流('ErrorQuery: %d, %s\n'、errorNum errorMsg);结束
ErrorQuery: 0,没有错误。

清理

断开并清除ividev对象。

清晰的dev

另请参阅

||

相关的话题

Baidu
map