You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When IOCs SM300_02 and SM300_03 were created, some issues with macro definitions surfaced
(See: #4461)
First, config.xml claims to set a default value for MSTP1 and MSTP2 of 200, but this seems to be inconsistent: when MSTP1 and MSTP2 macros are not set, and are accessed in st-common.cmd file by the following, their logs error with macLib: macro <...> is undefined.
dcalc("VELO1", "15000/$(MSTP1)", 1, 2) # Feed rate / steps to give velocity
dcalc("VELO2", "15000/$(MSTP2)", 1, 2) # Feed rate / steps to give velocity
More importantly, the value of MSTP1 and MSTP2 are hard-coded to exactly 200 and 1000 respectively a couple lines below:
Thus, any value given to MSTP1 and MSTP2 will only affect the value of the VELO macros, since MSTP1 and MSTP2 immediately defect to their hard-coded values above - which seems bizarre.
In order to refactor this behaviour, it would be worth discussing how valid the above logic is in regards to how these IOCs are actually used, and how to reflect that more coherently in this file.
Acceptance criteria
Discuss how the MSTP and VELO macros should be defined in order to reflect their use by scientists.
Refactor st-common.cmd to reflect the above.
How to Test
verbose instructions for reviewer to test changes
(Add before making a PR)
The text was updated successfully, but these errors were encountered:
boeuf-codes
changed the title
[Instrument or device name, e.g. WISH]: [Brief description of issue]
SM300: Issue with definition and use of MSTP macros
Sep 12, 2022
Where?
SM300 -
st-common.cmd
How?
When IOCs SM300_02 and SM300_03 were created, some issues with macro definitions surfaced
(See: #4461)
First,
config.xml
claims to set a default value forMSTP1
andMSTP2
of200
, but this seems to be inconsistent: whenMSTP1
andMSTP2
macros are not set, and are accessed inst-common.cmd
file by the following, their logs error withmacLib: macro <...> is undefined
.More importantly, the value of
MSTP1
andMSTP2
are hard-coded to exactly200
and1000
respectively a couple lines below:Thus, any value given to
MSTP1
andMSTP2
will only affect the value of theVELO
macros, sinceMSTP1
andMSTP2
immediately defect to their hard-coded values above - which seems bizarre.In order to refactor this behaviour, it would be worth discussing how valid the above logic is in regards to how these IOCs are actually used, and how to reflect that more coherently in this file.
Acceptance criteria
MSTP
andVELO
macros should be defined in order to reflect their use by scientists.st-common.cmd
to reflect the above.How to Test
verbose instructions for reviewer to test changes
(Add before making a PR)
The text was updated successfully, but these errors were encountered: