Skip to content

Add PINI=YES to the records named in the settings request files - #186

Open
xmap wants to merge 1 commit into
tomography:masterfrom
xmap:add-pini-to-settings-records
Open

Add PINI=YES to the records named in the settings request files#186
xmap wants to merge 1 commit into
tomography:masterfrom
xmap:add-pini-to-settings-records

Conversation

@xmap

@xmap xmap commented Aug 19, 2026

Copy link
Copy Markdown

Addresses #182. Autosave restores these records at boot without processing them, so they come back with the right value but no EPICS timestamp and STAT still at UDF. A client recording scan provenance cannot date the setting.

PINI=YES makes each record process once at iocInit, which runs after both autosave restore passes (initHookAfterInitDevSup and initHookAfterInitDatabase), so it is the restored value that gets stamped, not the default.

Scope. Exactly the records listed in tomoScan_settings.req and tomoScan_2BM_settings.req, 67 records across the two templates. None has an OUT, INP, DOL, FLNK or SDIS field, so processing writes nothing out, reads nothing in, and triggers nothing downstream. The busy command records @MarkRivers flagged (StartScan, AbortScan, MoveSampleIn, MoveSampleOut) are commented out of the request file and are not in scope.

Verified on a scratch IOC, base 7.0.8 with autosave R5-11, across a real restart:

record       PINI   value after reboot        UDF  SEVR       TIME
------------------------------------------------------------------------
ao_pini      YES    42.5                      0    NO_ALARM   2026-08-19 16:26:42
ao_nopini    no     43.5                      0    NO_ALARM   <undefined>
wf_pini      YES    /data/2026-08/sampleA     0    NO_ALARM   2026-08-19 16:26:42
wf_nopini    no     /data/2026-08/sampleB     1    INVALID    <undefined>

The waveform case was the one I most wanted to check, since PINI makes a waveform process and its device support read INP. With Soft Channel and an empty INP, read_wf() returns immediately without touching bptr or nord, so the restored buffer survives, as the table shows.

Happy to extend to the other beamline templates once this shape is agreed. Worth applying after #185, which fixes the request files that silently drop their last PV.

Autosave restores these at boot without processing them, so they come
back carrying the right value but with no EPICS timestamp, and STAT
still at UDF. Channel Access clients recording scan provenance cannot
date the setting, and array-backed records additionally come back
INVALID. PINI=YES makes each record process once at iocInit, after both
restore passes, so the restored value is the one that gets stamped.

Scope is exactly the records listed in tomoScan_settings.req and
tomoScan_2BM_settings.req. None of them has an OUT, INP, DOL, FLNK or
SDIS field, so processing writes nothing out, reads nothing in and
triggers nothing. The busy command records (StartScan, AbortScan,
MoveSampleIn, MoveSampleOut) are commented out of the request file and
so are not in scope.

Verified on a scratch IOC (base 7.0.8, autosave R5-11) across a restart.

Refs tomography#182
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.

1 participant