mycnc:gantry_alignment_macro_wizard
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
mycnc:gantry_alignment_macro_wizard [2019/10/24 14:49] – ivan | mycnc:gantry_alignment_macro_wizard [2020/01/23 14:52] – ivan | ||
---|---|---|---|
Line 1: | Line 1: | ||
===== Gantry Alignment ===== | ===== Gantry Alignment ===== | ||
- | Gantry Alignment macro wizard helps to generate | + | Gantry Alignment macro wizard helps the user to generate |
==== Method 1 ==== | ==== Method 1 ==== | ||
- | 2 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 | + | - The machine moves out from the sensors |
+ | {{mycnc: | ||
- | To generate this kind of alignment, the alignment macro will be generated by the Macro Wizard. | + | To generate this kind of alignment, the alignment macro will be generated by the Macro Wizard. |
- | {{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: | ||
- | - **Axis, Direction** - Macro is generated for Y axis | + | - **Axis, Direction** - In this example, the macro will be generated for the y-axis |
- While alignment machine moves toward Y-MIN | - While alignment machine moves toward Y-MIN | ||
- **Sensor numbers** - sensor #0, #1 are used as sensors on each side of gantry, both senors are " | - **Sensor numbers** - sensor #0, #1 are used as sensors on each side of gantry, both senors are " | ||
- **Use Encoder Z signals for align** - not used | - **Use Encoder Z signals for align** - not used | ||
- **Ignore Limits while align** - If sensors #0 or #1 is used as limit sensor, then Limits should be ignored (set the check mark to ON) during the alignment procedure to prevent the machine from aborting the procedure once the limit sensors are triggered. | - **Ignore Limits while align** - If sensors #0 or #1 is used as limit sensor, then Limits should be ignored (set the check mark to ON) during the alignment procedure to prevent the machine from aborting the procedure once the limit sensors are triggered. | ||
- | - **Align while move** - Forward | + | - **Align while move** - set to Forward |
+ | - The Forward configuration works as follows: One side reaches the sensor, and the motor for that side stops, while the other side's motor continues forward until the opposite sensor is reached, then stops as well. This method is not ideal as the first initial stop is done at a high speed as the machine suddenly comes into contact with the sensor. The other method is to go Backwards, by triggering one sensor, passing that sensor on one side, then reaching the sensor on the other, and afterwards aligning the system by using the first initial sensor. This method is preferable as the alignment process is done at a lower speed, however it is not feasible if the sensors are set up right near the edge of the table, preventing the machine from moving past them (in that case, the Forward setting should be used). | ||
- **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 44: | Line 47: | ||
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 51: | Line 54: | ||
- 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 189: | Line 195: | ||
</ | </ | ||
- | You can also put numbers directly into portget/ | + | You can also put numbers directly into portget/ |
<code C > | <code C > | ||
... | ... | ||
Line 263: | Line 269: | ||
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 285: | Line 291: | ||
==== 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