Endless loops. Is it possible? [SOLVED]
- alberto-g
 - Offline
 - New Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 3
 - Thank you received: 0
 
			
	
						31 Oct 2013 15:35		 -  31 Oct 2013 21:07		#40439
		by alberto-g
	
	
		
			
	
	
			 		
													
	
				Endless loops. Is it possible? [SOLVED] was created by alberto-g			
			
				Hello, I would like to repeat a loop for an unlimited number of times.
My first try has been
o101 while [1]
..
o101 endwhile
but LinuxCNC hangs while loading this code.
Next try:
o103 repeat [10000]
..
0103 endrepeat
thinking I could get away with an almost infinite loop. But loading times are very high.
It seems like it is trying to scan the program until its end, which of course is never reached.
I'm new to CNCs in general, so please forgive me if I'm missing something obvious.
This is on a BeagleBone board, bb-lcnc.blogspot.co.at/p/machinekit_16.html.
Thanks
Alberto
					My first try has been
o101 while [1]
..
o101 endwhile
but LinuxCNC hangs while loading this code.
Next try:
o103 repeat [10000]
..
0103 endrepeat
thinking I could get away with an almost infinite loop. But loading times are very high.
It seems like it is trying to scan the program until its end, which of course is never reached.
I'm new to CNCs in general, so please forgive me if I'm missing something obvious.
This is on a BeagleBone board, bb-lcnc.blogspot.co.at/p/machinekit_16.html.
Thanks
Alberto
		Last edit: 31 Oct 2013 21:07  by alberto-g.			
			Please Log in or Create an account to join the conversation.
- Rick G
 - 
				
											 - Offline
 - Junior Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 27
 - Thank you received: 114
 
			
	
						31 Oct 2013 15:54				#40441
		by Rick G
	
	
		
			
				
Perhaps explain what you are try to do so a different approach my be suggested.
Rick G
					
	
	
			 		
													
	
				Replied by Rick G on topic Endless loops. Is it possible?			
			Yes, to prepare the plot, check to see if the gcode program is within the working envelope of the machine, check for errors, etc.It seems like it is trying to scan the program until its end
Perhaps explain what you are try to do so a different approach my be suggested.
Rick G
		The following user(s) said Thank You: alberto-g 	
			Please Log in or Create an account to join the conversation.
- ArcEye
 - Offline
 - Junior Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 22
 - Thank you received: 239
 
			
	
						31 Oct 2013 16:03				#40442
		by ArcEye
	
	
		
			
	
	
			 		
													
	
				Replied by ArcEye on topic Endless loops. Is it possible?			
			
				Hi
Linuxcnc does not hang, it is Axis that never gets to the end of its code preview.
You can use a different front end which just displays actual movements or disable the preview
linuxcnc.org/docs/html/gui/axis.html#_axis_preview_control
regards
					but LinuxCNC hangs while loading this code.
Linuxcnc does not hang, it is Axis that never gets to the end of its code preview.
You can use a different front end which just displays actual movements or disable the preview
linuxcnc.org/docs/html/gui/axis.html#_axis_preview_control
regards
		The following user(s) said Thank You: alberto-g 	
			Please Log in or Create an account to join the conversation.
- alberto-g
 - Offline
 - New Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 3
 - Thank you received: 0
 
			
	
						31 Oct 2013 16:12				#40443
		by alberto-g
	
	
		
			
	
			
			 		
													
	
				Replied by alberto-g on topic Endless loops. Is it possible?			
			
				Thanks, I will try that.
I would like to use LinuxCNC like a sort of a PLC with a motion card.
I just need to wait for an input, execute some motions, then repeat.
Maybe some other project would be better suited for this task, like having a programming language with more features.
					I would like to use LinuxCNC like a sort of a PLC with a motion card.
I just need to wait for an input, execute some motions, then repeat.
Maybe some other project would be better suited for this task, like having a programming language with more features.
Please Log in or Create an account to join the conversation.
- BigJohnT
 - 
				
											 - Offline
 - Administrator
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 3990
 - Thank you received: 994
 
			
	
						31 Oct 2013 17:57				#40446
		by BigJohnT
	
	
		
			
	
	
			 		
													
	
				Replied by BigJohnT on topic Endless loops. Is it possible?			
			
				LinuxCNC has a built in PLC check out the Classicladder section of the Integrators manual.
JT
					JT
		The following user(s) said Thank You: alberto-g 	
			Please Log in or Create an account to join the conversation.
- alberto-g
 - Offline
 - New Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 3
 - Thank you received: 0
 
			
	
						31 Oct 2013 18:25				#40448
		by alberto-g
	
	
		
			
	
			
			 		
													
	
				Replied by alberto-g on topic Endless loops. Is it possible?			
			
				ArcEye was right. (AXIS,stop) did the trick.
Now I'll read about the PLC part. It would be very powerful.
Thank you very much.
(written from the Beaglebone while LinuxCNC is running)
					Now I'll read about the PLC part. It would be very powerful.
Thank you very much.
(written from the Beaglebone while LinuxCNC is running)
Please Log in or Create an account to join the conversation.
		Time to create page: 0.126 seconds