I am using EtherCat Master in my project, and I am testing it. My problem is, that I can not catch any status. In the input assistant, I could find the following:
IoConfig_Globals.EtherCAT_Master.xError -> it is boolean, and according to the explanation:
"The output is TRUE when an error occurs when starting the EtherCAT stack, or communication with the slaves is interrupted because no more messages can be received (for example, due to a damaged cable)."
Based on it, I have added to my ST this one:
e:=IoConfig_Globals.EtherCAT_Master.xError;
Where e is boolean variables.
But it always FALSE. If the program is running, I unplug the EtherCat EK1100 from the power, and in the Codesys I can see the red triangles next to the EtherCat master etc., but the variable is still FALSE.
How can I check it during the run? Is there any other solution to check does the Master run properly or not?
Thank You in advance!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear All,
I am using EtherCat Master in my project, and I am testing it. My problem is, that I can not catch any status. In the input assistant, I could find the following:
IoConfig_Globals.EtherCAT_Master.xError -> it is boolean, and according to the explanation:
"The output is TRUE when
an error occurs when starting the EtherCAT stack, or
communication with the slaves is interrupted because no more messages can be received (for example, due to a damaged cable)."
Based on it, I have added to my ST this one:
e:=IoConfig_Globals.EtherCAT_Master.xError;
Where e is boolean variables.
But it always FALSE. If the program is running, I unplug the EtherCat EK1100 from the power, and in the Codesys I can see the red triangles next to the EtherCat master etc., but the variable is still FALSE.
How can I check it during the run? Is there any other solution to check does the Master run properly or not?
Thank You in advance!
Hi,
you need to call the global Master instance in your code to have these variables up to date.
Dear eschwellinger!
Thank You for your rapid help! It works now.