Sign in to follow this  
Followers 0
vanquangtk

How to get error code of Ethercat connection.

6 posts in this topic

Dear all,

I am connecting an NJ  PLC with other devices by ethercat connection. These devices include: servo motor, FH vision , NX input/out put and NB HMI. I want to check status of each device and connection . My intention is every error appears in devices or connection will be recorded in to a word code.

May anyone know how I can do that and what instruction I need.

Edited by vanquangtk

Share this post


Link to post
Share on other sites

Check out the EtherCAT manual that is installed with Sysmac Studio:

 

5bab924a02cfa_EcatManua.thumb.jpg.11d64d

 

In particular, look at Section 7 - System-defined Variables.

Share this post


Link to post
Share on other sites
47 minutes ago, Michael Walsh said:

Check out the EtherCAT manual that is installed with Sysmac Studio:

 

5bab924a02cfa_EcatManua.thumb.jpg.11d64d

 

In particular, look at Section 7 - System-defined Variables.

Thank you Wash, I found structions I need in  "NJ-series Instructions Reference Manual" . They are : GetPLCError, GetECError and GetMCError.
 

Share this post


Link to post
Share on other sites
53 minutes ago, vanquangtk said:

Thank you Wash, I found structions I need in  "NJ-series Instructions Reference Manual" . They are : GetPLCError, GetECError and GetMCError.
 

The section that I referenced has status information that can help you to see when you have an EtherCAT Error.  Then you can use the GetECError instruction for details.

 

1 person likes this

Share this post


Link to post
Share on other sites
30 minutes ago, Michael Walsh said:

The section that I referenced has status information that can help you to see when you have an EtherCAT Error.  Then you can use the GetECError instruction for details.

 

Do you know what data type I need to declare for instruction ResetPLCError. When I use  GetPLCError sysmac studio doesn't require me to declare data type, but it required me when I use ResetPLCError.

Share this post


Link to post
Share on other sites

All EtherCAT slave status is stored in system variables you can access as BOOL or WORD.

_EC_PDSlavTbl[1] = PDO Status (BOOL) for Slave 1.

_EC_SlavErrTbl[2] = Error Status (WORD) for Slave 2.

(There's more, but that's what I use as a basic diagnostic check)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0