Linuxcnc python module questions
I am using Linuxcnc for controlling a machine that does some measurement. Everything is setup and configured and all works well with Axis when running manual commands or G-code.
But now I want to automate fully and in python some of the movements that need to be done.
something a bit similar than what this guy is doing here :
But then I am wondering about a few things :
- Ideally I do not want to have Axis running, just a python program, is it possible ?
- In the video above, Kent does all his stuff AFTER the machine is homed, can I launch a homing sequence from the python module alone?
If there is a simple example that shows some basic controlling of steppers via the python module that would be great. I found quite some stuff but it always is linked to building a GUI, which I don't need in this case.
Thanks for the help !
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
- Posts: 5008
- Thank you received: 1441
Have you read this part of the manual?
linuxcnc.org/docs/2.6/html/common/python-interface.html
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
- Posts: 5008
- Thank you received: 1441
linuxcnc.org/docs/2.7/html/hal/hal-examp...tml#_stand_alone_hal
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
- Posts: 5008
- Thank you received: 1441
linuxcnc.org/docs/2.6/html/common/python...c_command_tt_methods
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
- Posts: 5008
- Thank you received: 1441
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
How can I do this without axis ?
Thanks
Please Log in or Create an account to join the conversation.
The python bindings are just python friendly access to existing C and C++ calls.
And without AXIS I can not launch the home sequence, the enabled state is false and I don't know what command should be issued to enable the system without axis.
Axis contains all the calls you need, you just need to remove the GUI clutter.
By studying what Axis does, it will become apparent what calls are made in python to change machine state etc.
Some of the same calls are also available from halui, but you should make them directly preferably.
Please Log in or Create an account to join the conversation.