User Tools

Site Tools


mycnc:linear_encoder_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
mycnc:linear_encoder_setup [2020/11/23 12:31] ivanmycnc:linear_encoder_setup [2021/03/11 15:06] (current) ivan
Line 33: Line 33:
 THIS SECTION OF THE MANUAL IS A WORK-IN-PROGRESS. Please contact the myCNC Support Team should any questions arise. 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:+Going through the setup process for linear encoder feedback one step at a time:
  
 1. 1.
-At this point, the PID number, motor output and encoder channel number should be respectively equal. +In this stepwe 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)
-I.e - +
-PID0, Motor0, Encoder0 +
-PID1, Motor1, Encoder1 +
-PID2, Motor2, Encoder2+
  
-It is possible to customize arbitrarily, but so far it is strongly discouraged.+For example:  
 +^ PID ^ Motor ^ Encoder # ^ 
 +| PID0 | Motor0 | Encoder0 | 
 +| PID1 | Motor1 | Encoder1 | 
 +| PID2 | Motor2 | Encoder2 |
  
-[IMAGE 1]+It is possible to customize these arbitrarily, but as of the time of writing this manual (November 2020) it is strongly discouraged. 
 + 
 +{{:mycnc:linear-encoders-001.png}}
  
 2. 2.
-Registers for displaying the magnitude of the PID mismatch error 9016, 9017, 9018, 9019 ... and so on +Registers for displaying the magnitude of the PID error are registers 9016, 9017, 9018, 9019, etc for PIDs 0, 1, 2, 3, etc respectively,
-for PID 0, 1, 2, 3 ... respectively+
  
 3. 3.
-Baseline Profile for Ruler, Feedback and PID - X1366M4E+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 For PID tuning, it is recommended to output these registers to display the error value on the error indicator
-and on the corresponding "oscillograms"+and on the corresponding "oscillograms" that will be visible to the user. 
  
-Now the XML settings in the profile are different, the version will be updated. +The following XML files are modified from the original implementation
-For those who have a profile already in work and a complete update is difficult, you need to make changes manually+
  
-4. +4. Error magnitude display is done via the following block of code in the ''coordinates-4.xml'' file
-Error magnitude displaycoordinates-4.xml file+
  
 <code XML><!--Encoder values --> <code XML><!--Encoder values -->
-<gitem where="x-coordinates" position="74;40" width="120" height="30"  displayAlignment="left;vcenter" +<gitem where="x-coordinates" position="74;40" width="120" height="30"   
- fgColor="##f-machinepos" format="%8.3f" fontFamily="Open Sans" fontSize="16" type="display" deviation="0.0005"+ displayAlignment="left;vcenter" 
 + fgColor="##f-machinepos" format="%8.3f" fontFamily="Open Sans"  
 + fontSize="16" type="display" deviation="0.0005"
  name="display-cnc-gvariable-9016"  name="display-cnc-gvariable-9016"
  tooltip="Encoder error value for axis X"  tooltip="Encoder error value for axis X"
  bgColor="##b-display" displayWidth="120" fontStyle="bold"></gitem>  bgColor="##b-display" displayWidth="120" fontStyle="bold"></gitem>
  
-<gitem where="x-coordinates" position="74;100" width="120" height="30"  displayAlignment="left;vcenter" +<gitem where="x-coordinates" position="74;100" width="120" height="30"   
- fgColor="##f-machinepos" format="%8.3f" fontFamily="Open Sans" fontSize="16" type="display" deviation="0.0005"+ displayAlignment="left;vcenter" 
 + fgColor="##f-machinepos" format="%8.3f" fontFamily="Open Sans"  
 + fontSize="16" type="display" deviation="0.0005"
  name="display-cnc-gvariable-9017"  name="display-cnc-gvariable-9017"
  tooltip="Encoder error value for axis Y"  tooltip="Encoder error value for axis Y"
  bgColor="##b-display" displayWidth="120" fontStyle="bold"></gitem>  bgColor="##b-display" displayWidth="120" fontStyle="bold"></gitem>
  
-<gitem where="x-coordinates" position="74;160" width="120" height="30"  displayAlignment="left;vcenter" +<gitem where="x-coordinates" position="74;160" width="120" height="30"   
- fgColor="##f-machinepos" format="%8.3f" fontFamily="Open Sans" fontSize="16" type="display" deviation="0.0005"+ displayAlignment="left;vcenter" 
 + fgColor="##f-machinepos" format="%8.3f" fontFamily="Open Sans"  
 + fontSize="16" type="display" deviation="0.0005"
  name="display-cnc-gvariable-9018"  name="display-cnc-gvariable-9018"
  tooltip="Encoder error value for axis Z"  tooltip="Encoder error value for axis Z"
  bgColor="##b-display" displayWidth="120" fontStyle="bold"></gitem>  bgColor="##b-display" displayWidth="120" fontStyle="bold"></gitem>
  
-<gitem where="x-coordinates" position="74;200" width="120" height="30"  displayAlignment="left;vcenter" +<gitem where="x-coordinates" position="74;200" width="120" height="30"   
- fgColor="##f-machinepos" format="%8.3f" fontFamily="Open Sans" fontSize="16" type="display" deviation="0.0005"+ displayAlignment="left;vcenter" 
 + fgColor="##f-machinepos" format="%8.3f" fontFamily="Open Sans"  
 + fontSize="16" type="display" deviation="0.0005"
  name="display-cnc-gvariable-9019"  name="display-cnc-gvariable-9019"
  tooltip="Encoder error value for axis A"  tooltip="Encoder error value for axis A"
  bgColor="##b-display" displayWidth="120" fontStyle="bold"></gitem> </code>  bgColor="##b-display" displayWidth="120" fontStyle="bold"></gitem> </code>
  
-In the current version, registers 9232, 9233, ... were used at this location.+In the current version, registers 9232, 9233, etc are used instead (you may need to edit your XML file if using an older version).
  
-five. +5. Display of the error graphs is done via editing the ''x-bottab-left-mill.xml'' file. In general, the ''myscope'' type is responsible for displaying oscillograms. For older profiles, find and correct the displaying 3 graphs with variables 9016, 9017, 9018 (for PID0, PID1, and PID2 errors)
-Display of the following error graphs +
-X-bottab-left-mill.xml file +
-The type myscope is responsible for displaying oscillograms +
-Find and correct for displaying 3 graphs on one oscillogram +
-with variables 9016, 9017, 9018 for errors PID0, PID1, PID2+
  
 <code XML><gitem where="x-graph" position="10;10" width="880" height="380" <code XML><gitem where="x-graph" position="10;10" width="880" height="380"
Line 100: Line 102:
  source="cnc-gvariable-9016;cnc-gvariable-9017;cnc-gvariable-9018" sampling="50" /></code>  source="cnc-gvariable-9016;cnc-gvariable-9017;cnc-gvariable-9018" sampling="50" /></code>
  
-[IMAGE 2 HERE]+{{:mycnc:linear-encoders-002.png}}
  
 6. 6.
-In order for registers 9016, ... to show an error, the PID must be enabled.+In order for registers 9016, etc to show an error, the PID must be enabled.
  
 This requires 2 steps - This requires 2 steps -
-1) Check enable in the PID settings pullse-dir closed-loop+1) Check the ''Enable'' setting in the PID settings pulse-dir closed-loop
 2) Start the Servo-ON procedure by writing "1" to register 60000 2) Start the Servo-ON procedure by writing "1" to register 60000
  
 <code>gvarset (60000,1); // run Servo ON procedure </code> <code>gvarset (60000,1); // run Servo ON procedure </code>
  
-For automatic inclusion, this line can be added to __HANDLER_INIT +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.)
-For manual start, there is a Servo-ON button, which, in turn, starts the __HANDLER_SERVO_ON procedure +
-And in it, in turn, there is necessary entry in the register (after some other actions, for example, to include +
-Servo-ON signals on drives, etc.)+
  
-[IMAGE 3 HERE]+{{:mycnc:linear-encoders-003.png}}
  
-[IMAGE 4 HERE]+{{:mycnc:linear-encoders-004.png}}
  
-By means of a multiplier and a divider, the "software" resolution of the linear encoder must be brought to the "pulse-per-mm" resolution. +By means of a multiplier and a divider, the "software" resolution of the linear encoder must be brought to be in the "pulse-per-mm" unitsIn the "Linear Encoder Dimension" field, you must specify the resolution taking into account these factors and divisors, after which the controller will then operate with this program value
-The controller will then operate with this program value. +
-That is, in the "Linear Encoder Dimension" field, you must specify the resolution taking into account these factors and divisors.+
  
-(If the PIDs are turned off and not used, but you just need to have a position indication, then other registers are used for display, the multiplier and divider fields are not used, and then the real resolution of the ruler is indicated in the "Linear Encoder Dimension"In general, in this place it turned out very unobvious setting, if we figure out how to do it more clearly, we will redo it)+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 "Linear Encoder Dimension"
  
-Now also write the correct "K" for displaying graphs and error values.+At this point, it is necessary to input the correct coefficient "K" for displaying graphs and error values.
mycnc/linear_encoder_setup.txt · Last modified: 2021/03/11 15:06 by ivan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki