G-code
Supported M-codes

M64, M65, M66, M67 (Phoenix Contact Axioline IO)

10min

These commands use the Axioline Smart Elements by Phoenix Contact.

Support for this is locked with a paid activation key. Contact our sales team when interested in purchasing a key. Without this key, this functionality will not work. This key is only available for iCNC600, CNC720, and CNC760 controllers.

Digital outputs - AXL SE DO16

Set output - M64 P...

Set the output on the Modbus TCP module to on. The P word must be comprised of a module number(1 - 6) and an output port(1 - 16).

M64 P102 (set module 1 output 2 to on)


Clear output - M65 P...

Set the output on the Modbus TCP module to off. The P word must be comprised of a module number(1 - 6) and an output port(1 - 16).

M65 P405 (set module 4 output 5 to off)


Read outputs - M67 P

Read the state of the output on the Modbus TCP module, and store the result in variable #5399. The P word must be comprised of a module number(1 - 6) and an output port(1 - 16).

M67 P211 (read the module 2 output 11) if [#5399 == 1] ; Output is on else ; Output is off endif


Digital inputs - AXL SE DI16

Read inputs - M66 P

Read the state of the input on the Modbus TCP module, and store the result in variable #5399. The P word must be comprised of a module number(1 - 6) and an output port(1 - 16).

M66 P513 (read the module 5 input 13) if [#5399 == 1] ; Input is on else ; Input is off endif


Read input + wait - M66 P ... L... Q...

Read digital input P and specify wait mode, the result is stored in variable #5399

  • P...: the input number
  • L0: do not wait
  • L1: Wait for High
  • L2: Wait for Low
  • Q...: timeout (seconds)
M66 P104 L2 Q30 (read the module 5 input 13) if [#5399 == -1] Errmsg "Timeout while waiting for module 5 input 13 becoming low" else Msg "Module 5 input 13 is off" endif

Note that we use wait (L2) here, in the event of a timeout, the value of #5399 is -1.

In order to make this code simulation and rendering proof we need to extend it like this:

if [[#5380 == 0] and [#5397 == 0]] (Check only if running job) M66 P3 L2 Q30 (read the module 5 input 13) if [#5399 == -1] Errmsg "Timeout while waiting for module 5 input 13 becoming low" else Msg "Module 5 input 13 is off" endif endif