EtherCAT Set Device State
Set state of EtherCAT network
Simulink Real-Time / EtherCAT
The EtherCAT Set Device State block sets the state of a device on the
EtherCAT® network to the value passed through the
New State — State transmitted to the EtherCAT network
|Initialization — The system finds terminal devices and initializes the communication controller.
|Preoperational — The system uses the communication controller to exchange system-specific initialization data. In this state, the network cannot transmit or receive signal data.
|Safe operational — The network is running and ready for full operation. The supervisor sends input data to the terminal device. The terminal device output remains in a safe state.
|Operational — The network is in full operation. The supervisor sends input data to the terminal device. The terminal device responds with output data.
Enable — Enables block to send state request
The port takes a Boolean value. When true (1), the block sends a new state request. When false (0), the block does nothing.
Prev State — Previous state of the selected device
This port returns the value of the previous state of the device. That value might not be the same as the previous state of this block.
Error — Report an EtherCAT state error
0 | integer
If no error occurs, this port
0. Otherwise, it returns a nonzero value. For
more information, see EtherCAT Error Codes.
SubDevice Name — Name of EtherCAT subordinate device
Select an EtherCAT subordinate device from the list of available subordinate devices provided by the ENI configuration file. The configuration file is selected by the EtherCAT Init block.
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Introduced in R2021b