r2k-in-the-vortex / ethercat_src

10 stars 8 forks source link

Read XML problem #8

Open Lordrinium opened 1 month ago

Lordrinium commented 1 month ago

Dear developer!

Thank you very much for your work! I encountered this problem, what am I doing wrong?

Thank you for your help!

Bash out: ./ethercat_src_test ./ethercat.cfg 09:48:13 reading file './ethercat.cfg' 09:48:13 xmlfilenameparam: /etc/openplc/ethercat.xml 09:48:13 ethercat_device_indexparam: 0 09:48:13 verboseparam: 0 09:48:13 configonlyparam: 1 09:48:13 ERROR /root/OpenPLC_v3/utils/ethercat_src/src/xml_conf_parser/xml_conf_parser.c:305: Invalid configuration file, expected root name EtherCATInfoList but got EtherCATInfo 09:48:13 ERROR /root/OpenPLC_v3/utils/ethercat_src/src/ethercat_src.c:95: failed to parse configuration file

XML: ethercat.xml.txt

rainer-kordmaa-foxconn commented 1 month ago

Hi, your xml is simply malformed, I can't actually try it right now, but I fixed couple of obvious mistakes in your file, try it like that. ethercat.xml.fixed.txt

Lordrinium commented 1 month ago

Thanks for the answer!

Yes, that's how the variables appeared. I have one more question because I don't know how to start.

I have the list but I don't get a value. In the meantime, I can't switch from preop mode.

This is what I get.

I have the ESI file. how can i start

root@SoftPLC:/etc/openplc# ethercat states OP -a 0 root@SoftPLC:/etc/openplc# sudo tail -f /var/log/kern.log | grep EtherCAT Sep 11 09:42:43 SoftPLC kernel: EtherCAT ERROR 0-0: SDO upload 0x1800:26 aborted. Sep 11 09:42:43 SoftPLC kernel: EtherCAT ERROR 0-0: SDO abort message 0x06020000: "This object does not exist in the object directory". Sep 11 09:42:43 SoftPLC kernel: EtherCAT ERROR 0-0: Failed to process SDO request. Sep 11 09:43:20 SoftPLC kernel: EtherCAT ERROR 0-0: SDO upload 0x1800:26 aborted. Sep 11 09:43:20 SoftPLC kernel: EtherCAT ERROR 0-0: SDO abort message 0x06020000: "This object does not exist in the object directory". Sep 11 09:43:20 SoftPLC kernel: EtherCAT ERROR 0-0: Failed to process SDO request. Sep 11 09:44:29 SoftPLC kernel: EtherCAT ERROR 0-0: ecrt_master_sdo_upload(): Buffer too small. Sep 11 09:49:43 SoftPLC kernel: EtherCAT ERROR 0-0: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR). Sep 11 09:49:43 SoftPLC kernel: EtherCAT ERROR 0-0: AL status message 0x001E: "Invalid input configuration". Sep 11 09:49:43 SoftPLC kernel: EtherCAT 0-0: Acknowledged state PREOP.

Thank you very much for your quick reply

rainer-kordmaa-foxconn commented 1 month ago

What exactly do commands sudo ethercat rescan and sudo ethercat xml print out?

Lordrinium commented 1 month ago

Dear rainer-kordmaa-foxconn!

I uploaded the factory ESI file and the ethercat xml files.

Thank you very much for your help!

gx-od-ethecat-xml.txt Omron GX-Analog IO.xml.txt