Integer and Enumerated Data Type Support in the Ground Block
This example shows how to use the Ground block to ground block input ports that have integer and enumerated data types. In top row of this example, the output of the Constant block determines the data type (
int8) of the port to which the Ground block is connected. That port determines the output data type of the Ground block, and the Ground block outputs a signal with zero value, and data type
In the bottom row of this example, the Ground block is connected to a port with an enumerated data type. For enumerated data types, the Ground block outputs the default value of the enumeration. This behavior applies whether or not:
The enumeration can represent zero
The default value of the enumeration is zero
If the enumerated type does not have a default value, the Ground block outputs the first enumeration value in the type definition.