There is a way to configure CANopen modules on power up.  The CANopen master 
(or some other node delegated to do this) configures locations in a devices 
object dictionary.   This is all done before the CANopen master changes the 
system from PRE-OPERATIONAL to OPERATIONAL.  

So a device can be configured to place encoder values into TPDO1 at bytes 3..6 
and report that periodically and/or only when changed.  Once set OPERATIONAL 
that device now broadcasts the information.   It can also have a suppression 
value that prevents massive numbers of messages from overrunning the bus.  Like 
report on change but no more often than every 10mS.

On the receive side it's much the same.  Now called an RPDO1 the configuration 
for that PDO is set up to direct bytes 3..6 from that message into a specific 
memory location of the Object Dictionary (OD).  The Object Dictionary is 
configured as an Index:SubIndex.  Generally in Hex format as say 4000:12  where 
the index is 16 bits and the subindex is 8 bits.  The size of the object is 
also defined in the Object Dictionary so it could be as simple as one byte or 4 
bytes or even be a pointer to a string or array and require multiple byte PDO 
messages to transfer data.

Since this could all be configured on power up it there could be a translation 
program from HAL to OD.   And as per my previous posting this is where I start 
to get lost as to how the HAL ultimately is configured and used to abstract 
hardware from the software.

BTW, CANopen also has a Service Data Object message (SDO) which is used as a 
request/answer protocol.   In either case when the value is written into the OD 
it doesn't just have to be data written to a location.  It can also be a 
function that is called with that data.  Or to read from the OD the read 
doesn't actually access a location but calls a function that perhaps generates 
an I2C message to hardware to pull out an A/D value. That value is then 
returned as the SDO reply.


John Dammeyer
http://www.autoartisans.com


> -----Original Message-----
> From: Nicklas Karlsson [mailto:nicklas.karlsso...@gmail.com]
> Sent: March-09-19 8:05 AM
> To: Enhanced Machine Controller (EMC)
> Subject: Re: [Emc-users] CANopen: SOEM/SOES, CANfestival, anything
> more? --> Configuration
> 
> During configuration there are no possibility to pass a string from the *.ini 
> or
> *.hal file? Only possibility is parameters and hal pins?
> 
> 
> 
> > Several library options, some tests done by Luminize in Machinekit.
> >
> >
> > https://github.com/machinekit/machinekit/issues/589
> >
> > https://github.com/luminize/canopen-machinekit
> >
> > _______________________________________________
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> 
> 
> _______________________________________________
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to