<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I don't agree completely with you.<br>
You're right, but if I write a certain bit out to 1 I expect that
nobody changes it's state and so, the actual value on the fieldbus
should remain 1 up to the end of the program, even if I don't write
1 continuously.<br>
I see this as a sort of bug, I'll write a workaround buffering the
output section of the domain area but I admit that I don't like this
too much ...<br>
<br>
Thanks,<br>
Thomas.<br>
<br>
<br>
<br>
<br>
On 08/10/2012 09:05, Thomas Bitsky, Jr. wrote:
<blockquote
cite="mid:CABMHXf848KrKA-tpFNOjX2OzKFVx8wSMnEcpv_yhNzzLXOJ6cg@mail.gmail.com"
type="cite">
<p>I think you're thinking of it wrong. The data isn't cleared,
it's replaced by the actual value on the field bus. So, if you
don't write the value out to update the field bus, then the
packet gets returned with the value that is out there. </p>
<p>Thomas C Bitsky Jr<br>
Lead Developer and Application Engineer<br>
ADC | <a moz-do-not-send="true"
href="http://automateddesign.com">automateddesign.com</a><br>
(Sent from my mobile device.)</p>
<div class="gmail_quote">On Oct 6, 2012 4:14 AM, "Thomas Paoloni"
<<a moz-do-not-send="true" href="mailto:thomas@digithom.it">thomas@digithom.it</a>>
wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
Hi all,<br>
<br>
even if I'm dealing with ethercat since more than one year,
I'm in front of a very basic question ...<br>
As from I can see, the data in master->slave direction in
the domain_pd area are not preserved from an update to
another.<br>
I'mean that I need to write out data to domain_pd area at each
cycle, even if I data is not changed and theoretically I don't
need to update some parts of the pdo area.<br>
<br>
Just applying this to the basic example in examples/user<br>
<br>
void cyclic_task()<br>
{<br>
int i;<br>
<br>
// receive process data<br>
ecrt_master_receive(master);<br>
ecrt_domain_process(domain1);<br>
<br>
// check process data state (optional)<br>
check_domain1_state();<br>
<br>
if (counter) {<br>
counter--;<br>
} else { // do this at 1 Hz<br>
counter = FREQUENCY;<br>
<br>
// calculate new process data<br>
blink = !blink;<br>
}<br>
<br>
EC_WRITE_U8(domain1_pd + off_dig_out, blink ? 0x06 :
0x09);<br>
<br>
// send process data<br>
ecrt_domain_queue(domain1);<br>
ecrt_master_send(master);<br>
}<br>
<br>
<br>
moving the EC_WRITE_U8 inside the if condition (after the
blink=!blink) will not work, because the blink bit is cleared
from the pdo area after the process data has been sent.<br>
<br>
This means that I should keep a copy of the process data and
write it on the domain1_pd each time.<br>
Is this right or I'm missing something ?<br>
<br>
<br>
Thanks,<br>
Thomas.<br>
<br>
<br>
_______________________________________________<br>
etherlab-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:etherlab-users@etherlab.org" target="_blank">etherlab-users@etherlab.org</a><br>
<a moz-do-not-send="true"
href="http://lists.etherlab.org/mailman/listinfo/etherlab-users"
target="_blank">http://lists.etherlab.org/mailman/listinfo/etherlab-users</a><br>
</blockquote>
</div>
</blockquote>
<br>
</body>
</html>