1

CANopen have two types of methods for transferring and receiving data between server and client.

  • Expedited mode = Send fixed bytes (maximum 4 bytes)
  • Normal mode = Send maximum 7 bytes at the time

If I want to send for example an uint32_t value from my dictionary object and that value is at the index and sub_index, I just send my command specifier CS with a transmit and also the index and sub_index. Done!

http://www.byteme.org.uk/canopenparent/canopen/sdo-service-data-objects-canopen/

My question is:

Is the Normal mode ONLY made for transferring arrays, you know "variables" in the object dictionary that have more than one elements, but their address are put into the sub index 0x0?

https://cache.industry.siemens.com/dl/files/771/109479771/att_861905/v1/109479771_CANopen_Tutorial_V10_en.pdf

enter image description here

euraad
  • 1,025
  • 11
  • 30

2 Answers2

1

Although objects larger than 4 bytes are uncommon, it's still possible. For example an object can be float64 (double) type. Or it can be an application specific data blob (CiA calls them Domain type, if I remember correctly). The size field in segmented transfers is 4 bytes, so it should be possible to transfer 2^32-byte large objects.

Normally each element of the array has its own subindex, and they must be accessed separately. But as it can be seen in your example, one may consider all of the array or data structure as an single object. This makes sense for visible strings as accessing the characters separately wouldn't be much meaningful.

Tagli
  • 1,222
  • 1
  • 6
  • 16
  • Or it can be array? – euraad Nov 02 '21 at 16:26
  • @MrYui , yes, but not like as CANopen defines it. The application can encode an array as a single data object, but in this case it would be impossible to access its individual elements without uploading/downloading it as a whole first. Also, a normal CANopen array member or record member can be larger than 4 bytes. – Tagli Nov 02 '21 at 17:28
1

When should I use normal SDO transfer in CANopen?

The answer is as simple as it is obvious: whenever you cannot use expedited transfer.

There are no any special rules. If client asks for an object and server cannot fit the response into 4 bytes of expedited response it will use segmented response. Or when client wants to write new object data and cannot fit it into expedited request then it will use segmented request.

Maple
  • 11,755
  • 2
  • 20
  • 56