mycnc:linear_encoder_setup
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
mycnc:linear_encoder_setup [2019/12/05 12:53] – ivan | mycnc:linear_encoder_setup [2021/03/11 15:06] (current) – ivan | ||
---|---|---|---|
Line 3: | Line 3: | ||
//Read more about the topic in the [[mycnc: | //Read more about the topic in the [[mycnc: | ||
- | Linear encoders are typically used on higher-end machines to allow for a more precise monitoring of the difference between the real and the expected machine position. This article focuses on the linear encoder setup and on the methods to make the information obtained from the encoders useful within the myCNC software. | + | Linear encoders are typically used on higher-end machines to allow for a more precise monitoring of the difference between the real and the expected machine position |
The following window is available upon navigating to Settings > Config > Hardware > Encoders: | The following window is available upon navigating to Settings > Config > Hardware > Encoders: | ||
Line 28: | Line 28: | ||
{{: | {{: | ||
+ | |||
+ | ====Step-by-step setup example==== | ||
+ | |||
+ | THIS SECTION OF THE MANUAL IS A WORK-IN-PROGRESS. Please contact the myCNC Support Team should any questions arise. | ||
+ | |||
+ | Going through the setup process for linear encoder feedback one step at a time: | ||
+ | |||
+ | 1. | ||
+ | In this step, we want to make sure that the PID number, motor output and encoder channel number are equal (the current implementation requires that they should always be "lined up" in such a manner) | ||
+ | |||
+ | For example: | ||
+ | ^ PID ^ Motor ^ Encoder # ^ | ||
+ | | PID0 | Motor0 | Encoder0 | | ||
+ | | PID1 | Motor1 | Encoder1 | | ||
+ | | PID2 | Motor2 | Encoder2 | | ||
+ | |||
+ | It is possible to customize these arbitrarily, | ||
+ | |||
+ | {{: | ||
+ | |||
+ | 2. | ||
+ | Registers for displaying the magnitude of the PID error are registers 9016, 9017, 9018, 9019, etc for PIDs 0, 1, 2, 3, etc respectively, | ||
+ | |||
+ | 3. | ||
+ | X1366M4E profile should be used when working with linear encoders and PIDs. | ||
+ | |||
+ | For PID tuning, it is recommended to output these registers to display the error value on the error indicator | ||
+ | and on the corresponding " | ||
+ | |||
+ | The following XML files are modified from the original implementation. | ||
+ | |||
+ | 4. Error magnitude display is done via the following block of code in the '' | ||
+ | |||
+ | <code XML>< | ||
+ | <gitem where=" | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | <gitem where=" | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | <gitem where=" | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | <gitem where=" | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | In the current version, registers 9232, 9233, etc are used instead (you may need to edit your XML file if using an older version). | ||
+ | |||
+ | 5. Display of the error graphs is done via editing the '' | ||
+ | |||
+ | <code XML>< | ||
+ | | ||
+ | | ||
+ | |||
+ | {{: | ||
+ | |||
+ | 6. | ||
+ | In order for registers 9016, etc to show an error, the PID must be enabled. | ||
+ | |||
+ | This requires 2 steps - | ||
+ | 1) Check the '' | ||
+ | 2) Start the Servo-ON procedure by writing " | ||
+ | |||
+ | < | ||
+ | |||
+ | For automatic servo on procedure, this line can be added to _HANDLER_INIT. For manual start, there is a Servo-ON button, which, in turn, starts the _HANDLER_SERVO_ON procedure. In it, in turn, is the necessary command to write to the in the register (after any other required actions, for example, after sending the Servo-ON signals to drives, etc.) | ||
+ | |||
+ | {{: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | By means of a multiplier and a divider, the " | ||
+ | |||
+ | If the PIDs are turned off and not used, but you simply need to have a position indication, then a different set of registers is used for display, and the multiplier and divider fields are not used. If that is the case, then the real resolution of the linear encoder is indicated in the " | ||
+ | |||
+ | At this point, it is necessary to input the correct coefficient " |
mycnc/linear_encoder_setup.txt · Last modified: 2021/03/11 15:06 by ivan