User Tools

Site Tools


mycnc:move-a-to-0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
mycnc:move-a-to-0 [2019/11/15 08:41] ivanmycnc:move-a-to-0 [2019/11/15 08:43] ivan
Line 21: Line 21:
   * Add similar branch for negative A-coordinate value.   * Add similar branch for negative A-coordinate value.
  
-<code php M335>(Move to position A=0) +<code php M309> 
-#10=#5044 (Get position A)+G90G0Z[#7020] 
 +#10=#5044 (Store coordinate in register #10)
  
-if [ #10 LT 300 (Test If A-position is negative) +N10 
-(if positive) +IF [#10 LT 180 20 
-N100 +#10=#10-360 
-if [ #10 LT 180 ] 200 (Test if A-position higher than 180 degrees)+JUMP 10
  
-#10 = #10 - 360 (Subtract a whole turn - 360 degree) +N20 
-JUMP 100 (Jump to begin of the Loop)+IF [#10 GT -180]  50 
 +#10=#10+360 
 +JUMP 20
  
-N200 +N50 
-JUMP 400+G91 G0 A [-1*#10] 
 +G90 G10 L70 P0 A0 
 +G90 G10 L70 P#5220 A0</code>
  
-N300 +[[mycnc-screen:1280_series_screen_configuration_examples#add_move_a_to_0_button_to_run_macro_with_confirmation|Add a "Move A to 0button example]]
-if [ #10 GT -180 ] 400 (Test if A-position lower than -180 degrees) +
-#10 = #10 + 360 (Add a whole turn - 360 degree) +
-JUMP 300 (Jump to begin of the Loop) +
- +
-N400 +
-G90 G10 L70 P#5220 A#10 (store #10 value as A-axis program position) +
-G90 G0 A0 (rotate A axis to 0) +
- +
-</code>[[mycnc-screen:1280_series_screen_configuration_examples#add_move_a_to_0_button_to_run_macro_with_confirmation|Add a Move A to 0 button]]+
  
mycnc/move-a-to-0.txt · Last modified: 2019/11/18 11:37 by ivan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki