User Tools

Site Tools


mycnc:rotary_encoder_connection_and_setup

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:rotary_encoder_connection_and_setup [2019/08/01 13:27] ivanmycnc:rotary_encoder_connection_and_setup [2019/11/07 11:41] 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 and operator panels:  There are 2 types of rotary encoders widely used in pendants and operator panels: 
Line 5: Line 5:
  
 {{hardware:et7:encoder-en11.jpg?300}} {{hardware:et7:encoder-en11.jpg?300}}
 +
   * Industrial style MPG with 100ppr and line driver 5V output   * Industrial style MPG with 100ppr and line driver 5V output
  
Line 22: Line 23:
 === ET7 controller slow encoders setup === === ET7 controller slow encoders setup ===
  
-The myCNC-ET7 control board has 2 encoders (Encoder #0, #1) reserved defined permanently. These encoders are supposed to be installed on the ET7-KEY keyboard panel and connected to the 20-pin X4 connector on ET7 control board. It's possible to use external encoders without the ET7-key panel board and to connect those directly to X4 pins 11,12,13,14 and 19. See the table below+The myCNC-ET7 control board has 2 encoders (Encoder #0, #1) reserved defined permanently. These encoders are supposed to be installed on the ET7-KEY keyboard panel and connected to the 20-pin X4 connector on ET7 control board. It's possible to use external encoders without the ET7-key panel board and to connect those directly to X4 pins 11,12,13,14 and 19. See the table below for more information on the ET7 X4 pinout table
- +
-ET7 connector X4 pinout table+
  
 ^^ X4 connector to External 25-keys keyboard ^ ^^ X4 connector to External 25-keys keyboard ^
Line 36: Line 35:
 {{hardware:et7:et7-ext-keyboard.jpg}} {{hardware:et7:et7-ext-keyboard.jpg}}
  
-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.**+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 when using the ET7 board.**
  
-For all other control boards ET6, ET10, ET15 all slow encoders configuration #0 - #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
Line 82: Line 81:
 ==== Obsolete method to establish connection through "cnc-variables.xml" configuration file. ==== ==== Obsolete method to establish connection through "cnc-variables.xml" configuration file. ====
  
-<code>this method was used before the dialog described above was issued.+<code>This method was used before the dialog described above was released.
 Only used on the old deprecated software versions</code> Only used on the old deprecated software versions</code>
  
Line 107: Line 106:
   * **dest="item:cnc-gvariable-7012"** - Global variable for THC Arc Voltage Adjustment value is a destination for the connection   * **dest="item:cnc-gvariable-7012"** - Global variable for THC Arc Voltage Adjustment value is a destination for the connection
  
-Encoder #2 connected to THC Arc voltage adjustment. Adjustment Arc value will be changed "+1" or "-1" every encoder click. +Encoder #2 is connected to the THC Arc voltage adjustment. Adjustment Arc value will be changed to "+1" or "-1" on every encoder click. 
  
  
Line 115: Line 114:
   - Check that the "Slow Encoder" values are changed while you turn the encoder.   - Check that the "Slow Encoder" values are changed while you turn the encoder.
   - Check that the Destination item value has 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:et7:mycnc-encoders-test.png}} {{hardware:et7:mycnc-encoders-test.png}}
Line 120: Line 120:
 {{youtube>V9wLOCGS6YM?800x480}} {{youtube>V9wLOCGS6YM?800x480}}
  
 +\\
 +=====Closed-loop setup=====
 +
 +//Read more about the topic in the [[mycnc:closed_loop_configuration|MyCNC closed loop configuration manual]].//
 +
 +The following window is available upon navigating to Settings > Config > Hardware > Encoders:
 +
 +{{:mycnc:encoders-001-hardware-config.png}}
 +
 +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/working - for example, turning an MPG wheel handle should immediately change the current encoder value in this field for the selected encoder. 
 +  * 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, therefore it is necessary to first multiply and then divide a number by certain coefficients. They are used to bring the value of the encoder in line with the pulses/unit value specified in the Axes/Motors tab. Larger numbers allow to reduce the error. For example, if the ratio between the Axes/Motors value and the encoder pulse/unit value is 3.5, then the multiplication value (Mul) can be set to 7, while Div can be set to 1 (//2^1 =2, 7/2 = 3.5//).  
 +  * 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, as shown in the screenshot).
 +
 +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/negatives depending on where the encoder handle is spun) |
 +| 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:encoders-003-m4e.png}}
  
mycnc/rotary_encoder_connection_and_setup.txt · Last modified: 2022/03/22 13:49 by ivan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki