Showing results for 
Search instead for 
Did you mean: 

Switching the ethercatmaster between states

Switching the ethercatmaster between states

Established Member


My question is in regards to the issue specified in the following link, where I am having trouble getting my CytroPac in OP mode without initializing all of the slaves in ctrlX WORKS and putting them in OP mode again:

Rather than finding out, how to automatically start specifically the CytroPac in OP mode, is there instead a way to switch the ethercatmaster between different states (e.g. OP -> Init -> OP) in ctrlX Engineering, perhaps via a parameter?



Thank you very much



Community Moderator
Community Moderator

You have different possibilities to switch this state, but there is parameter like it was in the MLC.

In the ctrlX IO engineering you can switch to online and use the buttons in the master view in tab "Bus diagnostics":ctrlX IO engineering onlinectrlX IO engineering online

In the web interface of the ctrlX CORE there is the same view like on your screenshot in the last post:ctrlX web interface EtherCat statusctrlX web interface EtherCat status

You can also use the REST API to switch it from any client tool:


https://<IP of ctrlX core>/automation/api/v1.0/fieldbuses/ethercat/master/instances/ethercatmaster/admin/fieldbus_status/master_state

{"request": { "newState": "init" }} or {"request": { "newState": "op" }}


Sorry for the late reply.

Those were some very great methods.

However, personally I ended up using the CXA_EthercatMaster library for great effect:



@CodeShepherd Is there documentation for ethercat configuration over REST API? I am wondering what functionality is possible here.

Community Moderator
Community Moderator

In short you can do everything that is possible with ctrlX CORE Web UI also with the REST API as it is using the same mechanism. You can see this by using the developer tools of your browser while clicking the Web UI buttons.

Unfortunately the official documentation for the data layer nodes (and so the REST API) is not released yet. But I will check the next steps there.

Further more it is possible to control also the ctrlX IO Engineering via a REST API. There is an integrated documentation in the tool it self via a Swagger UI:

ctrlX IO Engineering open Swagger UIctrlX IO Engineering open Swagger UI