要将双向直流电源的电流序列步进延时(即序列点之间的过渡时间)设置为0,需通过SCPI指令禁用斜率控制或直接配置序列点的过渡时间为0(具体方法取决于设备型号)。以下是详细步骤和指令说明:
plaintextSOURce:CURRent:SLEW:STATe OFF ; 关闭斜率限制(输出立即跳变)
plaintextSOURce:CURRent:SLEW MAX ; 将斜率设为设备允许的最大值(最小过渡时间)
若电源支持序列模式(List Mode)且允许为每个点指定过渡时间,可直接设置为0:
plaintextSOURce:LIST:FUNCtion ON ; 启用序列模式SOURce:LIST:COUNt 3 ; 设置3个序列点
SOURce:LIST:CURRent:DATA1 0, 2, 0 ; 第1点:0A, 2秒, 过渡时间0秒
SOURce:LIST:CURRent:DATA2 5, 2, 0 ; 第2点:5A, 2秒, 过渡时间0秒
SOURce:LIST:CURRent:DATA3 0, 2, 0 ; 第3点:0A, 2秒, 过渡时间0秒
OUTPut:STATe ON ; 启用输出
DATA<n>的第三个参数为过渡时间(单位秒),设为0表示立即跳变。plaintextLIST:FUNCtion ON ; 启用序列模式LIST:COUNt 3 ; 设置3个序列点
LIST:CURRent:DATA1 0, 2, 0 ; 第1点:0A, 2秒, 过渡时间0秒
LIST:CURRent:DATA2 5, 2, 0 ; 第2点:5A, 2秒, 过渡时间0秒
LIST:CURRent:DATA3 0, 2, 0 ; 第3点:0A, 2秒, 过渡时间0秒
OUTPut:STATe ON ; 启用输出
plaintextPROG:LIST:CURR:RAMP:STATe OFF ; 关闭斜坡功能(立即跳变)PROG:LIST:CURR:DATA1 0, 2 ; 第1点:0A, 2秒(无过渡时间参数)
PROG:LIST:CURR:DATA2 5, 2 ; 第2点:5A, 2秒
PROG:LIST:CURR:DATA3 0, 2 ; 第3点:0A, 2秒
OUTPut:STATe ON ; 启用输出
plaintextSOURce:LIST:STEP:TRANsition 0 ; 设置步进过渡时间为0秒SOURce:LIST:CURRent:DATA1 0, 2 ; 第1点:0A, 2秒
SOURce:LIST:CURRent:DATA2 5, 2 ; 第2点:5A, 2秒
OUTPut:STATe ON ; 启用输出
STEP:TRANsition直接控制步进过渡时间。pythonimport pyvisarm = pyvisa.ResourceManager()power = rm.open_resource("TCPIP0::192.168.1.100::inst0::INSTR") # 替换为实际设备地址# 1. 进入远程模式power.write("SYSTem:REMote")# 2. 复位设备(可选)power.write("*RST")# 3. 启用序列模式(通用方法)power.write("SOURce:LIST:FUNCtion ON")power.write("SOURce:LIST:COUNt 3")# 4. 配置序列点(以Keysight N6700为例)power.write("SOURce:LIST:CURRent:DATA1 0, 2, 0") # 过渡时间0秒power.write("SOURce:LIST:CURRent:DATA2 5, 2, 0")power.write("SOURce:LIST:CURRent:DATA3 0, 2, 0")# 5. 禁用斜率控制(备用方法,确保无延时)power.write("SOURce:CURRent:SLEW:STATe OFF")# 6. 启动输出power.write("OUTPut:STATe ON")# 7. 验证设置(查询第一个序列点的过渡时间)transition_time = power.query("SOURce:LIST:CURRent:DATA1?")print(f"第1点过渡时间: {transition_time.strip()}") # 应返回"0,2,0"power.close()
SOURce:LIST:FUNCtion?)。SOURce:CURRent:SLEW:STATe?)。