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

FIX: fix autosave pass1 by setting PINI=YES #236

Merged
merged 1 commit into from
Nov 12, 2020

Conversation

ZLLentz
Copy link
Member

@ZLLentz ZLLentz commented Nov 12, 2020

closes #235

This is a workaround fix for autosave pass1 not behaving as expected for records where PINI=0

Implementation:

  • Add a method update_pini_for_autosave on EPICSRecord with an appropriate docstring
  • Call this method when creating output records

With the goal of being able to cleanly remove this method if we figure out why the expected behavior did not work at ads-ioc in pcdshub/ioc-common-ads-ioc#65

Resulting diff on my test IOC (extended to show the full record):

$ git diff
diff --git a/iocBoot/ioc-tc-mot-example/tc_mot_example.db b/iocBoot/ioc-tc-mot-example/tc_mot_example.db
index 319a356..cd3628b 100644
--- a/iocBoot/ioc-tc-mot-example/tc_mot_example.db
+++ b/iocBoot/ioc-tc-mot-example/tc_mot_example.db
@@ -13,6 +13,7 @@ record(ai, "PLC:TST:PASS1_RBV") {

 record(ao, "PLC:TST:PASS1") {
   field(DESC, "Main.fAutoPass1")
+  field(PINI, "1")
   field(DTYP, "asynFloat64")
   field(OUT, "@asyn($(PORT),0,1)ADSPORT=851/Main.fAutoPass1=")
   field(PREC, "3")
   info(autosaveFields, "VAL")
   info(autosaveFields_pass0, "PREC")
   info(archive, "VAL")
 }

@ZLLentz ZLLentz requested a review from klauer November 12, 2020 18:34
Copy link
Contributor

@klauer klauer left a comment

Choose a reason for hiding this comment

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

This looks good. I'd like a bit more time to research this before rolling out the bandaid, but would not complain if it were deemed necessary to.

@ZLLentz
Copy link
Member Author

ZLLentz commented Nov 12, 2020

I'd like to deploy the bandaid during the upcoming PAMM next week if we can't find the real culprit. This would help a lot with the tmo and fee vacuum systems.

@klauer
Copy link
Contributor

klauer commented Nov 12, 2020

Sounds like a plan. Will make a goal today to dive a bit deeper, ensuring there's enough time to tag/rebuild/release IOCs for the PAMM.

@klauer
Copy link
Contributor

klauer commented Nov 12, 2020

I'm convinced this is the correct fix, not a band-aid. Let's move forward with it.

@klauer klauer changed the title MNT: band-aid fix for autosave pass1 MNT: fix autosave pass1 by setting PINI=YES Nov 12, 2020
@klauer klauer changed the title MNT: fix autosave pass1 by setting PINI=YES FIX: fix autosave pass1 by setting PINI=YES Nov 12, 2020
@klauer klauer merged commit 554734d into pcdshub:master Nov 12, 2020
@ZLLentz ZLLentz deleted the pass1-bandaid branch December 24, 2020 01:44
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.

pass1 Autosave is Broken
2 participants