Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change IDFF IOC for Trim correctors #312

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion si-ap-idff/scripts/sirius-ioc-si-ap-idff.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,21 @@

def main():
"""Launch IOC."""
ioc_module.run(sys.argv[1])
idname = sys.argv[1]

# select by idname what correctors belong to IDFF
kwargs = dict(
enbl_chcorrs=False, enbl_cvcorrs=False,
enbl_qscorrs=False, enbl_lccorrs=False,
enbl_qncorrs=False)
if idname in ('SI-08SB:ID-IVU18', 'SI-14SB:ID-IVU18'):
kwargs.update(
dict(enbl_qncorrs=True))
elif idname in ('SI-10SB:ID-DELTA52', 'SI-10SB:ID-EPU50'):
kwargs.update(
dict(enbl_chcorrs=True, enbl_cvcorrs=True, enbl_qscorrs=True))

ioc_module.run(sys.argv[1], **kwargs)


if __name__ == "__main__":
Expand Down
4 changes: 2 additions & 2 deletions si-ap-idff/si_ap_idff/si_ap_idff.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def update_pv(self, pvname, value, **kwargs):
self.updatePV(pvname)


def run(idname):
def run(idname, **kwargs):
"""Run main module function."""
# define abort function
_signal.signal(_signal.SIGINT, _stop_now)
Expand All @@ -76,7 +76,7 @@ def run(idname):

# define IOC, init pvs database and create app object
_version = '1.0.0'
app = _App(idname)
app = _App(idname, **kwargs)
dbase = app.pvs_database
dbase['Version-Cte']['value'] = _version
_ioc_prefix = _VACA_PREFIX + ('-' if _VACA_PREFIX else '')
Expand Down