I’ve been trying to get the LB to run/load “MyFile.ai”, however I cant be able to get the syntax right. I managed to make server/client connection, but cant seem to connect to the LB, to try pinging it. Would appreciate anyone, who could maybe send me an example of their code, with which you were able to get the software to load/start the cutting process over UDP.
You shouldn’t have to worry about this. Open you .ai file in Lightburn and when you have it the way you wish, ‘send’. I doubt many of us follow what you are trying to do. The .ai file is an adobe illustrator file and will not run directly on your grbl machine.
What can’t connect?
Why are you trying to connect to lightburn with a python program?
You’re going to have to explain in more detail what you’re doing, I believe.
If I understand correctly, he’s trying to automate opening and starting a job from a script. It’s supported by the software, but requires knowledge of Python programming.
Yes, just like the Oz said.
Basically we are trying to get Siemens PLC to start the engraving process (but currently i’m only working on running the LB from server/client UDP on the same PC). I know how to program in python, but I dont understand how to connect it to LB software, to call the functions. I have the UDP connection, however when i run the python script given in some other topic, nothing happens.
That’s why i’m asking for examples, if anyone already tried it and managed to make it work.
Managed to solve the problem. It was hidden inside the ‘socket.sendto’, where you have to .encode() the message. I was using bytes(message), however it was not the correct syntax (this is why i had the problem with running the code). Basically you just copy/paste this code in python environment and run it. You should get the results as according to one of the posts on this forum. LB.py.txt (813 Bytes) attaching ‘updated’ code, that might save some time for others (god knows i lost 3 days because of one encoding call…)
Thanks for the explanation. I’ve learned so many languages I really didn’t want to learn another one. Looks like I’ll have to look into python, so much runs using it.
You are likely running this on Python3, where strings are now unicode / 16 bit. The original script is Python2, where strings are single byte characters.