LoginSignup
1
1

More than 3 years have passed since last update.

B2902 SMU + 82357Bによる自動測定

Posted at

Keysight B2902 SMU + Keysight 82357B USB-GPIBを使って自動測定するためのメモです。

USB-GPIBインターフェースの接続

ここではKeysight純正のUSB-GPIBインターフェースをVISA (Virtual Instrument Software Architecture)でつなぐ。VISAは測定器制御のためのソフトウェア共通規格。

  1. KeySight USB-GPIBインターフェース 82357B接続し,PCのUSB端子につなぐ。「不明なデバイス」として認識される。[ドライバーの更新]で探しても出てこない。
  2. 82357B, ドライバで検索すると,2007年版のドライバ(XP, 2000用)が出てくる。これは使わない。(ことが後でわかった)
  3. Agilent IO Libraries Suite 14.2が必要なので,これを検索してダウンロード。実際にはIO Library Suite 2018というもの。ファイル名 IOLibSuite_18_1_24715.exe。
  4. IO Libraries Suiteを実行してインストール。Visual C++ 2012, 2015, を入れられてしまう。これを入れると,82357Bが不明なデバイスでなくなりWindowsに認識される。
  5. pip install pyvisa [Enter] でPythonのVISAコントロールをインストールする。
  6. B2902の設定を行なう。System>>Info>>Date/Time, System>>PLC
  7. I/O>>GPIBでAddressが23であることを確認。”GPIB0::23::INSTR”
  8. pythonで下記を実行する。
Python 3.6.2 (v3.6.2:5fd33b5, Jul  8 2017, 04:14:34) [MSC v.1900 32 bit (Intel)] on win32

Type "help", "copyright", "credits" or "license" for more information.
>>> import visa
>>> rm = visa.ResourceManager()
>>> rm.list_resources()
('GPIB0::23::INSTR',)
>>> inst = rm.open_resource('GPIB0::23::INSTR')
>>> print(inst.query("*IDN?"))
Keysight Technologies,B2902A,MY51143336,3.1.1645.5820

>>>

コマンドの要点

  • 60Hz電源設定 “:SYST:LFR 60”
  • CH1, 2の出力をON/OFFする “:OUTP1 ON”, “:OUTP2 ON”
  • SOUR, SENS, OUTPはその後にチャネル番号を続ける。
  • MEAS?はMEAS? (@1,2) とチャンネルリストを続ける。

スポット測定

inst.write("*RST")
inst.write("*CLS")
inst.write(":sour1:func:mode volt")
inst.write(":sour2:func:mode curr")
inst.write(":sens1:curr:rang:auto on")
inst.write(":sens2.volt:rang:auto on")
inst.write("outp1 on")
inst.write("outp2 on")
inst.write(":sour1:volt 20")

inst.query("meas:curr? (@1)").strip()
inst.query("meas:volt? (@2)").strip()

階段測定

npoint = 20
inst.write("*RST")
inst.write(":sour:func:mode volt")   
inst.write(":sour:volt:mode swe")
inst.write(":sour:volt:start 0")
inst.write(":sour:volt:stop 1")
inst.write(":sour:volt:poin {}".format(npoint)
inst.write(":sens:func \"curr\"")
inst.write(":sens:curr:nplc 1")
inst.write(":sens:curr:prot 0.1")
inst.write(":trig:sour aint")
inst.write(":trig:coun {}".format(npoint)
inst.write(":outp on")
ans = inst.query(":fetc:arr:curr? (@1)").strip().split(,)

終了判定

while (True):
    if int(inst.query(":STAT:OPER:COND?")) & 18 == 18:
        break

Ch2で行っていたら,18のところが1152になる。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1