The following flow chart assumes that the spindle has been moved or is moving to tool change position. Tool change position is commanded by an M6 code if there is a line in the [EMCIO] section of the INI file that reads.
TOOL_CHANGE_POSITION = "xpos" "ypos" "zpos"
I've tested this code and it does work to move the machine each time a tool is changed. I seem to remember something where you can put a placeholding character so that only one axis need to move.
We will need to figure out the actual z position. The Fanuc M6 control does this by reading a parameter.
*Spindle decel started *Gear shift speed established *Gear shift ready *Gear shift started *Neutral gear established *Spindle orient started *Spindle orient completed *Arm rotate 60 CW started *Arm rotate 60 CW completed *Tool unclamp command *Tool unclamp started *Tool unclamp completed *Tool unclamped *0.3 sec delay *Arm extend command *Arm extension started *Arm extension completed *Arm 180 CCW started *Arm 180 CCW rotation completed *RTTC on *EXTC off *Y = ARXT off *RETC on *Arm Retraction started *Arm retraction completed *Tool clamp command *Tool clamp started *Tool clamp completed *Y = 60 CW off *Y= 180 CCW off *60 CCW = LS *180 CW = LS
concurrent ops
tool unload to magazine spindle
TC = M8? off Spindle unorient command
Spindle unorient started Spindle unorient completed Spindle motor start(actually must happen after 0.3 delay) Gear shift ready Gear shifting time 0.3 sec delay Gear shift to low or high ( if speed <= 1000 gear = low else if speed >1000 gear = high if gear = low then multiply spindle speed by 4. Spindle speed up Return control to EMC
Description | SOL1 | SOL2 | SOL3 | SOL4 | LS1 | LS2 | LS3 | LS4 | LS5 | LS6 | |
DOWN | UP | 60 CW | 180 CCW | 60 CW | 60 CCW | 180 CCW | 180 CCW | UP | DOWN | ||
ARM INITIAL POSITION | X | O | X | X | X | O | O | X | O | X | |
ARM 60 ROTATION COMMAND | X | O | O | X | X | O | O | X | O | X | |
START | X | O | O | X | |X | X | O | X | O | X | |
ARM 60 ROTATION COMPLETED | X | O | O | X | O | X | O | X | O | X | |
ARM EXTENSION COMMAND | O | X | O | X | O | X | O | X | O | X | |
START | O | X | O | X | O | X | O | X | X | X | |
ARM EXTENSION COMPLETED | O | X | O | X | O | X | O | X | X | O | |
ARM 180 ROTATION COMMAND | O | X | O | O | O | X | O | X | X | O | |
START | O | X | O | O | O | X | X | X | X | O | |
ARM EXTENSION COMPLETED | O | X | O | O | O | X | X | O | X | O | |
ARM RETRACTION COMMAND | X | O | O | O | O | X | X | O | X | O | |
START | X | O | O | O | O | X | X | O | X | X | |
ARM RETRACTION COMPLETED | X | O | O | O | O | X | X | O | O | X | |
ARM 60 ROTATION COMMAND | X | O | X | X | O | X | X | O | O | X | |
START | X | O | X | X | X | X | X | X | O | X | |
ARM 60 ROTATION COMPLETED | X | O | X | X | X | O | O | X | O | X |
Tool Position | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 |
0 | 0 | 0 | 0 | 0 | 0 |
1 | 0 | 0 | 0 | 0 | 1 |
2 | 0 | 0 | 0 | 1 | 0 |
3 | 0 | 0 | 0 | 1 | 1 |
4 | 0 | 0 | 1 | 0 | 0 |
5 | 0 | 0 | 1 | 0 | 1 |
6 | 0 | 0 | 1 | 1 | 0 |
7 | 0 | 0 | 1 | 1 | 1 |
8 | 0 | 1 | 0 | 0 | 0 |
9 | 0 | 1 | 0 | 0 | 1 |
10 | 0 | 1 | 0 | 1 | 0 |
11 | 0 | 1 | 0 | 1 | 1 |
12 | 0 | 1 | 1 | 0 | 0 |
13 | 1 | 0 | 0 | 0 | 0 |
14 | 1 | 0 | 0 | 0 | 1 |
15 | 1 | 0 | 0 | 1 | 0 |
16 | 1 | 0 | 0 | 1 | 1 |
17 | 1 | 0 | 1 | 0 | 0 |
18 | 1 | 0 | 1 | 0 | 1 |
19 | 1 | 0 | 1 | 1 | 0 |
20 | 1 | 0 | 1 | 1 | 1 |
21 | 1 | 1 | 0 | 0 | 0 |
22 | 1 | 1 | 0 | 0 | 1 |
23 | 1 | 1 | 0 | 1 | 0 |
24 | 1 | 1 | 0 | 1 | 1 |
So, this is basically a binary sequence, except that bit 4 has a weight of 13 instead of 16.