cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

EtherCAT Master Status Read/Write from Datalayer

EtherCAT Master Status Read/Write from Datalayer

arsz
Member

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.

 

7 REPLIES 7

MauroRiboniMX
Contributor

What you can see is basically over rest API. so you can do it with the API for sure 🙂

MauroRiboniMX
Contributor

Hello, 

I have done some examples to get the states, write is similar 🙂

CodeShepherd
Community Moderator
Community Moderator

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:

ctrlX web UI data layer viewer - ethercat fieldbus statusctrlX web UI data layer viewer - ethercat fieldbus status

Hello @MauroRiboniMX and @CodeShepherd!

When the issue happens I can see this error message in EthercatMaster App: 

arsz_0-1695365784962.png

In this example, the following slave causes the error: 

arsz_1-1695365962141.png

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: 

arsz_2-1695367294664.png

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.

 

CodeShepherd
Community Moderator
Community Moderator

Feel free to check out the examples already included in our Node-RED app. See documentation on GitHub.

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.

Thank you @CodeShepherd and @MauroRiboniMX for the information, now I can change the state of EtherCAT Master from Node-Red.

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist