I'm starting this thread as a place to discuss the nuances of the machine definition parameters and how those affect both the post processor system and the simulations. I think this is a complicated thing to understand well enough to take full advantage of, so probably a good thing to learn more in depth. I am not an expert, and figure I have more to learn than to share, so these are some of the things I've found hard to grasp or difficult to discern what the correct way to configure these parameters really is.
I'll start with a couple of observations that I find a bit confusing and hopefully it will spur some conversation. First, I understand that the "Direction" setting for each axis in the machine definition is meant to provide a reference for whether the machine is moving the tool or the material. If the Direction setting for X and Y is -1, it is moving the material, if it is +1, it is moving the tool. The main issue I have encountered is that if I set up the machine definitions to match my actual machine, it changes the output of the post processor to something that doesn't work in some cases. I'll try to articulate what I think I'm running into, but it will probably be a bit confusing to read, so hopefully it makes sense. Here's a sketch of my machine for reference, if you are looking at it from the ceiling down toward the table surface:
My machine move the table, and therefor the material, in the Y axis and as the diagram shows, a motion in the Y+ direction moves the table in a manner which causes the tool to move on a Y+ vector. Technically speaking, the table is probably moving in a Y- motion, but the controller is set up with the perspective of the tool to material relationship in mind, not whether the table is moving or the head is moving. I have retrofitted a controller to the machine, but this is the way that it was configured from the factory as well, way back in 1991, and a common arrangement in my experience. Setting this axis to a "Direction" of -1 works for this axis both in terms of how it outputs code and how it would simulate.
The X axis causes some problems. Since the head moves side to side, the "Direction" should be 1 to reflect that the tool moves, not the material. This produces X- (negative) integers where the part is in the X+ quadrant, opposite of what the controller wants. The problem is that if I were to set up the Y axis as suggested to a "Direction" of -1, I would have a mirrored part even if I zero the machine to cut the negative X integers where they should have been positive. Leaving the X axis set to -1 allows a part in the X+, Y+ quadrant to produce toolpath code with positive integers in the X,Y motions, as it should. But again that is the opposite of the instructions as I understand them.
The Z axis adds another problem I can't figure out how best to approach. For some reason, if you set up the X or Y axis with a "Direction" value of -1, you get unmolested integers back in the post processor. By this I mean that if the toolpath is in a positive value quadrant of the model/drawing, a positive integer will be used in the program by the post processor. If you set up the X or Y axis with a "Direction" value of 1, and the toolpath is in a positive value quadrant of the model/drawing, you get back negative values in the program by the post processor. The Z axis, however, does not work by the same rules. If you set the Z axis "Direction" to a -1 value, you get the opposite Z integer back as compared to the coordinate system used by the model. I you set it to 1, you get the actual integer back as compared to the coordinate system the model is in.
My machine move the Z axis up with a positive integer, and down with a negative integer. If I set the "Direction" to 1, I get the correct integers back for the machine to cut the part right. The problem is that because this is the opposite behavior of the X and Y axis, where you would set the "Direction" to -1 where the tool is moved in relation to the part (same as +1 for Z axis), you get an odd condition for the limits settings, which are also crucial for the simulation.
For my machine, I can't set up the X axis as a moving gantry (+1) unless I change the way the controller works (I could, but don't feel I should have to), or if I can prevent the post processor from reversing the +/- value of the integers. If I understand correctly, by not setting up the X axis to a value of 1, indicating the moving tool rather than table, I would not get proper full simulation either. An additional problem, caused by the Z axis being what seems backwards to me, is that I have to set up the Z limits to be opposite of what they are as well, which will probably cause problems with simulation yet again.
The real world coordinates that would trip my limit switches are as follows relative to the machine coordinates origin produced by homing the machine (in mm, sorry):
X-25mm through X+1550mm
Y-25mm through Y+1250mm
Z -200mm through Z+50mm
If I have my X, Y, and Z axis set to -1, -1, and 1 respectively for the "Direction" values, I have to enter the limits this way:
X Min -25
X Max 1550
Y Min -25
Y Max 1250
Z Min -50
Z Max 200
If I reverse the Z axis limits (which is how I think they should be), I get an error during post production and the code won't be produced at all, so I have to set up the limits this way. The problem is, that doesn't seem like it's reflective of what my machine actually is. The Z axis cannot go to Z200 in machine coordinates. It also goes farther than Z-50 in machine coordinates. The X and Y axis are normal but because the Z axis works backwards from the X and Y axis in terms of the "Direction" function, I can't set up the limits the way I think they should be. If the Z axis behaved like the X and Y axis, and produced positive integers when set to -1 instead of 1, I could set up the limits properly just as they are for the X and Y axis. Also, if I reverse the X axis as it seems the instructions suggest for the specific machine type, I have to reverse the limits there as well.
That's where I'm at so far, and while I can get the code to come out right, and I can see the simulation run correctly in the basic simulation mode, I find this to be a bit confusing and haven't been able to figure out how to get a machine configured that is, on paper, similar to mine without breaking the post processor to produce code it can't cut right. It would be great if people could share what they have learned about setting up their machines and what worked for you.
Hope that's a good start, and will appreciate any thought regarding what I'm doing incorrectly or what I may be seeing in the wrong way.