Create the MATLAB System Block
To bring the
DigitalWrite system object into Simulink®, follow the steps:
Create a new Simulink model.
From the User Defined Functions library, add the MATLAB System block to the model.
In the block, set System object name to
From the Sources library, add the Pulse Generator block to the model.
From the Signal Attributes library, add the Data Type Conversion block to the model.
Connect the blocks as shown.
In the next section, you will Generate Code and Deploy the Model to the Hardware containing your system object.