Skip to content

muon tpar improvements - #976

Open
rerpha wants to merge 3 commits into
masterfrom
8990
Open

muon tpar improvements#976
rerpha wants to merge 3 commits into
masterfrom
8990

Conversation

@rerpha

@rerpha rerpha commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Description of work

Add your own description here

To test

Which ticket does this PR fix?

Acceptance criteria

List the acceptance criteria for the PR

  • ** If this PR changes GALIL / GALILMUL ioc are these changes applicable to both the old (galil-old branch based) and new (master branch based) drivers? If so have all appropriate PRs been created **

Code Review

Functional Tests

  • IOC responds correctly in:
    • Devsim mode
    • Recsim mode
    • Real device, if available
  • Supplementary IOCs (..._0n where n>1) run correctly
  • Log files do not report undefined macros (serach for macLib: macro to find instances of macLib: macro [macro name] is undefined...

Final steps

  • Update the IOC submodule in the main EPICS repo. See Git workflow page for details.
  • Reviewer has merged the associated PR for the release notes

< $(IOCSTARTUP)/init.cmd

epicsEnvSet("PORT", "fserv")
epicsEnvSet("EDITOR_TPAR_FILE_DIR", $(EDITOR_TPAR_FILE_DIR="C:/Instrument/Settings")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EDITOR_TPAR_FILE_DIR now has a default applied from config.xml, so i think this line should be removed?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally I think there's not enough closing brackets on this line...

FileContentsServerConfigure($(PORT), "$(EDITOR_TPAR_FILE_DIR)")
epicsEnvSet("PORT1", "fservtpar")
epicsEnvSet("PORT2", "fservtparbooster")
FileContentsServerConfigure($(PORT1), "$(EDITOR_TPAR_FILE_DIR)", "$(TPAR_FILE=)", "$(TPAR_CURRENT_FILE=current.tpar)")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TPAR_CURRENT_FILE doesn't seem to be a config.xml macro, should it be?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really want it to ever change and I don't think scientists should be. I'm happy to make it a macro at least that can be overwritten in globals.txt, but i dont think it wants to be in config.xml

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im being stupid - it alreayd is a macro

## Simple string PVs
dbLoadRecords("$(TOP)/db/muon_tpar.db","P=$(MYPVPREFIX)$(IOCNAME):,TPAR_FILE=current.tpar,TPAR_FILE_PV_NAME=TPAR_FILE")
dbLoadRecords("$(TOP)/db/muon_tpar.db","P=$(MYPVPREFIX)$(IOCNAME):,TPAR_FILE=current_booster.tpar,TPAR_FILE_PV_NAME=BOOSTER_TPAR_FILE")
dbLoadRecords("$(TOP)/db/muon_tpar.db","P=$(MYPVPREFIX)$(IOCNAME):,TPAR_FILE=$(BOOSTER_TYPE=OXF13),TPAR_FILE_PV_NAME=BOOSTER_TYPE")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OXF13 default now applied by config.xml instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true - will remove. I don't think i'd pulled lowri's changes when doing this branch so hadn't thought to take all of these macros + defaults out of st.cmd

dbLoadRecords("$(TOP)/db/muon_tpar.db","P=$(MYPVPREFIX)$(IOCNAME):,TPAR_FILE=$(TPAR_FILE=),TPAR_FILE_PV_NAME=TPAR_FILE")
dbLoadRecords("$(TOP)/db/muon_tpar.db","P=$(MYPVPREFIX)$(IOCNAME):,TPAR_FILE=$(BOOSTER_TPAR_FILE=),TPAR_FILE_PV_NAME=BOOSTER_TPAR_FILE")
## Simple string PVs
dbLoadRecords("$(TOP)/db/muon_tpar.db","P=$(MYPVPREFIX)$(IOCNAME):,TPAR_FILE=current.tpar,TPAR_FILE_PV_NAME=TPAR_FILE")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the TPAR_CURRENT_FILE macro is kept this should then be $(TPAR_CURRENT_FILE) or $(TPAR_CURRENT_FILE=current.tpar) depending on config.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants