[wip] fast shutter eh2

parent 68531082
......@@ -113,4 +113,4 @@
axis_name: sh2
closed_position: 35
opened_position: -1
external-control: $opiom_shutter_switch
......@@ -13,7 +13,7 @@
P201: 0
MUSST: 1
EXT_TRIG: 2
0: 3
ZERO: 3
- label: FSH_MODE
comment: fsh mode
......
......@@ -7,3 +7,19 @@
#opiom_prg_root: /opiom_prog
#program: /users/blissadm/local/isg/opiom/20180608_134312_multiplexer-eh3
program: /users/blissadm/local/isg/opiom/20180412_113520_multiplexer-eh2
#- class: Switch
# module: opiom
# name: opiom_shutter_switch
# opiom: $opiom_eh2
# register: IMA
# mask: 0x3
# shift: 1
# states:
# - label: OPEN
# value: 1
# - label: CLOSED
# value: 0
......@@ -6,5 +6,7 @@
#- dummy
#- musst_eh2
#- measurement_eh2
- multiplexer_eh2
- opiom_eh2
- sh2
- fseh2
......@@ -21,3 +21,14 @@ print("")
sync()
wa()
fseh2.set_external_control(fseh2_set_open, fseh2_set_close, fseh2_is_opened)
fseh2.init()
fseh2.mode = fseh2.EXTERNAL
fseh2.mode
print("--- loading scripts/eh2.py")
def fseh2_set_open():
# function
print("--- fseh2_set_open()")
if fseh2_is_opened():
print("--- fseh2_set_open() RETURN")
return
print("--- fseh2_set_open() ACTION")
fseh2_toggle()
def fseh2_set_close():
# function
print("--- fseh2_set_close()")
if not fseh2_is_opened():
print("--- fseh2_set_close() RETURN")
return
print("--- fseh2_set_close() ACTION")
fseh2_toggle()
def fseh2_toggle():
if multiplexer_eh2.getOutputStat("FSHUTTER_POL") == "NORMAL":
multiplexer_eh2.switch("FSHUTTER_POL", "INVERTED")
else:
multiplexer_eh2.switch("FSHUTTER_POL", "NORMAL")
def fseh2_is_opened():
# function
print("--- fseh2_is_opened")
return fseh2.opened_position == fseh2._axis.position
def fseh2on():
fseh2.mode = fseh2.EXTERNAL
def fseh2off():
fseh2.mode = fseh2.MANUAL
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment