RE: Re: CAN implementation extra

"John Dammeyer" <[email protected]>
Newsgroups gmane.comp.hardware.bus.can
Message-ID <[email protected]>
The trouble with CANOpen is it's so powerful that it's also easy to get confused.  I know I do.  Especially when trying to figure out which is a server and which is the client and who sends a TPDO and who sends an RPDO.  And you have to make sure that no message ever is identical and that's why multiple SDO channels are mentioned.

The Master in a system is usually the only one that is ever allowed to issue SDO messages.  That's because the NodeID part of the SDO is for the destination node.  You can't really have two identical SDO messages from two difference nodes to the same device possibly happening at the same time.  

It appears you want one slave device to use data from another slave device.  The TPDO node A transmits contains the ID of the sender A.  All nodes interested in that information configure an RPDO to have that same ID and then map the data to their Object Dictionary.

For example.  NodeA is given the ID 0x0A.  NodeB is given the ID 0x0B.  The TPDO1  from NodeA is assigned ID 0x18A while the RPDO1 for NodeB is also assigned 0x18A.  Whenever NodeA transmits a message with ID 0x18A and the data from your 8 inputs NodeB will receive this and put that data into the respective Object Dictionary entries.

You might have several other nodes like a display that also wants to display the inputs.  Like an RM1001 display from RM Michaelides.  Once again you program it to have an RPDO of 0x18A and map the inputs to one of the LEDs on the display.  Now your NodeB uses the inputs from NodeA for processing and the RM1001 displays the value of 3 of those inputs while the system master who also has an RPDO of 0x18A uses the inputs to determine what to send to NodeC.

The master, with say ID 0x01 will, based on the data from the RPDO1 transmit its own TPDO1 with ID 0x201 and data.  NodeC with ID 0x0C will have an RPDO1 configured to be 0x201 and use the data in that message to perhaps start a cooling FAN.  

So why does the master send 0x200+NodeID with data while the slaves transmit 0x180+NodeID?  It's really more a matter of convention as a Master/Slave or Client/Server model.  Only SDOs contain the ID of the destination device.  PDOs always contain the sender which makes their message unique on the bus.

At no point do you need SDO messages.  The TPDO and RPDO default values are probably the most confusing part of the CANOpen specification.

http://www.canopensolutions.com/english/about_canopen/pdo.shtml

http://infosys.beckhoff.com/english.php?content=../content/1033/TcSystemManager/Fieldbus/CANopen/PDO.htm&id=

John Dammeyer


> So, how about mapping the PDO then?. For example consider slave node A's
> TPDO1 is already mapped to object index 0x2001 for 8 inputs. Now how can i
> access those same inputs from another slave node B which i am going to add
> to the network.
> On slave node A i have already used 4 default PDO's, is that i need to add
> extra PDO as well ?
> 
> This extra node is for monitoring my other nodes input/outputs in a network
> and record them real time.
> 
> _Arun

--
Archives and useful links: http://groups.yahoo.com/group/CANbus
Subscribe and unsubscribe at www.vector.com/canlist/
Report any problems to <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.