最新版はこちら。 いろいろ危ない世の中になってきたので、static に生成した html での公開に切り替えました。ご了承ください。
| 先月 | 2024年11月 | 来月 | ||||
|---|---|---|---|---|---|---|
| 日 | 月 | 火 | 水 | 木 | 金 | 土 |
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
環境設定→ページ表示→デフォルトレイアウトとズーム→ページレイアウトを連続ページに変更する
# pyvisa library should be installed by pip or somethind
import pyvisa
import sys
# Class to control USB relay X-RL2
class InstRelay:
def __init__(self, rm, visaId):
try:
self.instP = rm.open_resource(visaId)
except:
print("USB relay X-RL2 が認識できません")
while True:
key = input("Press Enter to exit.")
if not key:
break
sys.exit()
self.normalA()
self.normalB()
print("Relay is ready, A, B channels are normal state.")
def switchA(self):
self.instP.write('A1')
def switchB(self):
self.instP.write('B1')
def normalA(self):
self.instP.write('A0')
def normalB(self):
self.instP.write("B0")
#==================MAIN ROUTINE FROM HERE==================
# visa device names. Check by Keysight Connection Expert.
visaIdrelay = "ASRL3::INSTR" # X-RL2
# sleep time between meas. event
rm = pyvisa.ResourceManager()
RL2 = InstRelay(rm, visaIdrelay)
while True:
ui = input("Press key: A(sw)/a(norm) B(sw)/b(nrom) Q(uit)")
if ui == 'A':
RL2.switchA()
print("chA is now switched")
elif ui == 'a':
RL2.normalA()
print("chA is now normal")
elif ui == 'B':
RL2.switchB()
print("chB is now swithced")
elif ui == 'b':
RL2.normalB()
print("chB is now normal")
elif ui == 'Q':
sys.exit("Quit program.")
certbot revoke --cert-path ほげほげ.pemでやる。UPKI のほうで証明書とったので、LE のは失効させたほうがいいかなと。