SPI communication with M40 module

I am using an M40 module in a project, where I want to test whether the SPI communication works, roughly, so I just want to check that the Anybus object reports the correct module type (instance #1, attribute #1). After reading the software design guide, I understood that in the SPI frame, the WrMsgField words are supposed to contain the message layout described in Section 10.2 of the software design guide. Firstly, is that correct, and is that a correct approach to test our that the Anybus object reports the correct module type?

If it is, I don’t understand how words 5,6 and 7 of the message layout should specify the source within the Anybus Object model. Since I want to check attribute #1 of instance #1 of AnybusObject 01h, should the 5th, 6th and 7th words all be 01h?

Hello @ivt,

Are you using the Example host application?

There is a built-in command sequence that could be used to read the module type. This might be a good place take a look at rather then sending a

** Module type command
** Part of a command sequence and implements function callback
** ABCC_CmdSeqCmdHandler (abcc.h)
static ABCC_CmdSeqCmdStatusType ModuleTypeCmd( ABP_MsgType
psMsg )
ABCC_GetAttribute( psMsg, ABP_OBJ_NUM_ANB, 1,

I think you are over looking that you alos specify a command code and setting the attribute in CmdExt[0].

No, I am not using the example host application, where can I find it?

Also, I am aware that I need to specify the command code, etc. I just did not include it in my question.

You can download the host application here: Get started with your Anybus CompactCom In-design

I recommend reaching out to your sales contact they typically will provide you with guidance on getting started. You can also reach your local support team via support.hms-networks.com

Alright, thank you.