Outport Block

The Simulink Outport block describes an output of a Simulink model.

Outport block

Outport block

For every Outport block at the top-level in the Simulink model for which code is generated, a corresponding Signal instance is created in PMP. The PMP signals derived from outports are read-only. The name of this signal instance corresponds with the name of the Outport block as discussed under Naming conventions and restrictions. The description of this signal instance corresponds with the description of the Outport block in Simulink, which can be edited in the ‘Block Properties’.

Signal properties LowerBound, UpperBound, Description and Unit are added to these signals when a PT.Signal object is present in the MATLAB workspace with an identical name as the outport. This object can be created using PmpSignal in MATLAB which sets the required properties of the object.

Default properties listed in Default property values for generated PMP signals are set to the signal instances when no workspace variable is found during code generation.

When the outport is a vector, one signal instance will be created for each element of the vector. The generated description, unit, min and max is be the same for each element.

The min and max property do not have any effect on the behavior and are only visible on the interface.

Bus outports

When a top-level outport is a bus, a corresponding Signal instance is created for each BusElement. PMP signal properties can only be added when the bus is nonvirtual. The properties are added to the outport BusElements when a Simulink.Bus object is present in the workspace with the name of the outport. The properties of the signal instance can be added to the bus object using PmpBus.

Default properties listed in Default property values for generated PMP signals are set to the signal instances when no workspace variable is found during code generation, or to BusElement without set properties.

In case of a virtual bus, a signal instance is created for each BusElement without additional signal properties.