Discusiones sobre Productos NI

cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

CANopen SDO cob-id help

Hi there! My name is Patrick, and I'm finishing my studies at university. My final project is doing a CANopen node. All over the net I have found really useful information, and together with the CENELEC standard for CANopen, I'm slowly begining to understand how this stuff works. I really like it, by the way.


However, I'm having a hard time in understanding some basics about SDO usage, and I hope somebody here may be able to help and point me in the right direction. Let's go then with some questions. Since they are quite a few of them, I'll put Question plus a number before them, so reply which you know/can/will.

 

QUESTION 1:

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?

 

QUESTION 2:

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 entrie. 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?

 

QUESTION 3:

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, from function code 1100 (SDO rx) and node-id 0100000 (0x20, server node-id). Is it ok?

 

QUESTION 4:

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?

 

 

QUESTION 5:

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?

 

 

That's it for now...

 

I'd really appreciate some help, since I feel very lost at the moment and it's really starting to frustrate me. Any bit of help you can provide will be very welcome.

 

Cheers!

 

 

 

 

 

0 kudos
Mensaje 1 de 1
4.354 Vistas