0
\$\begingroup\$

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

\$\endgroup\$

2 Answers 2

0
\$\begingroup\$

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.

\$\endgroup\$
2
  • \$\begingroup\$ Or it can be array? \$\endgroup\$
    – DanM
    Nov 2, 2021 at 16:26
  • \$\begingroup\$ @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. \$\endgroup\$
    – Tagli
    Nov 2, 2021 at 17:28
0
\$\begingroup\$

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.

\$\endgroup\$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.