• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Configuring EtherCAT communication
Hello Armin,

I am trying to run the netPi as an EtherCAT slave. I want to connect the netPi to the EtherCAT system of a machine where I need an Input and Output of 100 bytes each.
I used the netX example codes and changed the size of uint8_t abApp_Inputdata[10] and [i]uint8_t abApp_Outputdata[4][/i] to uint8_t abApp_Inputdata[100] and abApp_Outputdata[100] in "examples/includes/App.h". I also adapted the "Hilscher ECS LFW Host Example Simple Config.xml" by changing the DefaultSize of Inputs and Outputs from 10 and 4 to 100. Here, I also continued the RxPdo and TxPdo up to 100.

When I now run the application ECS_simpleConfig I get the following notification:

Register application failed Error: 0xc0000201
Error: 0xc0000201, <>
Error stopping the watchdog lRet = 0x800c0012!!

According to the documentation, the errorcode 0xc0000201 says that the "application ist already registered" and the errorcode 0x800c0012 means that the "communication channel ist not configured".
Does this indicate that there is a problem registering the slave with the master, meaning I made a mistake when customizing the xml file? Or have I missed a variable or something else in another file that I still have to change?

Or have I taken the whole thing too easy in the first place and it takes much more than just customizing the example files?

Thanks in advance!

Well the source code under https://github.com/HilscherAutomation/ne...ndlerECS.c

registers an application using the command "RCX_REGISTER_APP_REQ" if now your program was accidentially stopped without using the "RCX_UNREGISTER_APP_REQ" the netx chip will deny another registration. 

Three methods to recover from this: 

1.) depower and repower the whole netPI and call your program again or
2.) execute the command xChannelReset() in the function "int32_t ChannelDemo()" of the source code https://github.com/HilscherAutomation/ne...leConfig.c right before the line while(CIFX_NO_ERROR == (lRet = Pkt_ReceivePacket(hChannel,&tAppData.tPkt,0))); or
3.) call the "RCX_UNREGISTER_APP_REQ" message when you see the registration message returning an error in order to deregister a previously called program that didn't send "RCX_UNREGISTER_APP_REQ" before leaving

In all cases the netX chip will "lose" its previous registration setting.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)


Possibly Related Threads…
Thread Author Replies Views Last Post
  Configuring S7-1200 PLC to communicate with node-red ... Cman587 3 1,140 January-27th-2021, 11:01 AM
Last Post: Armin@netPI
  running ethercat slave MGharat 6 2,068 December-10th-2019, 10:06 AM
Last Post: MGharat
  [SOLVED] EtherCAT Slave snortman 5 2,314 February-7th-2019, 07:36 AM
Last Post: Armin@netPI
  [SOLVED] Monitoring as EtherCAT Slave PRingelberg 8 2,479 October-16th-2018, 08:10 PM
Last Post: Armin@netPI

Forum Jump:

Users browsing this thread: 1 Guest(s)