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/01/21 12:31] 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 387: Line 390:
 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).
 +
 +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 it doesn't matter - 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