In working on a multi-spindle Mill-Turn simulation, we are trying to understand what defines the $spindle variable. We can't find this in the post builder variables or in the debugger. For example, the Sim15 OOTB defines the main turning spindle as C4, but on our machine tool it is C1, so we need to change it. Similarly, in the OOTB, SETMS(4) points to the main turning spindle, but for us we need SETMS(1) to point to the main turning spindle. We have changed everything we can find in the kinematic model in machine tool builder and in the MCF file (we are working in both NX9 and NX11 for this project and we are aware some of this is no longer defined in the MCF file in NX11). In addition, the milling spindle is S1. When I change the spindles and axis names to C1 from C4, etc, I get an error in the Machine Tool Simulation: "Unknown spindle used ('C1')."
Right now I am running the machine code "M1=5" to stop the spindle before the first tool change begins and I get this error Machine Tool Simulation: "Unknown spindle used ('C1')."
I can't find any commands or addresses in the MCF or CCF that define what happens with an M1= command. Does this happen in the parser? Is there a way I can change what the spindle numbers are? Does this have to do with the axis numbers?
Solved! Go to Solution.
Often when you get the message "Unknown spindle used" that happen during the tool subprogram. You should be able to identify the NC line inside the subprogram. e.g. generateToolchangecode (sToolName, sCarrierName);
The carrier name is defined in the MTB KIM structure in the object classified as "_DEVIE" under the token "Device ID"
When calling e.g. SETMS(no) check the implementation in the MCF by default it uses "Cno" to be set as main spindle. That usually need to be adjusted by machine tool configuration. Same for M3 M4 M5 check for which spindle teh mode will be changed.
Ok, I think I understand. I am studying this now.
What about the $spindle variable in post builder. We can't figure out where that that is defined. Can you explain $spindle?
I am not aware of any variable $spindle inside the post.
What you are looking for inside the post?
Hopefully some post experts can jump in after you describe what you are looking for.
$Spindle shows up in 3 places that I can find. When creating the post I chose the 5-axis with rotary head and table, and the Siemens840D millturn.
1. Automatically populated in the set_spindle block. See the SETMS image.
2. Automatically populated in the transmit block. See the Transmit image.
3. Automatically populated in the spindle_css WORD and used in the leader text. See the spindle css image.
We would like to understand where $spindle is coming from. Alternatively we have considered replacing that value with either our own variable or perhaps using mom_main_mcs in order to accomplish what Jeff explained above.
I agree that seems like a good work-around to make our post and sim work as needed, and I think we will start heading that direction. At some point it would be great to find where the $spindle is coming from though to be able to control it directly.