Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I use more than four PDOs when working with NI-Industrial Communications for CANopen?

When I call CANopen TPDO Create.vi to create TPDO objects I can only input PDO1 through PDO4. How do I work with more than four PDOs?

 

I see the other forum thread using an older version of CANopen, but it does not appear to directly translate into the newer NI-Industrial Communications for CANopen.

 

http://forums.ni.com/t5/Automotive-and-Embedded-Networks/PDOs-on-a-CANopen-network/m-p/405001?requir...

 

 

0 Kudos
Message 1 of 8
(8,404 Views)

Hi wireman,

 

It should definitely be possible to use more PDOs with some configuration.  What I'm curious of is what you're providing to the TPDO Create vi as its inputs, specifically the Node ID and Interface Object In?  

 

Regards,

 

Dave C

Applications Engineer
National Instruments
0 Kudos
Message 2 of 8
(8,382 Views)

Dave,

 

Thanks for your reply. I'm not sure what it is you're asking. I pass in the node-ID for the slave node, which varies depending on which particular device I'm communicating with. The interface object comes from a call to CANopen Interface Create.vi for the NI 9881 I'm using. The question I have is that when I call CANopen TPDO Create.vi, how do I specify a PDO channel greatert han PDO 4? The input appears to be limited to PDO 1 through PDO 4.

 

-wireman

0 Kudos
Message 3 of 8
(8,374 Views)

Hi wireman,

 

A good resource for CANopen is available here.  That page explains that typically in the CANopen standard, there are only 4 predefined PDOs in each direction (transmit and receive).  To use extra PDOs, additional configuration is required.  The configuration of the predefined PDO Channels refers to the COB-ID that they are linked to by default.

 

According to the LabVIEW help files, the COB-ID is 'calculated' by adding the value of the PDO Channel and the Node ID, if the COB-ID is zero.  However, if the COB-ID is explicitly defined, then LabVIEW will ignore the calculation provided by the Node ID and PDO Channel.  So, if you need more than the four PDOs, you'll need to use the COB-ID input to differentiate which channel is being referenced.

 

I hope this clears some things up, and please don't hesitate to ask for more advice.

 

Regards,

 

-Dave C

Applications Engineer
National Instruments
0 Kudos
Message 4 of 8
(8,367 Views)

Dave,

 

Thanks. We have already configured the slave device to send more than four PDOs, but what I do not understand is how to program the master device in LabVIEW to make the master read more than four PDOs. Can you help me with that?

 

-wireman

0 Kudos
Message 5 of 8
(8,364 Views)

Hi wireman,

 

What did you do to configure the slave to send more than four PDOs?  I think that will be key to whether or not this can be done and what steps will need to be taken to complete this job.  I'm also wondering how many PDOs you're needing to use for this device?

 

Regards,

 

-Dave C

Applications Engineer
National Instruments
0 Kudos
Message 6 of 8
(8,351 Views)

Dave,

 

The slave is not implemented with NI equipment, nor is it written in LabVIEW. But to answer your question, the CANopen EDS (Electronic Data Sheet) and Object Dictionary on the slave device are configured to output more than four PDOs. (Six in this case).

 

-wireman

0 Kudos
Message 7 of 8
(8,348 Views)

Hi wireman,

 

So I've seen a reply now from an R&D rep regarding this.  He's said that using the COB-ID entry as I suggested above is the method to use to use more than four PDOs.  That ID should route to an address in the device's Object Dictionary, which sounds like a known location since the slave is configured for more outputs already.  Point the COB-ID at the address you've configured for the output and see if we can establish communication.

 

Regards,

 

-Dave C

Applications Engineer
National Instruments
0 Kudos
Message 8 of 8
(8,341 Views)