[etherlab-users] Accessing same PDO for both read and write

Gavin Lambert gavinl at compacsort.com
Thu Jan 24 22:33:38 CET 2013


For some odd reason I didn't receive the message below, only the replies.
But in any case:

 

I haven't tested this myself, but I think you can still use it as read/write
from a single domain.  Remember that the EtherCAT main loop consists of:

1.       Read previously received incoming packet.

2.       Do any cyclic processing.

3.       Send new outgoing packet.

 

In #2, the memory location in the domain will contain the value read from
the device.  You can then update this memory location with the value you
want to write to the device.  (I'm not sure whether the input value gets
populated strictly at #1 or at some time shortly after #3, but you can write
the code such that it doesn't need to care either way.)

 

So if you want to treat them as independent in your application, then simply
create two extra variables in your application's memory; in each cyclic
processing loop, copy the domain value into your input application variable
and copy your output application variable into the domain value, in that
order.

 

  _____  

From: etherlab-users-bounces at etherlab.org
[mailto:etherlab-users-bounces at etherlab.org] On Behalf Of Thomas Nelson
Sent: Thursday, 24 January 2013 16:15
To: etherlab-users at etherlab.org
Subject: [etherlab-users] Accessing same PDO for both read and write

 

All,

 

My client has a robotics system using Copley Controls Accelnet Plus drives
with a digital input-triggered capture capability that we're trying to use
for positioning calibration.  This feature requires the ability to map the
same slave CoE object for both read to detect the capture event and write to
subsequently rearm the trigger.  Mapping this object to both Tx and Rx PDOs
appears to work correctly from the PDO mapping info returned from the
master.  However, when I attempt to register the corresponding mapped PDO
entries in the domain, I get the same domain offset for both PDOs,
preventing the application from managing them independently.

 

The ecrt_slave_config_reg_pdo_entry() function doesn't have an argument to
distinguish the direction of the PDO mapping, so is this capability not
supported by the master?

 

We're using the 1.5.0 release.

 

Thanks,

 

Tom Nelson

Consulting Engineer

Granite Computer Sciences, LLC

 

 

 

 






 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20130125/785ecabb/attachment-0004.htm>


More information about the Etherlab-users mailing list