Create the MATLAB System Block

To bring the DigitalWrite system object into Simulink®, follow the steps:

  1. Create a new Simulink model.

  2. From the User Defined Functions library, add the MATLAB System block to the model.

  3. In the block, set System object name to DigitalWrite.

  4. From the Sources library, add the Pulse Generator block to the model.

  5. From the Signal Attributes library, add the Data Type Conversion block to the model.

  6. 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

| | |