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

ENH: add MR1K3 as veto device for TMO #42

Merged
merged 7 commits into from
Jun 28, 2024
Merged

Conversation

nrwslac
Copy link
Contributor

@nrwslac nrwslac commented Jun 20, 2024

Description

  • Upgrade PMPS library 3.0.14 -> 3.3.0
  • Veto all TMO optics faults when TXI MR1K3 is IN and NOT OUT.

Motivation and Context

When MR1K3 is in, TMO devices should not fault the beam.
TXI preparing for beamtime.

https://jira.slac.stanford.edu/browse/ECS-5580

How Has This Been Tested?

This branch is running on the PLC with synced IOC. We set MR1K3 in by forcing the encoder values sent to the arbiter from TXI-Optics. I then looked at the faults on tmo optics to make sure they were being vetoed.

Where Has This Been Documented?

Screenshots (if appropriate):

beam-line-txi
Screenshot 2024-06-26 at 2 02 42 PM

Pre-merge checklist

  • Code works interactively
  • Code contains descriptive comments
  • Test suite passes locally
  • Libraries are set to fixed versions and not Always Newest
  • Code committed with pre-commit (alternatively pre-commit run --all-files)

@ZLLentz
Copy link
Member

ZLLentz commented Jun 20, 2024

Hi Nick, can you please add a link to the jira related to this PR in the context section? (and fill out any other sections you have info for). We can review without this because it's clear now why this is happening but in a year this info will be helpful when tracking changes.

@nrwslac nrwslac requested a review from ZLLentz June 26, 2024 21:37
@@ -33,6 +34,9 @@ bMR1K1_IN := PMPS.PMPS_GVL.stCurrentBeamParameters.aVetoDevices[PMPS.K_Stopper.M

bST3K4_IN := PMPS.PMPS_GVL.stCurrentBeamParameters.aVetoDevices[PMPS.K_Stopper.ST3K4];

bMR1K3_IN := PMPS.PMPS_GVL.stCurrentBeamParameters.aVetodevices[PMPS.K_Stopper.MR1K3_IN]
AND NOT PMPS.PMPS_GVL.stCurrentBeamParameters.aVetoDevices[PMPS.K_Stopper.MR1K3_OUT];

fbArbiterIO(i_bVeto:= bMR1K1_IN, Arbiter := GVL_PMPS.g_fbArbiter1, fbFFHWO := GVL_PMPS.g_FastFaultOutput1);

GVL_PMPS.g_FastFaultOutput2.i_xVeto := bMR1K1_IN OR bST3K4_IN;
Copy link
Member

Choose a reason for hiding this comment

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

Right here: I expected FFO2 to be vetoed by MR1K3

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thats true, we could write that here, but I though that would be redundant with the higher and lower authority logic of FB_VetoArbiter. Let me see if I can point to that in the that function block.

Copy link
Contributor Author

@nrwslac nrwslac Jun 26, 2024

Choose a reason for hiding this comment

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

https://github.com/pcdshub/lcls-twincat-pmps/blob/8dba453befd302b8dd2d2e4236c991742574cd25/lcls-twincat-pmps/PMPS/MajorComponents/Arbiter/FB_VetoArbiter.TcPOU#L37

I think this means in this case, when fbarbiter2 requests veto, fbarbiter1 removes fbarbiter2's request and requests full beam for it. If that's all it does, then you're right, we need to add MR1K3 IN as a veto condition for fbArbiter2.

Copy link
Member

Choose a reason for hiding this comment

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

I think the higher/lower authority veto logic is independent from the fast fault veto logic

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does FF2 need to veto MR1K1 even? Its fault is linked to FF1 which already vetos on MR1K1? Would be the same for MR1K3.

Copy link
Member

Choose a reason for hiding this comment

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

I agree, if the fault 2 and arbiter 2 are linked to fault 1 and arbiter 1 respectively, and the two have the same veto sets, then the 2s can lean on the veto definitions of the 1s

this is all very confusing

@@ -33,6 +34,9 @@ bMR1K1_IN := PMPS.PMPS_GVL.stCurrentBeamParameters.aVetoDevices[PMPS.K_Stopper.M

bST3K4_IN := PMPS.PMPS_GVL.stCurrentBeamParameters.aVetoDevices[PMPS.K_Stopper.ST3K4];

bMR1K3_IN := PMPS.PMPS_GVL.stCurrentBeamParameters.aVetodevices[PMPS.K_Stopper.MR1K3_IN]
AND NOT PMPS.PMPS_GVL.stCurrentBeamParameters.aVetoDevices[PMPS.K_Stopper.MR1K3_OUT];

fbArbiterIO(i_bVeto:= bMR1K1_IN, Arbiter := GVL_PMPS.g_fbArbiter1, fbFFHWO := GVL_PMPS.g_FastFaultOutput1);
Copy link
Member

Choose a reason for hiding this comment

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

Right here: I expected Arbiter1 to be vetoed by MR1K3

@ZLLentz
Copy link
Member

ZLLentz commented Jun 26, 2024

Maybe I need to review the diagram again

ZLLentz
ZLLentz previously approved these changes Jun 27, 2024
Copy link
Member

@ZLLentz ZLLentz left a comment

Choose a reason for hiding this comment

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

Sending my approve before I forget, I think all the vetoes are covered now

@nrwslac nrwslac merged commit 78162a9 into pcdshub:master Jun 28, 2024
9 checks passed
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.

2 participants