User Tools

Site Tools


plc:plc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
plc:plc [2018/12/27 14:30]
skirillov
plc:plc [2019/10/18 11:50] (current)
ivan
Line 32: Line 32:
 === PLC Language === === PLC Language ===
  
-  * PLC operates with 32 bits integer values only. Floating point operations don't work in PLC.+  * PLC operates with 32 bits integer values only. Floating point operations don't work in PLC (typically need to use coefficient conversions to allow for more granular control).
   * There is no need to declare variables. There is very limited space of 32 elements for variables. ​   * There is no need to declare variables. There is very limited space of 32 elements for variables. ​
   * There a number of pre-defined variables in the PLC   * There a number of pre-defined variables in the PLC
-    * eparam - External Parameter variable. ​If M-code running from G-code program, 16-bit integer parameters P and L are sent to the PLC procedure in the **eparam** variable. \\ P-parameter in a low word of the eparam value and \\ L-parameter in high word of eparam value. To decode P and L parameters from **eparam** simple 2-lines code can be used <​code>​P=eparam&​0xFFFF;//​P-parameter¬†+    * eparam - External Parameter variable. ​A short manual is available here: [[plc:plc:eparam|Eparam]] ​
-L=eparam>>​16;​ //​L-parameter</​code>​+
     * **proc** - variable is used to identify a process running in the PLC. \\ The value is sent to the CNC control software and can be used to display Current PLC state (like Idle, Ignition (for plasma cutting), preheat (gas cutting), Tool change, Probing etc)     * **proc** - variable is used to identify a process running in the PLC. \\ The value is sent to the CNC control software and can be used to display Current PLC state (like Idle, Ignition (for plasma cutting), preheat (gas cutting), Tool change, Probing etc)
     * **timer** - value can be used as time counter inside PLC procedure     * **timer** - value can be used as time counter inside PLC procedure
plc/plc.1545939027.txt.gz · Last modified: 2018/12/27 14:30 by skirillov