mycnc:gantry_alignment_macro_wizard
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
mycnc:gantry_alignment_macro_wizard [2020/01/17 13:59] – ivan | mycnc:gantry_alignment_macro_wizard [2020/01/23 13:31] – ivan | ||
---|---|---|---|
Line 1: | Line 1: | ||
===== Gantry Alignment ===== | ===== Gantry Alignment ===== | ||
- | Gantry Alignment macro wizard helps the user to generate a program macro for dual motor gantry alignment. There exist several possible methods for gantry alignment. Almost any method can be implemented by the (skilled) user through the macro/PLC layer. In this manual, we will show two common methods which are often used for gantry alignment. | + | Gantry Alignment macro wizard helps the user to generate a program macro for dual motor gantry alignment. There exist several possible methods for gantry alignment. Almost any method can be implemented by the (skilled) user through the macro/PLC layer, and the Macro Wizard is used to facilitate this process by quickly generating the gantry macro after the user inputs their preferred settings into the wizard. In this manual, we will show two common methods which are often used for gantry alignment. |
==== Method 1 ==== | ==== Method 1 ==== | ||
Line 7: | Line 7: | ||
Two sensors on each side of the gantry are used to find the side position. The alignment procedure is as follows: | Two sensors on each side of the gantry are used to find the side position. The alignment procedure is as follows: | ||
- CNC activates motors on both sides and moves towards the sensors. \\ {{mycnc: | - CNC activates motors on both sides and moves towards the sensors. \\ {{mycnc: | ||
- | - When one of the sensors is triggered, CNC control disconnects the motor on that side, while the 2nd motor continues to move. \\ {{mycnc: | + | - When one of the sensors is triggered, CNC control disconnects the motor on that side, while the second |
- When both sensors are triggered, the motion stops. \\ {{mycnc: | - When both sensors are triggered, the motion stops. \\ {{mycnc: | ||
- | - It is important to note that the sensors do not have to be perfectly aligned on the same line - they can be placed wherever it is convenient, provided that the offset distance between them is recorded. This distance will be then adjusted | + | - It is important to note that the sensors do not have to be perfectly aligned on the same line - they can be placed wherever it is convenient, provided that the offset distance between them is accounted |
- | {{: | + | {{: |
- Both motors are activated and move together. \\ {{mycnc: | - Both motors are activated and move together. \\ {{mycnc: | ||
- | - The machine moves out from the sensors by a predefined distance. | + | - The machine moves out from the sensors by a predefined distance: |
{{mycnc: | {{mycnc: | ||
To generate this kind of alignment, the alignment macro will be generated by the Macro Wizard. A screenshot of the Macro Wizard screen is shown below: | To generate this kind of alignment, the alignment macro will be generated by the Macro Wizard. A screenshot of the Macro Wizard screen is shown below: | ||
- | {{mycnc:mycnc-wizard-gantry-align-001.png}} | + | {{:mycnc:gantry-alignment-v2-008-macro-forward.png}} |
On this screen, we have: | On this screen, we have: | ||
Line 26: | Line 26: | ||
- **Align while move** - Forward | - **Align while move** - Forward | ||
- **Final tuning (Motor #1 offset)** - set distance to adjust sensors | - **Final tuning (Motor #1 offset)** - set distance to adjust sensors | ||
- | - **Double check** | + | - **Double check** |
- **Move distance** Distance expected from start position to alignment sensors. This distance should be set a more than real distance to alignment sensors. | - **Move distance** Distance expected from start position to alignment sensors. This distance should be set a more than real distance to alignment sensors. | ||
- **Gap** - move out from the sensors for a given distance. | - **Gap** - move out from the sensors for a given distance. | ||
Line 46: | Line 46: | ||
2 sensors on each side of gantry can used to find each respective side position. When both sensors' | 2 sensors on each side of gantry can used to find each respective side position. When both sensors' | ||
- | The alignment procedure is described below- | + | The alignment procedure is described below in further detail: |
- CNC activates motors on both sides and moves toward the sensors. \\ {{mycnc: | - CNC activates motors on both sides and moves toward the sensors. \\ {{mycnc: | ||
Line 53: | Line 53: | ||
- PLC procedure calculates the difference between the recorded positions and adds an adjustment offset (if such an offset exists between the sensors) | - PLC procedure calculates the difference between the recorded positions and adds an adjustment offset (if such an offset exists between the sensors) | ||
- The second motor control is then temporarily disabled, while the other motor moves the machine by the necessary distance to align the gantry \\ {{mycnc: | - The second motor control is then temporarily disabled, while the other motor moves the machine by the necessary distance to align the gantry \\ {{mycnc: | ||
- | - Then, after the alignment has completed the second | + | - Then, after the alignment has completed the second |
- | That's the plan, but how do we implement it? Here is a step-by-step implementation description. | ||
- | | + | ==== Gantry alignment code walkthrough ==== |
+ | |||
+ | For simply gantry alignments, it is largely unnecessary to edit the macro yourself, or to into much further detail beyound what's already shown in the manual above. However, if a complex gantry alignment procedure is necessary, or if you just want to understand what exactly is happening when gantry alignment is performed, here is a step-by-step description of the process: | ||
+ | |||
+ | | ||
<code C M219.plc> | <code C M219.plc> | ||
Line 191: | Line 194: | ||
</ | </ | ||
- | You can also put numbers directly into portget/ | + | You can also put numbers directly into portget/ |
<code C > | <code C > | ||
... | ... | ||
Line 265: | Line 268: | ||
G91 G0 X-1000 F500 (# Move toward Gantry Sensors) | G91 G0 X-1000 F500 (# Move toward Gantry Sensors) | ||
- | ( It takes a time PLC controller | + | ( It takes time for the PLC controller |
( updated register # | ( updated register # | ||
( Add 0.5 seconds pause to get all the registers updated ) | ( Add 0.5 seconds pause to get all the registers updated ) | ||
Line 287: | Line 290: | ||
==== Method 2+ ==== | ==== Method 2+ ==== | ||
- | What should be changed if the Gantry alignment procedure is required for other axis (for example, axis Y instead of X)? | + | What should be changed if the Gantry alignment procedure is required for another |
1) Let's say Motor outputs #0 and #1 are configured as Y. | 1) Let's say Motor outputs #0 and #1 are configured as Y. |
mycnc/gantry_alignment_macro_wizard.txt · Last modified: 2020/01/31 14:24 by ivan