Create the MATLAB System Block
To bring theDigitalWrite
system object into Simulink®, follow the steps:
Create a new Simulink model.
From theUser Defined Functionslibrary, add theMATLAB Systemblock to the model.
In the block, setSystem object nameto
DigitalWrite
.From theSourceslibrary, add thePulse Generatorblock to the model.
From theSignal Attributeslibrary, add theData Type Conversionblock to the model.
Connect the blocks as shown.
In the next section, you willGenerate Code and Deploy the Model to the Hardwarecontaining 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 MATLAB System Block(Simulink)