quickstart:mycnc-quick-start:homing_setup
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
quickstart:mycnc-quick-start:homing_setup [2019/06/07 14:01] – ivan | quickstart:mycnc-quick-start:homing_setup [2022/10/21 13:54] (current) – ivan | ||
---|---|---|---|
Line 2: | Line 2: | ||
This article is designed to introduce the reader to the basics of the homing procedure using myCNC software. The homing procedure is done using sensors (optical, mechanical, etc) that are set up on the edges of the machine' | This article is designed to introduce the reader to the basics of the homing procedure using myCNC software. The homing procedure is done using sensors (optical, mechanical, etc) that are set up on the edges of the machine' | ||
+ | |||
+ | A quick video recap of the full manual is presented in this video: | ||
+ | |||
+ | {{youtube> | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | A lot of times, the homing procedure is initiated automatically upon program start, etc. To initiate the process manually, a Homing XYZ button is available in the Mill tab of the myCNC software (in X1366M, X1366M4, X1366M4E and X1366V profiles - available in the Plasma/Gas tabs in X1366P and X1366G profiles respectively): | ||
+ | |||
+ | {{: | ||
In order to set up the homing procedure, do the following: | In order to set up the homing procedure, do the following: | ||
- | 1. Go to **CNC Settings > Config > Macro List > M138**, and comment | + | 1. Go to **CNC Settings > Config > Macro List > M138**, and set up the homing procedure for the necessary axes by commenting |
{{: | {{: | ||
The code for a three-axes machine will therefore look like this: | The code for a three-axes machine will therefore look like this: | ||
< | < | ||
- | ;G10L80 P7391 Q0 | + | ;G10L80 P7391 Q0 |
;G10L80 P7392 Q0 | ;G10L80 P7392 Q0 | ||
;G10L80 P7393 Q0 | ;G10L80 P7393 Q0 | ||
Line 21: | Line 32: | ||
Note that the Z axis comes first, as the machine usually needs to lift the tool up before moving it in the xy-plane as to not crash into any obstacles. | Note that the Z axis comes first, as the machine usually needs to lift the tool up before moving it in the xy-plane as to not crash into any obstacles. | ||
- | 2. Open **CNC Settings > Config > Macro Wizard** and select the particular axis for which you would like to run the homing procedure for (Homing X in case of this example). The screen presented to you will look as follows: | + | A quick explanation of what each line of the above code represents: |
+ | * The first four lines (//G10L80 P7391 Q0//, etc) will simply set a zero for a variable that indicates the need for homing (variables #7391, etc). This will allow the user to simply forego the homing procedure by effectively indicating that the homing flag for each axis has been set to zero (so that no homing is needed). | ||
+ | * If the actual homing is required, the user needs to comment out the commands to set the flags to zero, and to run actual homing procedures (M133, M134, etc). Therefore, one or the other has to be commented out. | ||
+ | * The '';'' | ||
+ | |||
+ | 2. Open **CNC Settings > Config > Macro Wizard** and select the particular axis you would like to run the homing procedure for (Homing X in case of this example). The screen presented to you will look as follows: | ||
{{: | {{: | ||
Line 27: | Line 43: | ||
{{: | {{: | ||
- | 4. Select your sensor number (depending on how you have connected | + | 4. Select your sensor number (depending on the input number to which you have connected |
{{: | {{: | ||
Line 37: | Line 53: | ||
As can be seen from the System Diagnostics window, Sensor 5 is normally open as the indicator light is not on. However, that behaviour can be inverted in **CNC Settings > Config > Hardware > Common Hardware Settings**, so it is always recommended to check the System Diagnostics window to find out what the normal behaviour of the sensor has been set up as. | As can be seen from the System Diagnostics window, Sensor 5 is normally open as the indicator light is not on. However, that behaviour can be inverted in **CNC Settings > Config > Hardware > Common Hardware Settings**, so it is always recommended to check the System Diagnostics window to find out what the normal behaviour of the sensor has been set up as. | ||
- | 5. Choose your Limits behaviour in the **Ignore Limits** field. Set the checkmark | + | 5. Choose your Limits behaviour in the **Ignore Limits** field. Set the check mark to ON if the sensor you are using for homing is the same as the one you are using for your limits (most common case), and set it to OFF if you are using multiple sensors. |
{{: | {{: | ||
Line 46: | Line 62: | ||
{{: | {{: | ||
- | 7. The Distance to Home Sensor | + | 7. The Distance to Home Sensor |
{{: | {{: | ||
Line 60: | Line 76: | ||
11. Choose whether you want to reset your Work Position or not after the homing is done. | 11. Choose whether you want to reset your Work Position or not after the homing is done. | ||
- | 12. Choose your Macro filename (it is recommended to keep the default macro filenames unless otherwise required). | + | 12. Choose your Macro filename (it is recommended to keep the default macro filenames unless otherwise required). |
+ | * M131 for the Homing X procedure | ||
+ | * M132 for the Homing Y procedure | ||
+ | * M133 for the Homing Z procedure | ||
+ | * M138 for Homing XYZ | ||
13. Add any necessary macros to the Macro Header and Macro Footer if so desired. These will be added in the beginning or in the end of the Homing procedure respectively. THESE FIELDS ARE USUALLY LEFT BLANK. | 13. Add any necessary macros to the Macro Header and Macro Footer if so desired. These will be added in the beginning or in the end of the Homing procedure respectively. THESE FIELDS ARE USUALLY LEFT BLANK. | ||
Line 78: | Line 98: | ||
{{: | {{: | ||
- | ====Using | + | ====Using Incremental Encoders==== |
These settings allow for a higher accuracy during the homing procedure, however they require using an incremental encoder which might not always be feasible. These settings are located on the same screen, as shown below: | These settings allow for a higher accuracy during the homing procedure, however they require using an incremental encoder which might not always be feasible. These settings are located on the same screen, as shown below: | ||
{{: | {{: | ||
Line 87: | Line 107: | ||
3. Set the **Distance to Encoder Z Sensor** (usually used on Linear Encoders). This is useful when a linear encoder is located some distance away from the sensor, and is set to be slightly smaller (on the scale of nearly a millimeter) than the actual distance to the encoder. This setting is not necessary, however it does allow the user to lower the required time that the machine spends on the Encoder Z Home Detection. | 3. Set the **Distance to Encoder Z Sensor** (usually used on Linear Encoders). This is useful when a linear encoder is located some distance away from the sensor, and is set to be slightly smaller (on the scale of nearly a millimeter) than the actual distance to the encoder. This setting is not necessary, however it does allow the user to lower the required time that the machine spends on the Encoder Z Home Detection. | ||
+ | |||
+ | ====Checking sensor contact at homing start==== | ||
+ | |||
+ | In certain situations, homing may start while the homing sensor is already " | ||
+ | |||
+ | To prevent this, a Hardware PLC can be used. An example of such a PLC is M286, which is generated automatically for tasks such as Surface Measure. For the Surface Measure procedure, the macro code that includes M286 will look the following way: | ||
+ | |||
+ | < | ||
+ | or | ||
+ | < | ||
+ | |||
+ | Note that the '' | ||
+ | |||
+ | The code for M286 Hardware PLC itself is shown below: | ||
+ | |||
+ | <code C>////// FILE GENERATED AUTOMATICALLY. DO NOT EDIT IT. ////// | ||
+ | #define input var00 | ||
+ | #define state var01 | ||
+ | |||
+ | main() | ||
+ | { | ||
+ | |||
+ | input=eparam & 0xFF; | ||
+ | state=(eparam>> | ||
+ | axis= (eparam>> | ||
+ | dir= (eparam>> | ||
+ | |||
+ | axis_mask=0; | ||
+ | if (axis<6) {axis_mask=1<< | ||
+ | else { exit(99); }; | ||
+ | |||
+ | length=100; | ||
+ | if (dir==0) { length=0-length; | ||
+ | |||
+ | gvarset(7080, | ||
+ | |||
+ | do { | ||
+ | a=portget(input); | ||
+ | if (state==0) { if (a==0) | ||
+ | if (state!=0) | ||
+ | |||
+ | g0moveA(0, axis_mask, length); | ||
+ | timer=200; do{timer--; | ||
+ | //wait motion stopped | ||
+ | do { code=gvarget(6060); | ||
+ | }while (1); | ||
+ | |||
+ | exit(99); | ||
+ | };</ | ||
+ | |||
+ | This PLC will check if the input port is " | ||
+ | |||
+ | If the port is in its " | ||
quickstart/mycnc-quick-start/homing_setup.1559930511.txt.gz · Last modified: 2019/06/07 14:01 by ivan