Dear Matthew,
The 'S2' block linked to the slider switch and the 'Desired State' can be updated using the set_param function. These set_param calls can be added to the callbacks section in block properties. However, slider switch and constant blocks lack a callback that can instantly update the parameters during modelling. Instead, consider using an 'Edit block' from the dashboard library.
An alternative is to use a masked subsystem to represent the ‘Desired State’ block. This block can update the mask instantly to display the value if a current value of a parameter is used as a mask display. We can also update the value of the subsystem, the slider switch and the constant block by placing callbacks in the OpenFcn section of the subsystem block callback parameters. This will enable instant updating of the Desired State (Subsystem), the slider switch and the constant block when double clicking the subsystem.
Example code for mask editor Icon drawing commands:
val=get_param(gcb,'Parameter1');
disp(val);
Example code for changing parameter values, from subsystem block properties OpenFcn callback:
curr = get_param(gcb, 'Parameter1');
if strcmp(curr, 'ob0')
set_param(gcb, 'Parameter1', 'ob1');
set_param('control_toggle_test/S2', 'Value', '0');
elseif strcmp(curr, 'ob1')
set_param(gcb, 'Parameter1', 'ob0');
set_param('control_toggle_test/S2', 'Value', '0');
end
Additionally please find the attached Simulink file with the above mentioned implementations.

