When used in a gcode file, the M17 command will wait until an input comes on before it processes the next line of code. If the input channel is already turned on, the program will continue running. Otherwise, the program will wait, then proceed the moment the input channel comes on.
Example: In this example, we issue a wait command on input channel 11. Channel 11 could be the spindle's feedback to tell the machine if there is a tool in the spindle, for instance. So, this example waits, or tests, to see if a tool in the spindle, and the file continues running only if there is a tool in the spindle.
M17C11
[continue running if tool in spindle]
Wednesday, March 08, 2006
How can I test to see if an Auxout is activated?
Using G-code commands, you can test to see if an auxout is activated. For example, if, in a macro, you want to check if the spindle is on, and the spindle output channel is C20, here is how you would test to see if the spindle is on. The line of gcode that follows the M17.1 command will be run only if C20 (the spindle's output channel) is on, otherwise, the line that follows will be skipped.
M17.2 C20 [TEST TO SEE IF OUTPUT 20 IS ON]
G4 [This prompt will appear if the spindle is on.]
M17.2 C20 [TEST TO SEE IF OUTPUT 20 IS ON]
G4 [This prompt will appear if the spindle is on.]
Making a Fully-Automatic MEASURE.ALL Command
A Measure.all macro is used with CNC Routers that have an automatic tool height measurement sensor installed on the table. It will pick up each tool the machine has in its tool rack, then measure and store the tool length offset for the tool.
The L111 command will check the software's internal register to see which tool is currently loaded in the software. If the tool is not loaded, the line of G-code immediately following the L111 command will be skipped. If the tool is loaded, the next line of G-code will be read and processed.
Here's an example measure.all macro:
The L111 command will check the software's internal register to see which tool is currently loaded in the software. If the tool is not loaded, the line of G-code immediately following the L111 command will be skipped. If the tool is loaded, the next line of G-code will be read and processed.
Here's an example measure.all macro:
T1 [GET TOOL NUMBER ONE]
L111T1 [CHECK TO SEE IF TOOL LOAD WAS SUCCESSFUL]
M98 G37Z [MEASURE TOOL (if tool succesfully loaded)]
T2 [GET TOOL NUMBER TWO]
L111T2 [CHECK TO SEE IF TOOL LOAD WAS SUCCESSFUL]
M98 G37Z [MEASURE TOOL (if tool succesfully loaded)]
T3 [GET TOOL NUMBER THREE]
L111T3 [CHECK TO SEE IF TOOL LOAD WAS SUCCESSFUL]
M98 G37Z [MEASURE TOOL (if tool succesfully loaded)]
T4 [GET TOOL NUMBER FOUR]
L111T4 [CHECK TO SEE IF TOOL LOAD WAS SUCCESSFUL]
M98 G37Z [MEASURE TOOL (if tool succesfully loaded)]
Subscribe to:
Posts (Atom)