Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

CANOpen Labview library exhibits ~5ms delay between SDOs?

Using a CAN analyzer, I seemed to have found a slight delay in SDO single packet transmissions.  Using NI's CANOpen Library SDO Write in a while loop (after creation of the CAN oobjects), I pass a simple write parameter to index 6040.  I noticed that the analyer reports the SDO reply (581 ID) at 1ms or less from the SDO transmit packet (601).  But, the next SDO transmit happens 5ms later. 
 
I attempted to do this with a different CAN library and was getting 1ms delays between SDO transmits (smallest while loop itteration from windows..). 
 
I attempted to remove the llb call within SDO write so that it does not wait for an SDO response, but got an error with a SDO Obejct invalid after attempting the 2nd transmit.
 
Any advice would be appreciated, thanks.
0 Kudos
Message 1 of 6
(7,954 Views)
The CANopen Library uses a special CANopen Services DLL in the backround and only deleting something from the VIs doesn't change the way it works.
SDO is classified as not time critical and therefore it should not matter how fast multiple SDO Writes are executed.
There is no way to improve the SDO performance for the CANopen Library.
You could use NI-CAN directly and write your own SDO routines. This way you could certainly reach the 1 ms rate for multiple requests.
Is there a reason for using SDO transfers that fast?
 
DirkW
0 Kudos
Message 2 of 6
(7,942 Views)
Correct.  I can duplicate my SDOs using ncWrite and achieve 1ms delay between packets (of course, not checking for the SDO replies).
 
The reason for doing this is at each relative move, I would like to change about 6 motor parameters, each of which currently require 1 SDO each.  These all are 32bit data numbers as well.  I can achieve the same results by queueing the parameters sometime before the relative move is needed, but this requires implementation which can effect our error recovery.
0 Kudos
Message 3 of 6
(7,938 Views)
Hi currently I am trying to control Maxon motor using CANOpen Library with EPOS.

The PXI-NI-CAN and CANOpen Library have been installed. Do you have example for writing and reading SDOs packets?
When I am using IXXAT USB-CAN I successfully write the dictionary objects, I attached the brief sequence of writing and reading.

Thanks.



0 Kudos
Message 4 of 6
(7,916 Views)
Howdy bono02,

Assuming you are using LabVIEW, the examples should be located in the LabVIEW directory (normally Program Files\LabVIEW 8.5\examples\CANopen).  There you will find the SDO Read and SDO Write examples.  Enjoy!

Sincerely,

Chris G in AE
0 Kudos
Message 5 of 6
(7,896 Views)
Hi all,

Thx. I successfully wrote the Dictionary Object with CANOpen using SDO. As fas as I have learned, SDO is confirmed while PDO is unconfirmed and faster than SDO.
My question is, is it possible to use only SDO to write a real-time application (less than 100 Hz)? Since PDO looks like giving more works. I am using 1 Mbps with RT 8.5 on
PXI NI-CAN.

Thank you.


0 Kudos
Message 6 of 6
(7,887 Views)