Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

What causes "An SDO transfer is already pending for this device. A device cannot handle more than one SDO transaction at a time"

What causes the error "An SDO transfer is already pending for this device. A device cannot handle more than one SDO transaction at a time" and how do you avoid causing it?
0 Kudos
Message 1 of 10
(7,062 Views)
Howdy LabTech!

Unfortunatly I'm going to need more information before I can really help with your problem as there are a multitude of different situations that can cause this error.  Please let me know exactly what equipment you're using (hardware and software) and provide some specifics about your network setup.  Then we can dive into what is causing this error and how to avoid it in the future.  I look forward to hearing back from you!

Chris
Applications Engineer
Sincerely,

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

This error means that your Master has allready a pending SDO transfer running. It could be a open handle for an SDO you have used earlier and not closed properly.

Make sure you are closing all handles after you have used them. You could use the NI-SPY to log all API calls to see whether or not there is still a handle open.

The NI-SPY installs with the NI-CAN driver.

DirkW

0 Kudos
Message 3 of 10
(7,037 Views)
Hi Chris,
 
I am using Labview with the CANopen library and a series 2 PCI CAN interface card. As an example of the application, I have a number of a/d converter nodes that are configured once via SDO transfers, then  conversions are started and the results read from a subset of the nodes, then the same thing with another subset of the nodes. This is all done via SDO transfers. This repeats every 8 seconds.
 
Hi Dirk W
 
I create one SDO object for each node and I keep the handles open because the start conversion and read result is via SDO transfers.
 
Bob
0 Kudos
Message 4 of 10
(7,031 Views)
LabTech,

I would definitely use NI-SPY to log what's going on and track down your error from there.  If you need more assistance performing an NI-SPY capture check out Performing a Good NI-SPY Capture.  Good luck!
Sincerely,

Chris G in AE
0 Kudos
Message 5 of 10
(6,995 Views)

Hi Chris,

In the error message does "this device" refer to the NI CAN interface card or one of my CANopen nodes. Can you describe some of the possible causes of this error so that I could have an idea of what might be causing my problem?

0 Kudos
Message 6 of 10
(6,993 Views)
Hi,
 
Attached is an NI SPY capture taken while running my code and choosing to continue when there is an error.
 
Bob
0 Kudos
Message 7 of 10
(6,985 Views)

Hi,

This error happens because there is a handle open already for these IDs, thus the configuration fails and instead the old one is used to communicate. I guess you are not using the CANopen Close. Vi to close all your SDO handles before you configure new instances.

use the Close VI to close every single handle or use the interface handle, which comes from the Interface Create function and close this one in the end. It closes all open handles including the SDO handles. See the CANopen Library examples for more information.

DirkW

0 Kudos
Message 8 of 10
(6,974 Views)
Are the CANopen library VIs and the CAN API threadsafe? Can the SDO Write and SDO Read vis be used as reentrant VIs?
0 Kudos
Message 9 of 10
(6,965 Views)
Both the NI-CAN dri8ver and the CANopen Library should be thread safe.
 
DirkW
0 Kudos
Message 10 of 10
(6,943 Views)