To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example demonstrates how to reset the EtherCAT chassis after experiencing a connection loss.
Description
This is an example EtherCAT project to show how you can reset the EtherCAT chassis after experiencing a connection error.
If you have a C-Series module anywhere in your code and you loose connection to your EtherCAT chassis it will result in your code throwing an error and aborting. With the right error handling, this can be prevented.
This code shows, using a simple state machine, and how adding error handling into your code can help you and prevent you from loosing data if your system is for example being run overnight and is not monitored.
The error will still be reported and can be seen later in the Distributed systems manager and can be seen in this image below.
This attached code will reset the EtherCAT chassis by changing it programmatically between active and configuration mode just like you can do by using the "Change to Configuration" button as seen in the image above.
Requirements
Software
Hardware
Steps to Implement or Execute Code
Additional Information or References
**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text 'NIVerified'. Read here for more information about the new Example Guidelines and Community Platform.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Is this the only way to reset the EtherCAT chassis?
Recently we upgraded a code from LV2009 to LV2013 and faced PXI crash. The code used the same above mentioed technique to reset the EtherCAT and it was working good with LV2009. In one of debugging technique we disabled this toggling code and found PXI didn't crash. So we are thinking if there is anyother way to do the EtherCAT reset instead of above method.