mycnc:rotary_encoder_connection_and_setup
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:rotary_encoder_connection_and_setup [2018/09/07 21:59] – skirillov | mycnc:rotary_encoder_connection_and_setup [2019/11/07 08:40] – ivan | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Rotary encoder connection and setup ===== | + | ====== Rotary encoder connection and setup ====== |
- | There are 2 types of rotary encoders widely used in Pendants | + | There are 2 types of rotary encoders widely used in pendants |
- | * Simple rotary encoder based on 2 switches. This type of encoders usually | + | * Simple rotary encoder based on 2 switches. This type of encoders usually |
{{hardware: | {{hardware: | ||
- | * Industrial style MPG with 100ppr and line driver 5V output{{hardware: | ||
- | Both types can be connected to myCNC controller and used in operator control panel. | + | * Industrial style MPG with 100ppr and line driver 5V output |
+ | |||
+ | Both types can be connected to myCNC controller and used the operator control panel. | ||
==== EN11 rotary encoder connection ==== | ==== EN11 rotary encoder connection ==== | ||
- | Encoders can be connected to galvanic isolated binary inputs. 2 Inputs are used to connect each encoder. | + | Encoders can be connected to the galvanic isolated binary inputs. 2 Inputs are used to connect each encoder. |
{{hardware: | {{hardware: | ||
- | + | Encoder should be set up in the **Config | |
- | Encoder should be setup in **Cfg-> | + | |
myCNC controllers support up to 4 software encoders defined through binary inputs. | myCNC controllers support up to 4 software encoders defined through binary inputs. | ||
Line 23: | Line 23: | ||
=== ET7 controller slow encoders setup === | === ET7 controller slow encoders setup === | ||
- | However | + | The myCNC-ET7 control board has 2 encoders (Encoder #0, #1) reserved |
- | + | ||
- | ET7 connector | + | |
^^ X4 connector to External 25-keys keyboard ^ | ^^ X4 connector to External 25-keys keyboard ^ | ||
Line 37: | Line 35: | ||
{{hardware: | {{hardware: | ||
- | These pins are actually Binary inputs #16, #17, #18, #19 which are permanently configured as Encoder#0 and Encoder#1 in myCNC-ET7 controller firmware. This is the reason Slow Encoders #0, #1 configuration for ET7 controller in myCNC software is ignored and can be skipped. | + | These pins are actually Binary inputs #16, #17, #18, #19 which are permanently configured as Encoder#0 and Encoder#1 in myCNC-ET7 controller firmware. This is the reason Slow Encoders #0, #1 configuration for ET7 controller in myCNC software is ignored and can be skipped. |
- | However, Encoder #2, Encoder#3 can be attached to any or binary inputs and configured accordingly. | + | |
- | + | ||
- | For all other control boards ET6, ET10, ET15 all slow encoders configuration #0 - #3 is active and can be used by users. | + | |
+ | For all other control boards (ET6, ET10 and ET15), the slow encoders configurations #0-3 are active and can be used by users. | ||
Rotary encoders setup example is shown on a picture below | Rotary encoders setup example is shown on a picture below | ||
- | {{hardware:et7:mycnc-configuration--74.png}} | + | {{:mycnc:items-004-mpg.png}} |
- | + | There are 2 encoders attached on Inputs #0,1,2,3 and set up in the dialog. | |
- | + | * Encoder #2 is attached to inputs #0 and #1 and used as a Pendant MPG/ | |
- | There are 2 encoders attached on Inputs #8,9,10,11 and set up in the dialog. | + | * Encoder #3 is attached to inputs #2 and #3 and used as a general purpose encoder. |
- | * Encoder #2 is attached to inputs #8 and #9 and used as a Pendant MPG/ | + | |
- | * Encoder #3 is attached to inputs #10 and #11 and used as a general purpose encoder. | + | |
- | + | ||
- | For ET7 controller Encoders #0, #1 connected to X4 connector pins 11-14 (or through ET7-KEY keyboard) are configured despite on disabled settings. | + | |
- | + | ||
- | + | ||
+ | For ET7 controller, Encoders #0 and #1 are connected to the X4 connector pins 11-14 (or through the ET7-KEY keyboard) and are configured despite being disabled in the myCNC settings window. | ||
==== Encoder connection setup through configuration dialog. ==== | ==== Encoder connection setup through configuration dialog. ==== | ||
+ | {{: | ||
A general purpose encoder can be connected to one of the system variables for convenient control. | A general purpose encoder can be connected to one of the system variables for convenient control. | ||
- | There is configuration dialog to set up connection between slow encoder values and CNC parameters. | + | There is a configuration dialog |
- | * Source - a source of connection - can be Encoder, ADC, input/ | + | * Source - a source of connection - can be an Encoder, ADC, input/ |
* Source/ | * Source/ | ||
* Destination - destination connection | * Destination - destination connection | ||
* Destination/ | * Destination/ | ||
* K - destination ratio. For example, Spindle speed will be increased 100RPM every encoder clicks if " | * K - destination ratio. For example, Spindle speed will be increased 100RPM every encoder clicks if " | ||
+ | * K0 - destination shift ratio. Usually left to be at 0 (field left to be blank). | ||
- | + | On-panel rotary encoders | |
- | {{hardware: | + | |
- | + | ||
- | On-panel rotary encoders mostly used to control on-the-fly | + | |
* Overspeed [%] | * Overspeed [%] | ||
Line 80: | Line 68: | ||
* Spindle speed | * Spindle speed | ||
- | A rotary encoder should be connected to XML configuration Item " | + | A rotary encoder should be connected to the XML configuration Item " |
Global variable register 7011 is used to change on-the-fly Cutting height (THC Arc reference voltage) | Global variable register 7011 is used to change on-the-fly Cutting height (THC Arc reference voltage) | ||
- | To change Spindle speed XML Item " | + | To change Spindle speed, the XML Item " |
- | {{hardware:et7:mycnc-profiles--43.png}} | + | {{:mycnc:calibrate-axes-003.png}} |
- | + | ||
- | + | ||
- | ^ Name ^ Destination type ^ Parameter ^ | + | |
- | | Overspeed [%] | Item | motion-overspeed | | + | |
- | | THC Arc voltage reference | Item | cnc-gvariable-7011 | | + | |
- | | Spindle Speed | Item | spindle-default-speed | | + | |
+ | A further selection of commonly used Items can be found in the [[mycnc: | ||
==== Obsolete method to establish connection through " | ==== Obsolete method to establish connection through " | ||
- | < | + | < |
+ | Only used on the old deprecated software versions</ | ||
- | The connection assignment can be written directly in cnc-variables.xml configuration file . For example | + | The connection assignment can be written directly in the cnc-variables.xml configuration file. For example: |
<code xml> | <code xml> | ||
Line 122: | Line 106: | ||
* **dest=" | * **dest=" | ||
- | Encoder #2 connected to THC Arc voltage adjustment. Adjustment Arc value will be changed " | + | Encoder #2 is connected to the THC Arc voltage adjustment. Adjustment Arc value will be changed |
==== Encoder connection troubleshooting ==== | ==== Encoder connection troubleshooting ==== | ||
- | - Goto Diagnose widget | + | - Go to the Diagnostics page in myCNC software |
- | - Check "Slow Encoder" | + | - Check that the "Slow Encoder" |
- | - Check Destination item value is changed while you turn the encoder. | + | - Check that the Destination item value has changed while you turn the encoder. |
+ | - After the checkup has been complete, reload the program to refresh the settings to the newest configuration. | ||
{{hardware: | {{hardware: | ||
+ | {{youtube> | ||
+ | \\ | ||
+ | =====Closed-loop setup===== | ||
+ | The following window is available upon navigating to Settings > Config > Hardware > Encoders: | ||
- | {{youtube> | + | {{: |
+ | |||
+ | The following settings are available: | ||
+ | * Encoder resolution for each particular encoder number. | ||
+ | * The current encoder value is displayed on this screen. This is the fastest way to check if the encoder is connected/ | ||
+ | * Z-position | ||
+ | * Mul coefficients (multiplication value), and | ||
+ | * /(2^Div). These Mul and Div coefficients are used due to the fact that the controller cannot handle floating number data in calculations, | ||
+ | * Encoder position | ||
+ | * Position | ||
+ | * Linear encoder dimension. This should be set to the proper encoder dimension to convert the impulses from a linear encoder to mm (the most common values for this setting are 1 and 5 micrometers, | ||
+ | |||
+ | The following global variables deal with encoder values: | ||
+ | |||
+ | | 9000 | (+16) Registers represent Encoder values. Writing to this registers does not affect anything. Selected channel Current Encoder value will be returned when reading these registers. \\ Reading these registers from the controller Hardware PLC will return actual Encoder value. \\ Encoder values in the software are updated about every 128ms. This delay should be counted when using Encoder values from the Software PLC. \\ 9000 - Encoder #0 value \\ 9001 - Encoder #1 value \\ 9002 - Encoder #2 value \\ 9003 - Encoder #3 value \\ 9004 - Encoder #4 value \\ 9005 - Encoder #5 value \\ 9006 - Encoder #6 value \\ 9007 - Encoder #7 value | | ||
+ | | 9200 | +16. Reserved to display the encoder position on an infinite scale (no value turnover on every full encoder turn, instead the value will keep climbing indefinitely into the positives/ | ||
+ | | 9216 | +16. Reserved to display the encoder position on an infinite scale WITH the current encoder dimension (to indicate the current encoder position) | | ||
+ | |||
+ | These global variables allow to display encoder values on the main screen of myCNC profiles that are geared towards encoder setups (such as 1366M4E and 1366PE): | ||
+ | {{: | ||
mycnc/rotary_encoder_connection_and_setup.txt · Last modified: 2022/03/22 13:49 by ivan