Hello @Automan ,
The behavior you are describing is happening because changing the Channel/Pin inside the Dio mask is not causing Simulink to regenerate the code. We are looking into ways to improve this specific scenario and make it as hassle-free as possible.
For now, the best course of action in your specific use case, and to always get consistent results, would be to delete the "modelName_ert_rtw" folder and the "modelName.slxc" file before building the model. Doing so will trigger the code generation and update the executable based on the current state of the model. This should not be needed if the model is changed in a more significant way, like adding blocks, changing signals and/or connections, etc.
Regards,
Robert V