Hi,
I'm trying to register a SDO write notification using the C-Toolkit (running with a CifX-50Re).
Therefor:
- I'm creating a SDO with one entry
- Send an ECAT_OD_NOTIFY_REGISTER_REQ with the SDOs index to the stack
- poll the channel mailbox for incoming packets
The problem is, as soon as the notification is registered, I can't write the SDO from the master anymore. I always get a "SDO Abort ('general error', 0x08000000)" message when I try. What am I missing?
Thanks in advance
Thomas
Hello AJ,
thanks for your reply. My example SDO object is created using this data:
ECAT_SDO_CREATE_OBJECT_REQ_DATA_T sdo_test; sdo_test.usIndex=0x6001; sdo_test.bNumOfSubObj=1; sdo_test.bMaxSubObjs=1; sdo_test.usObjAccess=0; sdo_test.bObjectCode=8; sdo_test.usDatatype=2;ECAT_SDO_CREATE_SUBOBJECT_REQ_DATA_T entry;
entry.usMode=0;
entry.usIndex=0x6001;
entry.bSubIdx=0x1;
entry.usDirection=3;
entry.usSubObjAccess=0x3f;
entry.usDatatype=7;
entry.usFieldLen=32;
entry.usRelativeAddress=0;
Dest : 0x00000001 ID : 0x00000000 Src : 0x00000000 Sta : 0x00000000 DestID : 0x00000000 Cmd : 0x00001B10 SrcID : 0x00000000 Ext : 0x00000000 Len : 0x0000000A Rout : 0x00000000 Data: 01 60 00 00 00 00 01 00 00 00 (usIndex=0x6001, fReadNotify=0, fWriteNotify=1)
After that the 'general error' occurs, if I try to write the SDO again.
Did you set the ulSta(te) field of the packet accordingly?
Regards
Thomas
Hi,
did you handle the ECAT_OD_WRITE_NOTIFY_IND indication?
the following actions must be taken for handling this indication:
- process the data
- copy the packet header
- modify ulSta, ulLen accordingly
- set the bit 0 in ulCmd
- send the newly created response packet to the netX
all other packet header fields are inherited from the indication.
Greets,
code-small
Hello code-small,
did you handle the ECAT_OD_WRITE_NOTIFY_IND indication
Regards
Thomas
Hi,
the usFieldLen field is only evaluated in case of variable length data types and with these it specifies the amount of data type units. (e.g. on a VISIBLE_STRING it means the character unit).
In any other case, it is ignored.
Did you check the error codes for the Request packets?
In what state is the slave when you are trying to write the object?
Greets,
code-small
Andreas Jacob
Hilscher Gesellschaft fuer Systemautomation mbH
Hi,
what for parameters did you use for creating the object?
how does your indication code look like?
Did you set the ulSta(te) field of the packet accordingly?