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

Ticket2813 riken changeover logic #218

Merged
merged 13 commits into from
Feb 14, 2018

Conversation

Tom-Willemsen
Copy link
Contributor

@Tom-Willemsen Tom-Willemsen commented Jan 17, 2018

Description of work

Adds a coordinator IOC.

This IOC is intended to be reusable in different configurations but initially is being used for two (very similar) tasks:

  • Riken port changeover
  • Riken RB2 mode change

To test

ISISComputingGroup/IBEX#2813

Acceptance criteria

  • Changeovers are started when input PV is changed (currently pointing at SIMPLE)

  • Waits for relevant power supplies to be OFF

  • Sets DISP field on power setpoints

  • Allows changeover (currently pointing at SIMPLE)

  • Waits for changeover to be complete

  • Re-enables DISP on power PVs

  • Process can be safely interrupted at any point in the above process.


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 moved the release notes entry for this ticket in the "Changes merged into master" section

@@ -0,0 +1,55 @@
# RELEASE - Location of external support modules
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you avoid the use of MASTER_RELEASE as per ISISComputingGroup/IBEX#2320. See https://github.com/ISISComputingGroup/EPICS-ioc/blob/master/ISISDAE/configure/RELEASE for an example. Add this IOC to the ticket when done.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.


dbLoadRecords("$(TOP)/db/riken_changeover.db","PV_PREFIX=$(MYPVPREFIX),P=$(MYPVPREFIX)$(IOCNAME):,OK_TO_RUN_PSUS=$(PC_OK_TO_RUN_PSUS),PSU_DISABLE=$(PC_PSU_DISABLE),PSU_POWER=$(PC_PSU_POWER)")
dbLoadRecords("$(TOP)/db/riken_port_changeover_psus.db","PV_PREFIX=$(MYPVPREFIX),P=$(MYPVPREFIX)$(IOCNAME):,OK_TO_RUN_PSUS=$(PC_OK_TO_RUN_PSUS),PSU_DISABLE=$(PC_PSU_DISABLE),PSU_POWER=$(PC_PSU_POWER)")
dbLoadRecords("$(TOP)/db/riken_changeover_groups.db","PV_PREFIX=$(MYPVPREFIX),P=$(MYPVPREFIX)$(IOCNAME):,OK_TO_RUN_PSUS=$(PC_OK_TO_RUN_PSUS),PSU_DISABLE=$(PC_PSU_DISABLE),PSU_POWER=$(PC_PSU_POWER)")
Copy link
Contributor

Choose a reason for hiding this comment

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

For readability, only pass the macros which are actually required.

Copy link
Contributor

Choose a reason for hiding this comment

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

In which case do we need to set them as EPICS env variables at all or can we just pass them straight to the seq in the st.cmd?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason you can't pass them straight to seq in the individual st.cmds is that starting a sequence program before iocInit is called is a bad idea (undefined behaviour?)

@DominicOram
Copy link
Contributor

Seems to work as described, some small issues:

  • Please write a page on the wiki about this IOC, both the things you think could be used in other situations and the bits specific to this case.
  • This isn't a requirement of this ticket but would it be useful to add an OPI for this functionality? e.g. turn off all three power supplies with one button, give feedback on what the next steps are. @KathrynBaker?
  • As discussed:
    • Can you pull the PLC into a macro?
    • Only one group is needed

@Tom-Willemsen
Copy link
Contributor Author

Review comments addressed. Documentation added.

@DominicOram DominicOram merged commit 6bbe631 into master Feb 14, 2018
@DominicOram DominicOram deleted the Ticket2813_riken_changeover_logic branch February 14, 2018 14:28
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.

None yet

2 participants