要將雙向直流電源輸出電流序列的步進(jìn)模式設(shè)置為自動(dòng)(即電源按預(yù)設(shè)序列自動(dòng)執(zhí)行,無需手動(dòng)或外部觸發(fā)每一步),需結(jié)合序列模式配置、循環(huán)控制及狀態(tài)查詢指令。以下是具體步驟與指令示例:
plaintextSOURce:LIST:FUNCtion ON
plaintextSOURce:LIST:COUNt <N>
<N>為序列總點(diǎn)數(shù)(如3點(diǎn)序列:SOURce:LIST:COUNt 3)。plaintextSOURce:LIST:CURRent:DATA<n> <I_value>, <dwell_time>
<n>:序列點(diǎn)序號(如DATA1、DATA2)。<I_value>:電流值(單位:A)。<dwell_time>:持續(xù)時(shí)間(單位依設(shè)備而定,如秒或毫秒)。plaintextSOURce:LIST:CURRent:DATA1 0, 2 ; 第1點(diǎn):0A,持續(xù)2秒SOURce:LIST:CURRent:DATA2 5, 2 ; 第2點(diǎn):5A,持續(xù)2秒
SOURce:LIST:CURRent:DATA3 0, 2 ; 第3點(diǎn):0A,持續(xù)2秒
plaintextSOURce:LIST:CYCLe:STATe ON
plaintextSOURce:LIST:CYCLe:COUNt INF
plaintextOUTPut:STATe ON
plaintextSYSTem:REMote ; 切換至遠(yuǎn)程模式*RST ; 復(fù)位設(shè)備(可選)
SOURce:LIST:FUNCtion ON ; 啟用序列模式
SOURce:LIST:COUNt 3 ; 設(shè)置3個(gè)序列點(diǎn)
SOURce:LIST:CURRent:DATA1 0, 2 ; 第1點(diǎn):0A,2秒
SOURce:LIST:CURRent:DATA2 5, 2 ; 第2點(diǎn):5A,2秒
SOURce:LIST:CURRent:DATA3 0, 2 ; 第3點(diǎn):0A,2秒
SOURce:LIST:CYCLe:STATe ON ; 啟用循環(huán)(可選)
SOURce:LIST:CYCLe:COUNt INF ; 無限循環(huán)(可選)
OUTPut:STATe ON ; 啟動(dòng)輸出(自動(dòng)執(zhí)行序列)
plaintextSOURce:LIST:STATe? ; 返回"RUNNING"或"IDLE"
plaintextSOURce:LIST:CURRent:DATA2 10, 2 ; 修改為10A,2秒
LIST:LOOP控制循環(huán):plaintextLIST:LOOP:COUNt 5 ; 循環(huán)5次
plaintextSOURce:CURRent:RAMP:TIME 0.1 ; 全局斜坡時(shí)間0.1秒
plaintextSOURce:CURRent:PROTection:LEVel? ; 查詢電流保護(hù)閾值
plaintextSYSTem:ERRor?
-221:設(shè)置沖突(如循環(huán)模式未啟用但設(shè)置循環(huán)次數(shù))。-350:指令語法錯(cuò)誤(如拼寫錯(cuò)誤)。plaintext; 主設(shè)備SYSTem:COMMunicate:SYNC:ROLE MASTER
SYSTem:COMMunicate:SYNC:OUTput ON
; 從設(shè)備
SYSTem:COMMunicate:SYNC:ROLE SLAVE
SYSTem:COMMunicate:SYNC:INput ON
pythonimport pyvisarm = pyvisa.ResourceManager()power = rm.open_resource("TCPIP0::192.168.1.100::inst0::INSTR") # 替換為實(shí)際地址# 初始化與復(fù)位power.write("SYSTem:REMote")power.write("*RST")# 配置序列power.write("SOURce:LIST:COUNt 3")power.write("SOURce:LIST:CURRent:DATA1 0, 2")power.write("SOURce:LIST:CURRent:DATA2 5, 2")power.write("SOURce:LIST:CURRent:DATA3 0, 2")# 啟用循環(huán)(可選)power.write("SOURce:LIST:CYCLe:STATe ON")power.write("SOURce:LIST:CYCLe:COUNt INF")# 啟動(dòng)輸出power.write("OUTPut:STATe ON")# 查詢狀態(tài)(示例)current_point = int(power.query("SOURce:LIST:ADVance:COUNter?"))print(f"當(dāng)前序列點(diǎn): {current_point}")power.close()
SOURce:LIST:FUNCtion ON啟用序列模式后,電源按預(yù)設(shè)點(diǎn)自動(dòng)執(zhí)行,無需額外觸發(fā)。SOURce:LIST:CYCLe指令實(shí)現(xiàn)重復(fù)執(zhí)行,適用于長時(shí)間測試。PROG:LIST前綴),需參考具體手冊。