Factory Default Settings Reset for Profibus CompactComm module Help

Hello, I am trying to send a command to the Anybus CompactComm module to set all fields back to the factory default. I am having issues where the slave address of the device can only be set once by a configuration tool.

I found this in the documentaion :
This service features a flag which specifies whether or not it is allowed to change the device address fromthe network again at a later stage. If the service is accepted, the module saves the value of this flag innon-volatile memory; the only way to restore it again is by performing a Factory Default-reset on theNetwork Configuration Object (consult the general AnybusCompactCom Software Design Guide for
more information).

In code I tried this:

static ABCC_CmdSeqCMDStatusType FactoryDefaultReset( ABP_MsgType * psMsg){
    ABCC_MsgType sMsg;
    ABCC_SetLowAddrOct( sMsg.psMsg16->sHeader.iSourceIdDestObj, ABCC_GetNewSourceId() );  /* SourceId */
ABCC_SetHighAddrOct( sMsg.psMsg16->sHeader.iSourceIdDestObj, ABP_OBJ_NUM_NC );   /* bObject */
psMsg->sHeader.iInstance = iTOiLe( 0 );                           /* Instance */
ABCC_SetLowAddrOct(  sMsg.psMsg16->sHeader.iCmdReserved,
		ABP_MSG_HEADER_C_BIT | ABP_CMD_RESET );                 /* Command */

sMsg.psMsg16->sHeader.iDataSize = iTOiLe( 1 );                            /* Data size           */
ABCC_SetLowAddrOct( sMsg.psMsg16->sHeader.iCmdExt0CmdExt1, ABP_RESET_POWER_ON_FACTORY_DEFAULT );  /* CmdExt0 (Attribute) */
ABCC_SetHighAddrOct( sMsg.psMsg16->sHeader.iCmdExt0CmdExt1,  ABP_RESET_POWER_ON_FACTORY_DEFAULT);          /* CmdExt1 (reserved)  */
//ABCC_SetLowAddrOct( sMsg.psMsg16->aiData[ 0 ], 0x01 );                    /* Data                */


I am using the UART to communicate with the Anybus module and this is the hex output transmitted to the module:
A0 0C 04 00 00 45 01 02 02 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 BF 80 00 00 47 F4

I get a response and then my application just freezes…

Any suggestions?

Hello Kyle,

Did the reset work? Are you able to set the Slave Address now?

It’s not clear to me why your application froze. Are you debugging? Can you see where your program counter is pointing to when the application freezes?

Hi Ian,

I found a lot of my issues were from my own stupidity. I boiled it down to just 2 main questions I have now that I would like to know if you can answer.

Hi Ian, I was able to successfully send a factory default reset command. I found out that I needed to use the memory allocate function ABCC_MemAlloc(void) inside the abcc_mem.c file. The reason it froze I think was due to writing in invalid memory. However I have a new problem. It seems my host application sends the last command to the Anybus module over and over. I think I am not using the right method of communicating with the Anybus module. I am using the software guide, and a implantation guide.

My current method of sending a command is:

A post was split to a new topic: CompactCom Reset not working