Python functions may have `return` for regular functions or `yield` for 
generator functions, but not both.

    John

________________________________________
From: machinekit@googlegroups.com <machinekit@googlegroups.com> on behalf of 
Bob Bevins <bob.bev...@cnctechproductions.com>
Sent: Wednesday, March 20, 2019 8:59 PM
To: Machinekit
Subject: [Machinekit] Remap M6 in python

Hi guys,

If I am out of line here with linuxcnc please let me know. I dont want to step 
on anyone's toes but I need to ask.

I have a machine with three spindles, only using one, and 33 drop drills on one 
motor and 9 horizontal drills. It is a big commercial Biesse 346 router.

I remapped M6 with pure python, and everything seems to work. A few issues that 
I had to work around:

The change epilog I cannot get to run unless it is in the remap body itself. So 
I just use  REMAP=M6 modalgroup=6 python=M^_Remap_BiesseRover346  in the ini.
I run the change_epilog1 as a funtion inside the remap. This works everytime 
without any issues as far as I can see.
The only way I can get epilog commands working re: emccanon_CHANGE_TOOL, 
set_tool_parameters() and toolchange_flag is to put them inside the remap body. 
If I try
to put them in a function in the remap file they wont run.

Everything is working now as I seem to have pacified the interpreter but, I 
cannot run any yield's. IT spits something about not being a generator.
I am a bit worried because I am not letting the ionterpreter catch up on a 
queuebuster.

Here is my code. https://github.com/bobbevins/Linuxcnc_python_remap_M6

What are your thoughts?

Thanks,

Bob


--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
---
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
machinekit+unsubscr...@googlegroups.com<mailto:machinekit+unsubscr...@googlegroups.com>.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to