CANopen help

P

Thread Starter

Patrick Vogeli

Hi there!

My name's Patrick and I'm finishing my studies at university this year. My final career project is writing a CANopen stack suitable for a NXP LP2292 microcontroller.

Sadly, I'm finding it quite hard to fully understand how it works. I think I have a quite great overview now, and internet has proven very helpful in finding great information. But still, SDO usage and configuration is becoming hard to understand to me.

I already know about the diferent types of SDO usage (upload, download, initiate) and those are no trouble. But, the cob-id's and the related entries in the Object Dictionary are.

So, here are my questions:

<b>QUESTION 1:</b>
In a canopen network, let's focus on 2 specific nodes, with node-id 0x10 and 0x20. Node 0x10 acts a server for node 0x20 but also as a client, and the same for 0x20, which can be a client OR a server for 0x10. I assume this is possible, isn't it? Also, I'd say that if my device supports 20 clients, I must have 20 entries in the OD, indentifying all of them, in the ServerSDO part. Also, If my device is a client to 30 servers, I must have 30 entries in the ClientSDO part of the OD?

<b>QUESTION 2:</b>
If this is possible, I will need to have one Server-SDO entry in the Object dictionary in each device (index 0x1200?) and also a Client-SDO entry (at index0x1280?). Now.. I really have trouble in understanding what should go into those entries. Client-server COB-ID, Server-Client COB-ID, and Server/Client Node-id.. but the only thing I've got clear is what to put in the node-id field.. could someone give a good example or point me to one?


<b>QUESTION 3:</b>
Now, I want to write some information from node 0x10 to node 0x20, so I'll be doing an SDO Dowload, where the client would be 10 and server 20. I'd say, that the COB-id to put into the CAN frame would be 0x620, function code 1100 (SDO rx) and node-id 0100000 (0x20, server node-id). Is it ok?

<b>QUESTION 4:</b>
The same way, if I wanted to upload an SDO from the server (reading information from it), I'd put 0x5A0, that would be function code 1011 (sdo tx) and node id 0100000 (0x20, server node-id). Is this true? Or anytime I address to the server I'll have to use SDO rx function coce (1100)?

<b>QUESTION 5:</b>
I don't know if it works like I've put, but let's go forward. Once the server receives the frame, how will it know where it came from and, thus, where to reply? I'd suppose the reply would be some function code + client node-id. Replay to SDO download would be function code 1011 and client-node id 0x10? Reply to SDO upload would be 1100+0x10?

So, there are my questions. I suppose answering those require some time, so don't worry. Every question answered will help me a lot, and 1 questions answered is a lot better than none.

Thank you all in advance!
 
Thread starter Similar threads Forum Replies Date
M General Communications Chat 1
E General Communications Chat 6
H General Automation Chat 0
B Open Control 6
O Motion Control 0
Top