If you simulate a model on your host computer without running it on your target hardware:
Input blocks produce zeros.
Output blocks do nothing.
This is the expected behavior.
For example, in a model, on the Simulation tab, if you select
Normal in the Simulate section, and then
click Run, the following happens:
The sensor block and Digital Input block send zeros to the model.
The Digital Output block does nothing.
To see the blocks work normally, run your model on target hardware or use External mode.
To run the model on target hardware, on the Modeling tab, click Model Settings. In the Configuration Parameters dialog box, select Hardware Implementation. Then, in the Simulink Editor, on the Hardware tab, select Build Stand-Alone > Build, Deploy & Start.
To use External mode, in the Hardware Implementation pane of the Configuration Parameters dialog box, select your hardware board from the drop-down list. Then expand Target hardware resources, and under Groups select External mode. Then click Run.