ISISComputingGroup / IBEX

Top level repository for IBEX stories
4 stars 2 forks source link

Mclennan: Add write toggle to enable setting fields non-permanently without setting macros #8230

Closed rerpha closed 3 months ago

rerpha commented 4 months ago

Currently the Mclennan uses a set of macros (JVEL1 for Jog VELocity, axis 1, etc) to configure things like limits and velocities. I would like to add a PV that toggles the access security that stops a user from setting these fields on the motor record directly (ie. setting MTRxx01.JVEL instead of setting JVEL1)

Acceptance criteria

FreddieAkeroyd commented 3 months ago

@rerpha do they need access security toggle to enable setting everything, or is there a particular subset that would serve their case. I believe one of the reasons they were protected was to avoid confusion during setup and then things not getting remembered, if the ioc always starts with access disabled (i.e. toggle choice is not autosaved or in a config macro) then that may be sufficient

rerpha commented 3 months ago

Just a subset - limits and velocities being important:

Yes I would like to be able to set jog velocity and motor limits on the fly. The example code below used to work but now does not work anymore on LET after the latest IBEX update:

motor_pv="MOT:MTR0201"
 g.set_pv(f"{motor_pv}.JVEL", 0.01, is_local=True, wait=True)
 g.set_pv(f"{motor_pv}.HLM", 180, is_local=True, wait=True)
 g.set_pv(f"{motor_pv}.LLM", -180, is_local=True, wait=True)

If we can allow those fields to be set again in a script that would be helpful. I agree that things like motor resolution should not be allowed to be changed that way as this should stay fixed for each motor.
FreddieAkeroyd commented 3 months ago

Using manager mode requires remembering to enable it afterwards and then forgetting may affect a script. Other options are to:

KathrynBaker commented 3 months ago

This was discussed at SAG, and the approach that is acceptable to our users would be to create a macro that will overwrite the security group for the PVs above, however, this macro shout NOT be made available in config.xml, but is one to set in globals.txt. This can be enacted and patched, so has been created as #8284

The second action is to make sure that there is something visible on the motor screen to say something along the lines of "Changes made here will not persist, please make changes to the macros for the IOC if the changes should be reapplied next time IBEX is loaded." This message should only be visible when that macro is set to allow the values to change. This has been created as #8285