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
DigitalWrite
.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.
See Also
Create a Digital Write Block | Test System Object on MATLAB Command Line | Generate Code and Deploy the Model to the Hardware | Implement a System object in Simulink Using MATLAB System Block