M6 remap in pure python lessons learned
- cmorley
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 7230
- Thank you received: 2106
			
	
						18 Nov 2021 01:34				#226818
		by cmorley
	
	
		
			
				
In a pure Python remap you do as you did - code it all in one file.
 			
					
	
			
			 		
													
	
				Replied by cmorley on topic M6 remap in pure python lessons learned			
			I can't find it in the docs at the moment but I am sure that prolog and epilog are for NGC based remaps only.Another big one that's not documented is that in a pure python remap it cannot run three python scripts in a row. It just wont do it no matter how hard you try.
So, prolog => toolchange => epilog WILL NOT WORK PERIOD...... you put the prolog and epilog in your remap file like in my code and it processes the commands no problem. The way I got it to work is the prolog function is called within the remap and after the toolchange the epilog is built into the end of the remap. This is the only way I could get it to work properly.
In a pure Python remap you do as you did - code it all in one file.
Please Log in or Create an account to join the conversation.
- bevins
- 
				 Topic Author Topic Author
- Offline
- Platinum Member
- 
				  
		Less
		More
		
			
	
		- Posts: 1940
- Thank you received: 338
			
	
						18 Nov 2021 10:54				#226852
		by bevins
	
	
		
			
	
			
			 		
													
	
				Replied by bevins on topic M6 remap in pure python lessons learned			
			
				In the 
	Remap Extending Gcode
 it references stndglue a few times. Once in Section 9 and once in section 9.3. It is very misleading as this is the python sections and you cant use std glue the normal way it was explained in earlier section of the docs. This should be stated in the docs. Otherwise it's a bit misleading and guys are getting stuck there. I've seen it time and time again.			
					Please Log in or Create an account to join the conversation.
- cmorley
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 7230
- Thank you received: 2106
			
	
						18 Nov 2021 13:11				#226860
		by cmorley
	
	
		
			
	
			
			 		
													
	
				Replied by cmorley on topic M6 remap in pure python lessons learned			
			
				Sorry - I don't follow how what I said has anything to do with standardglue?			
					Please Log in or Create an account to join the conversation.
- bevins
- 
				 Topic Author Topic Author
- Offline
- Platinum Member
- 
				  
		Less
		More
		
			
	
		- Posts: 1940
- Thank you received: 338
			
	
						18 Nov 2021 14:39				#226871
		by bevins
	
	
		
			
				
Sorry I misinterpreted your response.
					
	
			
			 		
													
	
				Replied by bevins on topic M6 remap in pure python lessons learned			
			Sorry, I assumed we were discussing remapping M6 and the change_prolog and change_epilog is used most of the time in this situation which is in standardglue.Sorry - I don't follow how what I said has anything to do with standardglue?
Sorry I misinterpreted your response.
Please Log in or Create an account to join the conversation.
- cmorley
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 7230
- Thank you received: 2106
			
	
						19 Nov 2021 08:31				#226961
		by cmorley
	
	
		
			
	
			
			 		
													
	
				Replied by cmorley on topic M6 remap in pure python lessons learned			
			
				I am discussing m6 remap.
NGC based remaps include python code with - change_prolog and change_epilog entries.
Python only remapping does not.
You can infer the info from here:
linuxcnc.org/docs/devel/html/remap/remap..._the_remap_statement
and here:
linuxcnc.org/docs/devel/html/remap/remap..._option_combinations
Chris
					NGC based remaps include python code with - change_prolog and change_epilog entries.
Python only remapping does not.
You can infer the info from here:
linuxcnc.org/docs/devel/html/remap/remap..._the_remap_statement
and here:
linuxcnc.org/docs/devel/html/remap/remap..._option_combinations
Chris
Please Log in or Create an account to join the conversation.
- bazhenov4job
- Offline
- New Member
- 
				  
		Less
		More
		
			
	
		- Posts: 10
- Thank you received: 2
			
	
						30 Nov 2021 14:00				#228010
		by bazhenov4job
	
	
		
			
	
			
			 		
													
	
				Replied by bazhenov4job on topic M6 remap in pure python lessons learned			
			
				Hi everyone.
Thanks for your replies.
As Bob said the decision is in source files.
My remap now is almost completely consists of calling emccanon functions with poor g-code usage.
I also found a working way to stop interpreter execution using yield expression in python. We also found a way to continue interpreter execution.
The only problem now we have is to move to ender gauge continiously until it becomes corresponding state, like a g38 but in emccanon.
Show you code later.
					Thanks for your replies.
As Bob said the decision is in source files.
My remap now is almost completely consists of calling emccanon functions with poor g-code usage.
I also found a working way to stop interpreter execution using yield expression in python. We also found a way to continue interpreter execution.
The only problem now we have is to move to ender gauge continiously until it becomes corresponding state, like a g38 but in emccanon.
Show you code later.
Please Log in or Create an account to join the conversation.
- bazhenov4job
- Offline
- New Member
- 
				  
		Less
		More
		
			
	
		- Posts: 10
- Thank you received: 2
			
	
						01 Dec 2021 06:14				#228095
		by bazhenov4job
	
	
		
			
	
			
			 		
													
	
				Replied by bazhenov4job on topic M6 remap in pure python lessons learned			
			
				BTW 
all operations described in prolog and epiloge sections are homed in pure python routine. Hence former two are unnecessary
					all operations described in prolog and epiloge sections are homed in pure python routine. Hence former two are unnecessary
Please Log in or Create an account to join the conversation.
- bazhenov4job
- Offline
- New Member
- 
				  
		Less
		More
		
			
	
		- Posts: 10
- Thank you received: 2
			
	
						17 Dec 2021 12:22				#229286
		by bazhenov4job
	
	
		
			
	
			
			 		
													
	
				Replied by bazhenov4job on topic M6 remap in pure python lessons learned			
			
				described all investigation result in 
	separate topic
			
					Please Log in or Create an account to join the conversation.
		Time to create page: 0.079 seconds	
