Collect notifications from the EtherCAT bus
Simulink Real-Time / EtherCAT
Collects notifications from the EtherCAT® stack and presents
them to the output as a 21-element vector of
At each time step, the block outputs what it has accumulated and clears
itself for the next time step.
The vector contains the number of notifications in element
followed by up to
20 notification codes. The maximum
number of notifications is
20. If the bus presents
20 notifications to the output, the block
discards the newest notifications and presents the first
Values— Self-descriptive 21-element vector containing EtherCAT notification codes
20 * Notification]
— the number of notifications in the vector.
Notification — a composite
of a notification type and a specific value. The types are:
— Represents state changes, such as:
EtherCAT operational state change.
— Represents error states, such as
command: working counter error. Some describe changes in
— Represents ScanBus error states, such as
— Represents hot connect states, such as
To print the valid notification values and descriptions, call
without an argument.
To collect notifications:
Add the EtherCAT Get Notifications block to your model.
Connect the EtherCAT Get Notifications block to an Outport
block. If possible, make this Outport block
1. If the EtherCAT
Get Notifications block is connected to the first
Outport block, the 21 notification signals appear in the
first 21 columns
tg.OutputLog matrix. Otherwise, you must
specify the columns with an offset.
Increase the value of Signal logging data buffer size in doubles by at least a factor of 100 in the Simulink Real-Time Options pane. The EtherCAT Get Notifications block can quickly increase the size of the output log.
To print the notifications for this model, pass the
relevant 21 columns into the