Cannot use ethercat terminals sending more than 1 byte.

More
5 years 4 months ago #211488 by Grotius
Hi Stormhold,

It looks like a run error.
Maybe add some include's to the lcec_main.c, and some lcec names + data over there. I did not do that. :woohoo:

Attached my qt project.
1. open -> qt-test.creator
2. edit config.mk (Set path to the halcomplie executable and lcnc main makefile)
3. edit configure.mk (Set path to the halcomplie executable).
4. edit qt-test.includes (Set path to several includes)
5. Cntr+r (run)
6. When compiled you get the lcec.so and lcec_conf.
7. When doing a new compile just delete the lcec.so and lcec_conf before. ( or do a make clean )
8. Warning's about "set an executable in the custom run configuration" are not important.

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago - 5 years 4 months ago #211507 by Stormholt
@db1981 i believe i add the drivers correctly, i have attached files i edit when adding new drivers

Furthermore, this i how i build after changes:
Code:
cd /home/linuxcnc-ethercat sudo make clean sudo make sudo make install sudo cp -f src/lcec_conf ~/vaerkscnc-dev/config/ #Same path as .ini sudo cp -f src/lcec.so /usr/lib/linuxcnc/modules/
Last edit: 5 years 4 months ago by Stormholt.

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #211514 by Stormholt
@Grotius i dont have/cant find similar paths for the include files:
May have something to do with linuxcnc being installed from apt.
The most similar i have are:
/usr/include/linuxcnc
/usr/lib/linuxcnc
/home/linuxcnc-ethercat/src
With which i get an error: :-1: error: You need to set an executable in the custom run configuration.
I have checked that the .mk files points to an executable halcompile

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago - 5 years 4 months ago #211519 by Grotius
Hi Stormhold,

You are almost there ! Hold on.

error: You need to set an executable in the custom run configuration.
This is no issue. Just look if Qt has compiled the lcec.so.
Qt gives this message because it expect's to start a executable like a program. But there is no. It's just a library.
I get the same message. I just check if lcec.so is compiled.

When for example i start a executable like a c++ hal program, you can set this in the build configuration.
I don't get the message. And the executable program
is then designed to load the lcec.so and then check the library values. Somewhere i did a example of that in a bash file.
You can start a simple bash file to check your library values. Like a bash file that does a halcommand with loadrt lcec.so

The most important includepath is that where halcompile lives. Mabye in c: $ sudo find . -name halcompile
This will problably be a /bin dir. For info, halcompile is a python program. So you could do a : $ python3 halcompile ...

May have something to do with linuxcnc being installed from apt..
Ah. If you have no dev version. You have to check your c: path for the spread around files. :blink:
That's why i suggested a lcnc install in opt/linuxcnc before. Andy is with me.
Last edit: 5 years 4 months ago by Grotius.

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago - 5 years 4 months ago #211596 by Stormholt
Right, *facepalm* you asked me to ignore that error.
lcec.so and lcec_conf are generated just fine. However i receive the same error as with my own attempt: "lcec: dlopen: /usr/lib/linuxcnc/modules/lcec.so: undefined symbol: lcec_ax5200_init"

I could try commenting all other drivers in the lcec_conf.c an .h as db1981 pointed out
EDIT: tried this with the EL2004(1byte), El3202(8byte) and El1002(1byte), and received 9 bytes. the error persists :-/
Last edit: 5 years 4 months ago by Stormholt.

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #211597 by Stormholt
I was able to get correct amount of byte in the stack 2004, 2014, 1002, by making the el2014 a generic type writing full mapping in the xml file - following this guide
I could control digital out correctly, but some of the diagnostic data from the el2014 did not work such as the "open load" signal

Please Log in or Create an account to join the conversation.

Time to create page: 0.177 seconds
Powered by Kunena Forum