Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing CAN-Device using CANopen

Hi Thomas,

Yes the first byte specifies the command which is defined in the CANopen spezification. See the following link:

Link 

To your second question: It depends on the speed you need for the SDO. I prefer to use a sub VI (see attached) to write and read SDOs.

In this Case you got  the message directly , without any poll.

What kind of data are you reading there? perhaps it is easier to use a PDO?
 
DirkW
0 Kudos
Message 11 of 15
(2,554 Views)
Hi Dirk
 
I have to read about 10 different values. Most of them are serial numbers of different items. I don't have to take care of speed as this process is taking place after a tool test with a duration of about 30 - 45 minutes.
 
Yes a sub vi is what I also wanted to code. I'll have a look at what you've posted and give it a try.
 
Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 12 of 15
(2,552 Views)

Hi Dirk

I had a look at the vis you posted and modified them a little to meet my needs. I just tested them on the testrig - it worked. Exactly the way I wanted it.

Many thanks - you helped me a lot.

Thomas

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 13 of 15
(2,522 Views)
Hi Dirk
 
What would be the difference if I use PDO? And how would I have to do it?
 
Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 14 of 15
(2,490 Views)

Hi Thomas,

The profile (DS301...) normally defines the mapping and so you can find the default mapping in a way that PDOTx 1 is for digital Input and Rx1 is for digital Output and PDOTx 2 is for analog Input and Rx2 is for analog output. This is done, if you have such I/O available. But you can map these PDOs by your own, using SDO commands. Attached you can find a manual for the WAGO CANopen system. This manual describes the use of the different SDOs to map a PDO  I/O.

I think thats easier for you to understand and should clarify the way to go.

DirkW

0 Kudos
Message 15 of 15
(2,482 Views)