Content area
Slave devices in Ethernet-based fieldbus networks often require extensive reprogramming of applications and replacement of protocol stacks and Ethernet drivers whenever the fieldbus protocol needs to be changed. To address this challenge, we develop a common application programming interface (API) and stack interfaces that enable seamless protocol switching among EtherCAT, PROFINET, and EtherNet/IP without requiring protocol-specific code modifications. The real-time data exchange between the API and each protocol stack is realized in the stack interface by using the synchronization mechanism provided by FreeRTOS. The developed common API and stack interfaces facilitate the development of slave device applications that are universally compatible with multiple protocols, EtherCAT, PROFINET, and EtherNet/IP. Moreover, once a required protocol is selected in the integrated development environment (IDE) software before building the slave device firmware, the corresponding protocol stack and Ethernet drivers are automatically specified and the need to replace protocol stacks or Ethernet drivers is even eliminated when switching protocols. To validate the developed common API and stack interfaces, they were implemented on a slave device using TI’s TMDS243EVM board, and a fieldbus network was built by connecting the slave device to a master device executed by Beckhoff’s TwinCAT on a Windows PC. Experimental results confirmed the API’s functionality, reliability, and practical applicability in streamlining protocol management for Ethernet-based fieldbus networks.
