LinuxCNC python

  • kwanlokto
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 months 2 weeks ago #338912 by kwanlokto
LinuxCNC python was created by kwanlokto
I am looking to leverage linuxcnc.org/docs/html/config/python-interface.html to build an API which will be able to perform basic machine functions like homing the axis, measuring tool length and running gcode. Out of curiousity do you guys know of any github repos or any open source projects I can reference to start this project?

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

More
11 months 2 weeks ago #338913 by cmorley

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

More
10 months 3 weeks ago #339907 by JT
Replied by JT on topic LinuxCNC python
Flex GUI is built using the python interface

gnipsel.com/linuxcnc/flexgui/index.html

JT

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

More
7 months 3 days ago #345017 by Donb9261
Replied by Donb9261 on topic LinuxCNC python
Consider the following gcode lines:

197: G2 X[118.69393*#<scale>] Y[5.37699*#<scale>] I[5.36449*#<scale>] J[4.87005*#<scale>]
198: G2 X[118.27432*#<scale>] Y[8.23889*#<scale>] I[12.16539*#<scale>] J[3.2454*#<scale>]
199: G0 Z3.0
200: G55
201: M5
202: M30

LCNC reads/runs all the way down and stops at G0 Z3.0. And the program never resets. I stat.red_line, stat.motion_line, current_line, and see that motion_line is actually the line it is stuck on. In this case, it would be line 199. After 202: there is an EOF carraige return. I tried this using Axis, and all the others. I get the same result these do. 

M30 should read and rewind to first line in the program which is RS-274 GCODE. But, no matter what I try, nope.

Any ideas?

Thanks,

Don

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

More
7 months 3 days ago - 7 months 3 days ago #345018 by Donb9261
Replied by Donb9261 on topic LinuxCNC python
 
Last edit: 7 months 3 days ago by Donb9261.

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

More
7 months 1 day ago #345080 by tommylight
Replied by tommylight on topic LinuxCNC python
@Don,
Do those replies belong on this topic, or am i missing something?

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

More
7 months 6 hours ago #345158 by Donb9261
Replied by Donb9261 on topic LinuxCNC python
Tommy,

The replies demo what is actually happening in hopes I may get some guidance to fix it. My question is above them.

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

More
7 months 5 hours ago #345161 by Donb9261
Replied by Donb9261 on topic LinuxCNC python
I made this work around that seems to be robust.

if cur_task_mode_mon == 1 and cur_interp_state_mon == 1 and cur_queue_mon == 0:
cmd.abort()

M30 is actually read into the buffer and executed, but the inerp has already reset before updating the line number que. That is a bug in Linuxcnc and breaks the standard function of M30 in RS274.

I may simply modify my lcnc to fix the issue. But for now, the above works and should only activate if the yask_mode is manual, which M30 does actually set on M30 read, the task_state is idle, which it should be, and the queue is empty. Which is the planner que.
The following user(s) said Thank You: tommylight

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

More
7 months 3 hours ago #345163 by tommylight

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

Time to create page: 0.072 seconds
Powered by Kunena Forum