[etherlab-users] How get datagram warning use 1.5.2 api?
Zhiyong Weng
zhiyong.weng at gmail.com
Sun Oct 5 03:59:16 CEST 2014
Hi ALL,
I use etherCAT Master 1.5.2 to control servo motors. the system works
perfect more than 6 months until last week.
The data (motor position) read from "domain_input_pd" were wrong. It
made the system crazy.
I manage to reproduce it and find out that other system ,in same
network, transfer huge amount data and almost block the band width.
I also notice , when the issue happen, the syslog print a lot
warning: *UNMATCHED/SKIPPED
**datagrams*
So I know the data ,I read from datagram, is not flesh. actually it is
old data from last cycle. (1.5.2 document ,page 74 ,8.0.2 Bus Cycle
Measuring).
My question is how I can catch the PDO datagrams warning or error in
the code,rather than Syslog?
Thank you.
Regards,
Zhiyong
bool fm_auto::DuetflEthercatController::cyclic_task()
{
ecrt_master_receive(master);
ecrt_domain_process(domain_input);
// read PDO data , motor position
position_actual_value_PDO_data_slave_zero =
EC_READ_S32(domain_input_pd + fm_auto::OFFSET_POSITION_ACTURAL_VALUE);
ecrt_domain_process(domain_output);
// write PDO data, motor velocity
...
EC_WRITE_U32(domain_output_pd + fm_auto::OFFSET_TARGET_VELOCITY,
value);
ecrt_domain_queue(domain_output);
// send process data
ecrt_domain_queue(domain_input);
ecrt_master_send(master);
return true;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20141005/8ab90b72/attachment-0002.htm>
More information about the Etherlab-users
mailing list