Why do I receive TCP/IP communication errors when I try to operate my Simulink Real-Time target computer as the EtherCAT main device?

조회 수: 37 (최근 30일)
I am using a Simulink Real-Time (SLRT) target computer that communicates with multiple subordinate devices via EtherCAT. I am able to successfully build the model and load it onto the target. However, when I start the real-time simulation, I receive errors in MATLAB such as:
Error 1:
ERROR: External Mode Open Protocol Start command failed
Error 2:
ERROR: Executing the 'Start' command produced the following error:
TargetPC1: TCP/IP timeout while receiving data
Error 3:
ERROR: Executing the 'FinalUpload' command produced the following error:
TargetPC1: TCP/IP Read Error
At the same time, the target screen displays the following output:
System: initializing application finished
System: model thread stack is 64K bytes
EtherCAT Update rate 0.00025 sec
Could not set master state to PREOP
ERROR: EtherCAT error: No Error
System: execution cannot be started
System: execution stopped at 0.000000
Rx time is 0.000001
Cycl time is 0.000000
McSt time is 0.000003
MasterTimer is 0.000004
AsynctTime is 0.00000
xpcEtherCATstop called
EtherCAT Update rate 0.00025 sec

채택된 답변

MathWorks Support Team
MathWorks Support Team 2023년 6월 21일
편집: MathWorks Support Team 2021년 10월 12일
The above error messages may indicate that there is a conflict between the Ethernet ports used for the host-target connection, and the one used to connect to the EtherCAT network. This may be due to incorrect settings in the EtherCAT Init block.
R2020a and earlier:
Ensure that all fields (such as "PCI Bus" and "PCI Slot") within the EtherCAT Init block are specified correctly, i.e., they match with the actual hardware setup.
R2020b and later:
Use the Ethernet Configuration utility (speedgoat.configureEthernet) which is part of Speedgoat I/O Blockset to reserve the correct Ethernet port for the EtherCAT Master:
If everything is specified correctly and the issue persists, please check that the network card(s) work.

추가 답변 (0개)

제품


릴리스

R2011b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by