Is it possible to load multiple .py scripts in linuxcnc gui application

More
26 Dec 2017 14:43 #103652 by Grotius
I have a idea.

To structure and simplifie the main python gui program script, i want to export all the button codes to a separate python file for example.
And in the main python gui i want to load for example the file : "screenbuttons.py"

Is this possible?

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

More
11 Jan 2018 11:51 #104277 by andypugh
Yes, I think that is pretty easy, just use python "Import".

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

More
15 Jan 2018 20:36 #104513 by newbynobi
Yepp, no problem, i am actually rebuilding gmoccapy that way to make it easier to support

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

More
15 Jan 2018 21:07 - 15 Jan 2018 21:24 #104518 by Grotius
@Newbynobi,

Thanks, that is good news. I was looking and trying to do that, without succes. But it will work if i have a example how to.
I think difficulty is setting up the directory path that will find the python file.

Maybe you are able to give a example... how to.

Okey my question about this is given because i seen this type of programming before in the Kuka robotics structure.
Years ago i was expert programmer of Kuka robotics. I have all the files of the Kuka projects on my hard drive.
They give a good example how to structure basic things.

Strukture is power, see this video from KUKA robotics. It's a german product i know.



Later this week i will post a palletizing program for a Okuma lathe with double chuck with a kuka load and unload robot on top.
It will be a good example for loading sub's in the main.
Also i will post a program example for handshake welding with i/o with 2 Kuka robot's. They make lifting clamp's with 2 robot's from
pallet.

Last edit: 15 Jan 2018 21:24 by Grotius.

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

More
15 Jan 2018 21:25 #104519 by newbynobi
Very beautifull video, nearly any of my projects end that way:laugh:

To import a modul, just append the path to the file to the python path before trying to import the module

In gmoccapy i use a different way, as my libraries are copied to a default path at compile time codded in the submake file.

hazzy is a gui do add its libraries to the python path

Norbert
The following user(s) said Thank You: Grotius

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

More
15 Jan 2018 21:38 - 15 Jan 2018 21:45 #104521 by Grotius
@newbynobi,

Very beautifull video, nearly any of my projects end that way:laugh:

It's time to give linux a boost. You know how perfection looks like.

Where can i fly or drive to? to speak the best linuxcnc programmer in the world?

Here is a company that will invest in Linux. My company will be independent of windows.
The future is already build in this post. Do you want to use window's 10 on your own cnc machine?
I guess you only want unusable app screen's on your mobile.
Last edit: 15 Jan 2018 21:45 by Grotius.

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

More
16 Jan 2018 19:37 #104560 by newbynobi
I am in Germany, so if you want to visit the best programmer in the world, you will have to go to another place ;-)

Thanks for the compliment,

Norbert

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

More
17 Jan 2018 01:12 #104589 by Grotius
@Hi Norbert,

I live in Holland, my place is near by the place Utrecht. So Germany is good to drive for me by car.
Then the V12 is running quite fast on the German highway.
Wich day do you have time for a visit from me? It will take several hours to talk everything trough i think.

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

More
17 Jan 2018 15:19 - 17 Jan 2018 15:22 #104622 by Grotius

File Attachment:

File Name: archive_KR...2007.zip
File Size:601 KB
@Norbert,

Here are 2 robot backup files for you to investegate. The sub's are very important to load in the main file to keep the structure.
The robot's are working together. The big robot is also picking parts from a trumpf laser tube cutter. Signals via profibus.
The big robot must also pick part's from different places. At the end, we have a steel ikea bed frame. Programming test video included.

Attachments:
Last edit: 17 Jan 2018 15:22 by Grotius.

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

More
20 Jan 2018 10:59 #104741 by newbynobi
Hallo Grotius,

What the robots do, can be done also with linuxcnc. But I do not feel like doing it. I have some issues here myself, and my time is limited.

So sorry for not supporting you.

Norbert

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

Time to create page: 0.598 seconds
Powered by Kunena Forum