Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

CANopen SDO

Hi
 
According to CANopen SDO protocols -
 
Six confirmed services (SDO Download, SDO Upload, Initiate SDO Upload, Initiate SDO Download, Download SDO Segment, and Upload SDO Segment) and one unconfirmed service (Abort SDO Transfer) are defined for Service Data Objects doing the standard segmented/expedited transfer.
Eight confirmed services (SDO Block Download, SDO Block Upload, Initiate SDO Upload, Initiate SDO Block Download, Download SDO Segment, Upload SDO Segment, End SDO Upload and End SDO Block Download) and one unconfirmed service (Abort SDO Block Transfer) are defined for Service Data Objects doing the optional block transfer.
 
Now i want to read a parameter by using CAN Frame APIs. So i have to send a request to the slave. Please tell me this will (Sending a request & reading the data ) comes under which Confirmed Services. ?
 
Also
 
The data we can write is of 8 Byte.
0 byte = ??
1 byte = Index Low Byte
2 byte = Index High Byte
3 byte = Sub Index
4 byte = Data1
5 byte = Data 2
6 byte = Data 3
7 byte = Data 4
 
Please let me know the 0 byte is used for what perpose. What indicates & how to Select its value for writing & Reading.
 
If you hane any document or link then please share with us.
 
Thanks in advance
 
Regards
J
 
0 Kudos
Message 1 of 7
(11,288 Views)
Hello J,

Would it be possible to provide a little bit more detail on your application?  What CAN device are you using and what are you communicating with?  What are you using to program the CAN device? 

The CANOpen protocol is an Application Layer (higher level) protocol.  The CAN frame API is usually used to send a receive "raw" CAN frames, so I'm not sure how it can fit in a CANOpen object category.  Also, I think the data you receive is also device dependant, so once you give us more details on your application, we may be able to help you further.

Have a great weekend.
O. Proulx
National Instruments
www.ni.com/support
0 Kudos
Message 2 of 7
(11,271 Views)
Hi J.,

Byte 0 is used as protocol header. Here the client specifies the requested protocol and the server answers accordingly.


To read a simple parameter the client sends a Read Request (Initiate SDO Upload Protocol):

Byte 0:  
    Bit 7..5 :  client command specifier (ccs) = 2             
    Bit 1..4 :  not used , always 0 
Byte 1: Index High Byte
Byte 2: Index Low Byte
Byte 3: Subindex
Byte 4..8: reserved, always 0

The server responds

Byte 0:  
    Bit 7..5 :  server command specifier (scs) = 2             
    Bit 4 :      not used , always 0
    Bit 3..2:   (n) number of Bytes in Byte 4-8 that do not contain data
                   only valid if e=1 and s=1
    Bit 1 :      (e)
    Bit 0 :      (s)
    If e=0 and s=1  Byte 4-8 contain the number of bytes to be uploaded and futher segment transfers are necessary to upload all data.
    If e=1 and s=1  Byte 4-8 contain the data of length 4-n to be uploaded.
    If e=1 and s=0  Byte 4-8 contain an unspecified number of bytes to be uploaded.
Byte 1: Index High Byte
Byte 2: Index Low Byte
Byte 3: Subindex
Byte 4..8: data as specified by n,e and s



So a read request may start with Byte 0 = 0100 0000 = 40h
A valid response starts with         Byte 0 = 0100 0010 = 42h
An Access Error response has   Byte 0 = 1000 0000 = 80h


You find a full protocol description in the CiA (CAN in Automation) Standard 301.

I hope this information gets you started
Anke



0 Kudos
Message 3 of 7
(11,248 Views)

Hi All

How the concept of Voltage Standing Wave Ratio (VSWR) is used in selecting 120 Ohm termination resistor in CANopen protocol ?

Regards

H

0 Kudos
Message 4 of 7
(11,071 Views)
Howdy,

In a transmission line, the ratio of maximum to minimum voltage in a standing wave pattern. The VSWR is a measure of impedance mismatch between the transmission line and its load. The higher the VSWR, the greater the mismatch. The minimum VSWR, (i.e. perfectly matched impedances), is one.

VSWR = Vmax / Vmin = (1+ |gamma|) / (1 - |gamma|)

where gamma is the reflection coefficient.

For NI-CAN, you have to match the termination resistor to the impedance of the cable to avoid reflections.  I hope this answers your question!


Message Edited by Chris G in AE on 05-07-2008 11:43 AM
Sincerely,

Chris G in AE
0 Kudos
Message 5 of 7
(11,047 Views)
I've found this message that's the closest issue I need but my question is more basilar. I need communicate in CanOpen dsp 301 using a NI-USB 8473 card. I'm using the C api interface functions and I need a minimal example of how to implement the SDO and PDO channels using the primitives ncRead and ncWrite. Can anyone give me an orientation support about this issue?

thanks a lot
willy
0 Kudos
Message 6 of 7
(10,963 Views)
Willy,

It will defnitely be worth while to check out the NI-CAN Examples.  There are some programs written specifically in C that I think will address your needs.  Feel free to expand upon these examples and customize them for your own needs.  Good luck, please post back if you have any more questions.
Sincerely,

Chris G in AE
0 Kudos
Message 7 of 7
(10,931 Views)