RE: Information on using SYNC

"John Dammeyer" <[email protected]>
Newsgroups gmane.comp.hardware.bus.can
Message-ID <610D1111D30B4F4393197190D461293A@asus>
Hi,

I'm probably the one that gave you that idea in another posting.

As I understand CANOpen a node can be configured to transmit a PDO under a
number of different conditions.  One of them is On Change with additional
parameters like an inhibit time preventing a noisy sequence of On Change
events.  Another is periodically based on some internal clock inside the
node.

And then there's a transmission on receipt of the SYNC frame.

As was discussed in a previous set of messages, if each node is configured
to transmit on a SYNC then you need enough time between SYNC messages to
handle all 40 nodes.  And the bitwise arbitration will ensure that all 40
nodes can transmit.

What you might be able to do is use the inhibit time to prevent a node
transmission on each SYNC but I'm not sure that's within the spec since
the inhibit is usually use with the On Change event.

One of the really cool things about CANOpen is the handling of PDOs.  Most
CAN High Level Protocols (HLPs) have the equivalent of SDO.  Send the node
a message and have it report something.  Send node data and have it
respond with some sort of ACK message.  Most CAN systems also maintain
some type of heartbeat and are for the most part Master/Slave oriented as
is CANOpen.

But the Process Data Objects (PDOs) add functionality because they can
combine a number of parameters from different object dictionary entries
into one message.   And depending on the complexity of the device, the
value of an entry can be used to generate a new message.

Think of it this way.  If I understand how it all works you need an Object
Dictionary (OD) value that is attached to a TxPDO (Tx from the Master
node).  The master sets this OD value with a new message on a periodic
basis.

The Slave Device has an RxPDO (again from the Master's perspective it's an
Rx) connected to this OD value that transmits the PDO when the OD value
changes.  Since we can also mask OD values you could mask the bottom 3
bits and when equal to some value then have the RxPDO be sent.  What's in
that PDO are the Object Dictionary values of interest.

Since the mask is on the last 3 bits the RxPDO will transmit every 8
TxPDOs from the master.  Now you can block your 40 nodes into groups of 5
or if some nodes are more important mask with 0x03 instead of 0x07 and
those will transmit every 4 of the TxPDOs.

So the sequence is something like this.

Master sends TxPDO with first two bytes of message equal to 0001
Slave devices receive this TxPDO and use the value to update OD 6120 with
0001.
Slave sees that OD 6120 has changed after masking it with 0x0007 and that
it's equal to 0001
Slave then sends an RxPDO with OD locations 6002, 6004 and 7004 in the PDO
message.
Master (and all other nodes interested in that RxPDO) updates it's DO
locations with the data from the PDO and does whatever processing is
required
A period of time goes by and the master updates an OD dictionary by
incrementing and masking it.  The old OD entry was 0001, the new one is
0002 and the masked value 0x003FF results in 0002.

Since the OD entry has changed the master generates a new TxPDO this time
with the first two bytes of the message hold 0002.
Slave devices receive this TxPDO and use the value to update OD 6120 with
0002.
Slave sees that OD 6120 has changed after masking it with 0x0007 and that
it's equal to 00002
Slave does nothing else since OD entry 6120 is not equal to 1.

And so on.

It all depends on what you device is capable of.   Someone better versed
in CANOpen might be able to lay that out better or explain where I'm
wrong.  That I've misunderstood what is possible.

John Dammeyer


"ELS! The Solution"
Automation Artisans Inc.
http://www.autoartisans.com/ELS/
Ph. 1 250 544 4950


> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On
> Behalf Of jtolmanserra
> Sent: Thursday, December 06, 2012 1:23 PM
> To: [email protected]
> Subject: [CANLIST] Information on using SYNC
>
>
> Hello Experts!
>
> I am trying to find some information on ways to use and
> configure using the SYNC object in CANopen.  I have 40 slave
> nodes, all configured identically, and I want to make sure
> that each of them has an equal opportunity to send onto the bus.
>
> I have read that you can configure a slave to send its PDO
> data after it sees a certain number of SYNC messages.  Is
> there a link I can go to that explains this further?
>
> Thanks!
>
> Jeff
>
> --
> Archives and useful links: http://groups.yahoo.com/group/CANbus
> Subscribe and unsubscribe at www.vector.com/canlist/
> Report any problems to <[email protected]>
>

--
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.