User Tools

Site Tools


plc:plc_examples

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
plc:plc_examples [2020/02/03 15:05] ivanplc:plc_examples [2021/03/03 15:12] ivan
Line 129: Line 129:
   exit(99);  //normal exit    exit(99);  //normal exit 
 };</code> };</code>
 +
 +++++
  
 ++++Click to expand the M02 code | ++++Click to expand the M02 code |
Line 203: Line 205:
   exit(99);   exit(99);
 };</code> };</code>
 +
 ++++ ++++
  
Line 349: Line 352:
  
 === Eliminating tangential knife spin at the start of the program (M212) === === Eliminating tangential knife spin at the start of the program (M212) ===
 +
 +{{youtube>kLuNWFlizhA?large}}
  
 Because of how the system records angles, the software shows angles larger than 360 degrees (one full revolution) if a number of turns in the same direction have been taken by the knife. For example, if the knife has turned around its axis from 0 degrees twice in the positive direction, the angle now will be recorded as 720 degrees (2 full revolutions). After the program completes, and the angle is left at this number, the next time the program starts, the knife will rotate back until the angle is equal to zero. This behaviour is not ideal for some users, as it can extend the cutting process time.  Because of how the system records angles, the software shows angles larger than 360 degrees (one full revolution) if a number of turns in the same direction have been taken by the knife. For example, if the knife has turned around its axis from 0 degrees twice in the positive direction, the angle now will be recorded as 720 degrees (2 full revolutions). After the program completes, and the angle is left at this number, the next time the program starts, the knife will rotate back until the angle is equal to zero. This behaviour is not ideal for some users, as it can extend the cutting process time. 
Line 387: Line 392:
 This PLC can be added to the DXF footer in **Settings > Config > DXF Import Settings** to run every time when the program generated from an imported DXF file finishes running.  This PLC can be added to the DXF footer in **Settings > Config > DXF Import Settings** to run every time when the program generated from an imported DXF file finishes running. 
  
 +**//NOTE://** Since M212 changes the current coordinate value, it is necessary to always have a positioning command of the format ''G0C_'' after M212. If, for example, the coordinate is reset to 0 inside the PLC, then the next code after the PLC must be ''G90G0A0''. This  will result in no movement along the axis, but the coordinates will be synchronized.
 +
 +When analyzing the program, by default the software does not know that the coordinate inside the PLC has changed, and thus the subsequent G0 command must be used to update it (G1/G2/G3 are NOT suitable for this task). However, the G0 code is only necessary if the M212 is embedded into a G-code program. If the M212 PLC is started independently (for example by clicking a the button which launches the M212 alone), then the system will automatically see that the coordinate has been changed. 
  
  
plc/plc_examples.txt · Last modified: 2024/02/21 13:59 by ivan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki