The lakeshore 340 is regularly getting a test failure on debug builds.
File "C:\Instrument\Apps\EPICS-System_Tests_debug\support\IocTestFramework\master\tests\lakeshore340.py", line 134, in test_WHEN_excitation_a_set_THEN_can_be_read_back
self.ca.assert_setting_setpoint_sets_readback(excitation, "EXCITATIONA")
Expected PV, 'TE:SPARE70:LKSH340_01:EXCITATIONA' to have value 'Off' (type: 'str').
Final PV value was '30 nA' (type: 'str')
After investigation i believe the error is related to the use of dbpf in st.cmd to set THRESHOLDS:FILE - using dbpf processes the record and triggers the forward link, this makes the _CALC record send values using uninitialised data. What we really need to do is set a value in THRESHOLDS:FILE but not cause the chain to process as at that point we do not have e.g. a temperature setpoint.
The PRs below do this, they pass the macro directly into the db file so a default value is set. This would be easy to do if it was a stingin record, but i suspect dbpf was used as it is not possible to initialise a waveform like that. I have recoded to use a long string record that supports such initialisation.
To test
You may not get any failures on your computer, but confirm tests succeed. Run lakeshore system tests on iocTestFramework directory
The lakeshore 340 is regularly getting a test failure on debug builds.
After investigation i believe the error is related to the use of
dbpf
inst.cmd
to setTHRESHOLDS:FILE
- usingdbpf
processes the record and triggers the forward link, this makes the _CALC record send values using uninitialised data. What we really need to do is set a value inTHRESHOLDS:FILE
but not cause the chain to process as at that point we do not have e.g. a temperature setpoint.The PRs below do this, they pass the macro directly into the db file so a default value is set. This would be easy to do if it was a
stingin
record, but i suspect dbpf was used as it is not possible to initialise a waveform like that. I have recoded to use a long string record that supports such initialisation.To test
You may not get any failures on your computer, but confirm tests succeed. Run lakeshore system tests on iocTestFramework directory