FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
09-19-2023 10:37 AM
Hello Community!
In my project, I am using a ctrlX CORE with an EtherCAT Master App, XB_EC_12 bus couplers and XI110208 digital I/O modules. I use Node-Red to read and analyze data from Ethercat Master.
At random times one or more of the bus couplers with their connected I/O modules get into the initialization state, and I get an error from EtherCat master, that Slaves are not in the Master state. The whole data acquisition stops, and I can solve the problem by restarting the ctrlX CORE, or manually switching the Ethercat Master App from initial status to operation status. (Plus info: All modules are permanently supplied, so they are not restarted in these situations.)
My question would be is there any method in DataLayer at EtherCAT Master section, which is accessible from Node-Red (Data Layer Request) and lets me read the status of EtherCAT Master or can trigger from initialisation status to operation status?
(Previously I was able to make read/write methods using Node-Red to OPC UA Client, maybe there is a solution also for this..)
Thanks.
Solved! Go to Solution.
09-19-2023 11:13 AM
What you can see is basically over rest API. so you can do it with the API for sure 🙂
09-19-2023 01:11 PM - edited 09-19-2023 01:12 PM
09-19-2023 05:07 PM
Did you check the availble data via the data layer see "fieldbuses/ethercat/master/instances/ethercatmaster/admin/fieldbus_status". There is a lot of information available:
09-22-2023 09:32 AM
Hello @MauroRiboniMX and @CodeShepherd!
When the issue happens I can see this error message in EthercatMaster App:
In this example, the following slave causes the error:
I figured out that by checking the fieldbuses/ethercat/master/instances/ethercatmaster/admin/fieldbus_status/master_status from Node-Red or DataLayer I am able to see if something is not okay with EthercatMaster. It gives back {"response" :{"status": 0}} when is everything ok and "status": 512 when the error happens.
I solved the error by clicking manually to op mode again:
I was looking for a rest API endpoint which I can trigger the op status (pushing the button automatically) when the error occurs, but I have not found it yet. Is it at all possible to trigger the button from Node-RED?
Thanks.
09-22-2023 03:57 PM
Feel free to check out the examples already included in our Node-RED app. See documentation on GitHub.
09-23-2023 05:27 PM
Hello arsz,
As stated by @CodeShepherd theare already some examples in node-red plus mine attached are already in that direction. you just have to modify them for what you need. and then yes, it is possible.
09-25-2023 04:00 PM
Thank you @CodeShepherd and @MauroRiboniMX for the information, now I can change the state of EtherCAT Master from Node-Red.