Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating SDO Object error (-1074388956)

I created a very simple VI consiting of the CANOpen Library supplied by NI.  Starts with an Interface Create, to a SDO Create, to a SDO Write, to a Module Control, to a Close.  What is strange is I am able to send my SDO onto the bus (monitoring it using a sniffer).  The SDO Write then reports back this strange object error.  Also, the "completion code" out of the SDO write is "COE_SDO_SUCCESS" = No SDO error has occurred.  It actually goes to the Moduel Control to set it into pre-operational mode, and yet another SDO packet appears on the bus.  Thinking this error is false, I attemped to loop the SDO write (not the error), but it won't write the second time.
 
Can someone provide me with a .jpg example if anything?  I do not have any examples from NI to compare with. 
0 Kudos
Message 1 of 6
(7,215 Views)

Could you attache your code , so i can see what you are up to. I could have a look to the code then.

DirkW

0 Kudos
Message 2 of 6
(7,207 Views)
I am running LabVIEW 8.5 and I believe this is 1.1 of CANOpen.
0 Kudos
Message 3 of 6
(7,205 Views)
Hi dre99gsx,
 
I can't see your code since I am using Labview 8.0.
 
I have attached the SDO WRITE example code for your reference. You say that you have used the module control at the end.The better way is to use this at the starting and setting it to either Pre-operational or Operational as SDO works in both.
The problem you may be facing is that,module control command you have given might not be proper,you may not be closing it at the end.
 
Please let me if I am wrong anywhere or in the code attached.
 
 
0 Kudos
Message 4 of 6
(7,185 Views)

Yes thats correct, you need to execute the module control "Set preoperational before you operate any SDO command. Furthermore the second module control needs the interface create handle not the SDO handle. See the attached code.

DirkW

Message 5 of 6
(7,176 Views)
Thanks everyone for the responses.  Turns out I was using an unsupported CAN card (usb can interface).  I had assumed all NI can interfaces were compatible with anything NI makes, but not in this case.  Swapped over to a pcmcia can card and it worked flawlessly.
0 Kudos
Message 6 of 6
(7,163 Views)