Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

IgH setup EtherCAT data flow

Shulou Source: shulou.com Published: 2022-06-03 05:17:31 10月01日 Update

IgH setup EtherCAT data flow

After starting the IgH protocol stack, the protocol stack will automatically initialize the EtherCAT from the station to the PREOP mode, migrate from the PREOP state to the SAFEOP state, and need to set PDO, DC and other data. Take Shanyang Electric Motor as an example, the data setting process is shown in figure 1.1:

Figure 1.1 PREOP state transition process IgH application implementation process request to get the main stack

Before configuring the data, first get a main stack structure that corresponds to the master in the protocol stack. Through the acquired main stack structure, the data is configured into the data structure in the protocol stack (currently there is only one main stack, redundant backup is not supported).

Figure 2.1 apply for the main stack interface to create a data domain for each slave station

Create its own data field for each slave station to store the process data and other dependent data of the slave station.

Figure 2.2 creating a data field

Configure Slave Information

1) set the product information (manufacturer ID and product code) of the slave station according to the location of the slave station.

2) configure synchronization data for each slave station. SM0 and SM1 are used for MailBox data synchronization, but not for the time being. SM2 is used for RxPDO data synchronization and SM3 is used for TxPDO data synchronization.

3) by mapping the synchronization register data of each slave station to the application space, the data and state of the slave station can be read and changed in real time by reading and writing variables in the application program.

Figure 2.3 configuring slave information

Configure synchronous clock

Set the DC synchronization clock of the slave station.

Figure 2.4 setting the DC synchronization clock to activate the main stack

The above process only stores the data in the data field of each slave station in the main stack and is not configured in the slave station. Activating the master stack activates the state machine in which the OP thread performs slave initialization.

Figure 2.5 activating the main stack

Tags: Data synchronization configuration state process activation structure information clock application product application program process code location redundancy vendor variable just Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi NVidia Shulou Tech Info Linux macOS