Chapter 7
130
UM10350_PCNC770_Manual_0916A
Programming
7.7.10 Wait on Input – M66
NOTE: These commands are only useful when the mill is equipped with the USB I/O Module (PN 32616).
There are four digital inputs available on the USB I/O module.
M66 P- | E- <L->
Word Denition
P- Species the digital input number from 0 to 3.
L-
Species the wait mode type:
• Mode 0: IMMEDIATE – no waiting, returns immediately. The value of the input at that
time is stored in parameter #5399.
• Mode 1: RISE – waits for the selected input to perform a rise event.
• Mode 2: FALL – waits for the selected input to perform a fall event.
• Mode 3: HIGH – waits for the selected input to go to the HIGH state.
• Mode 4: LOW – waits for the selected input to go to the LOW state.
Q-
Species the timeout in seconds for waiting. The Q value is ignored if the L-word is zero
(IMMEDIATE). A Q value of zero is an error if the L-word is non-zero.
7.7.11 Operator Defined Commands – M100 to M199
M100-M199 are reserved for operator dened M-codes.
To execute an operator dened M-code, program: M1nn P~ Q~
Word Denition
P~ A number passed to the le as the rst parameter
Q~ A number passed to the le as the second parameter
NOTE: Aer creang a new M1nn le, restart the operang system so it is aware of the new le, otherwise
you get an unknown M-code error.
Up to two arguments can be passed to the external program with the oponal P~ and Q~ words.
Execuon of the G-code le pauses unl the external program exits. Any valid executable le can be
used. The le must be located in the folder ~/nc_les.
The error Unknown M-code used denotes one of the following:
• The specied operator dened command does not exist
• The le is not an executable le
• The le name has an extension
• The le name does not follow this format M1nn where nn = 00 through 99
• The le name used a lowercase M