Anybus M40 Ethercat module migration from M30

Hi, we just started using the Ethercat M40 module. Previously we have been using M30 module for Dnet/Modbus TCP/Profibus Etc. we had initially tested out with M30 module for the Ethercat and everything seems to be working ok. But when we go to M40 module, I can see the module go into NW_INIT state and multiple requests coming from the M40 Ethercat module, which our system responds to as not implemented. This seems to work for the M30 module and it goes into Waiting state. But for the M40 module it enters Error state. Is there any specific command that the M40 module is expecting to be implemented that is not needed for M30?
We communicate over serial port if that makes any difference.

Regards,
Karthik

Hi,

An application for a m30 should be able to work with an m40. Have you reviewed section D of the design guide?

hmsi-27-334.pdf (hms-networks.com)

You may also want to verify the hardware design is compatible with the m40. see section a6 hms-hmsi-216-126.pdf (hms-networks.com)

Deryck

Hi Deryck,

Yes i have reviewed those sections. On the hardware side i did notice the difference in the MI pins which i changed to detect correctly. And I am able to monitor the communications back and forth between the Anybus module and our microcontroller.
Our implementation is very simple so we haven’t implemented most of the functions we just use it to read write some process data, which is mapped to ADI’s.

With the M30 module it is asking for the following:
Object FE Instance 0 Attribute 3 command 0x01
Object FE Instance 0 Attribute 4 command 0x01
and then asking multiple data from Object F5 which i reply with error 0x06 (not implemented)

With the M40 Module i see the module asking for:
Object FE Instance 0 CMD ext 0 command 0x13
Object FE Instance 0 CMD ext 0 command 0x14
Object FE Instance 0 CMD ext 0x0100 command 0x15
Object F5 Instance 1 CMD ext 0x1E
Same as above i respond to all these as not implemented at which point the module seems to go into state 7 (exception state)

So it looks like once the module is going into Init state, the M40 and M30 are looking for completely different info on the Host application side.

I guess the only other thing i can see is the OM pins. I think for us we don’t have anything connected. Would this cause an issue? I would have thought this would give an error even when we try to communicate to it. But if it will only cause error at end, then this may be the issue as our OM pins are left floating… we are using serial communication at 57.6k baud rate

Hi @kkarkala ,

This migration guide might be a helpful here. migration-guide—hms-scm-1202-043.pdf (anybus.com)

I’m not sure i follow the context to the requests. Can you enable debugging and share the logs?

Deryck

Hi Deryc,

It took longer to get the logs. attached is the excel file showing both the M40 ethercat module and the M30 ethercat module communication. Blue Text is from my controller to anybus module. Red text is from Anybus module to my controller.

Regards,
Karthik

m30 and m40 log.xlsx (13.4 KB)

Hello @kkarkala ,

This is not what I was looking for. You would want the debug logs from the host/application. Do you know what version of the application you are running?

The current version has debug and error macros that will write data to the configured console. These logs should help identify what state things are in.

/*------------------------------------------------------------------------------
** Debug and error macro configuration
**
** Check the descriptions in "./abcc_drv/inc/abcc_cfg.h" for more information
** about the purpose of each separate 'define'.
**------------------------------------------------------------------------------
*/
#ifndef ABCC_CFG_ERR_REPORTING_ENABLED
   #define ABCC_CFG_ERR_REPORTING_ENABLED             ( TRUE )
#endif
#ifndef ABCC_CFG_DEBUG_EVENT_ENABLED
   #define ABCC_CFG_DEBUG_EVENT_ENABLED               ( TRUE )
#endif
#ifndef ABCC_CFG_DEBUG_ERR_ENABLED
   #define ABCC_CFG_DEBUG_ERR_ENABLED                 ( TRUE )
#endif
#ifndef ABCC_CFG_DEBUG_MESSAGING
   #define ABCC_CFG_DEBUG_MESSAGING                   ( FALSE )
#endif
#ifndef ABCC_CFG_DEBUG_CMD_SEQ_ENABLED
   #define ABCC_CFG_DEBUG_CMD_SEQ_ENABLED             ( TRUE )  //more debugging in console 
#endif

#endif  /* inclusion lock */

As an example this is what we get from the starter kit:

It might also help to open a case on Mysupport.hms.se this would allow me to get input from the Team in Sweden.

Deryck

Hi Deryck,

I did open a case on Mysupport.hms.se. case number: 202103-27598.
We don’t use the application from HMS. We actually wrote the serial data packets to send in our code. So I don’t have the ability to get the debug log.

Regards,
Karthik

Hi @kkarkala ,

If you are using a customer application to communicate with the M30 it might not be possible to determine for sure if your application will work with an M40.

I see your case in mysupport.hms.se, I will check with my colleagues and follow up with you there.

Deryck

Ok Deryck. Thanks. Looking forward to a positive response. Meanwhile I will have our guys go back to using M30 modules.

Here is the response i posted in your case incase anyone else finds this topic with a similar issue.

My colleagues confirmed that the serial protocol is the same but things higher up are different.

In your case it looks like the issue might be the error codes you are responding with. It is OK to respond with an error if the Remap_ADI_xxx_Area and Get_Instance_Numbers commands are not implemented, but then they also have to respond with the correct error code. They should respond with “Invalid command”, not with “Invalid CmdExt0 or CmdExt0+CmdExt1”, if they don’t support the command in question.

Deryck