Showing results for 
Search instead for 
Do you mean 
Solved! Go to solution

How can I use my chuck in a lathe simulation?

I want to make a simulation with a lathe and a chuck I made myself (I re-used most of the sim11-turn-2ax parts that come with NX, but the kinematic model and postprocessor are self-made). Everything works fine but I can’t control my chuck properly.

Those are the two things I’m trying to do: (and I know it’s possible, I saw it on videos)

  • Make the jaws spin during a simulation so that the collision detection can work, if they are static it doesn’t really make any sense.
  • Be able to close the jaws on my piece.

If someone can explain me how to do this or give me a link to an explanation I would be very grateful.

Here's a screenshot of my chuck and its kinematic model.


Thank's a lot on advance.



Accepted by topic author AlexDup
‎02-09-2017 07:19 AM

Re: How can I use my chuck in a lathe simulation?

[ Edited ]

Hi Alex,


the following points in SIM15 example are interesting for you.


Moving Chucks in NC Code with M120/M121 M130/M131

2017-01-26 11_45_39-Machine Configurator - [G__kit_mach_resource_library_machine_installed_machines_.jpg



Subprog content


2017-01-26 11_15_46-subprog.jpg



Renaming axis names (it´s only for showcase. It´s fully sufficient to move the axis with V1/2/3 addresses directly)


 2017-01-26 11_16_39-sinumerik.jpg

Moving jucks with one adress V1 

2017-01-26 11_17_16-XML Notepad - C__Users_feind_AppData_Local_Temp_re_mc_tp_1485425766929.xml.jpg



Let me know if you need further information




Re: How can I use my chuck in a lathe simulation?

Hi Thomas,

Thanks a lot for the quick answer.
It helped me figure out how I'll have to do it for my chuck.
I first tried it out with the sim 15 but I couldn't figure out how to close the jaws. I thought the UDE Clamp would do it but nothing happens in my simulation...
Do you know how to do this?

Re: How can I use my chuck in a lathe simulation?

What happens when you move e.g. J1 via G53 J1=100? Is there an error message or nothing?
Have you implemented the J1 adress correctly? Have you assigned the jaw graphic to the kinematic component? Are the jaws assgined to the current channel?

Sorry for so many question but the reason could be everywhere.

Re: How can I use my chuck in a lathe simulation?

When I start a simulation, NX opens three error messages before opening the simulation control pannel:
- Program name 'TO_INI_1' not found. (2 times)
- C:\...\sinumerik\sim15_millturn_9ax-2.ini was not registred.

When I try to directly command G53 J1=100 nothing happens.
When I try to command M121 (or another one) I get an error message saying The variable 'CHUCK_MAIN' hasn't been declared yet.

I checked and the jaw graphics are correctly assigned with the kinematic model.
Not sure about the channel...

Re: How can I use my chuck in a lathe simulation?

1.) To avoid the error messages you have different choices.

If you machine is a single machine, easily delete the -2.ini file. If its a multichannel machine, then you have to craete and setup the second channel in Machine Tool Builder.


TO_INI_1/2: delete the TO_INI_1 and TO_INI_2 from \sim15_millturn_9ax-1/2.ini file or create a folder 'cse_files\subprog\ ' where the cam setup is located and create both files in there. --> it depends how you will setup your simulation regarding where the tool and offset information come from. Either from system or loaded from that files.


2.) M121 check the entries in ini file --> screenshot no. 3


3.) Does the jaw move when you move it manually in Machine Axis Dialog? If there is no jaw axis available then you have to look in more detail in to the fourth screenshot. There is a method call GMe_AssignMainChuckJawAxisIntoChannel. This method assigns the jaws axis into the channel. This is needed to move the axis via NC Code.

Re: How can I use my chuck in a lathe simulation?

It worked! I removed the -2.ini file and TO_INI_1 from the -1.ini file and now my jaws close succesfuly on my piece in sim15 with M121.
I'll now try to obtain the same with my own chuck in my lathe, if I still get some trouble I'll come back but normally it won't be a problem.

Thank's a lot, it helped me so much.

And do you have an idea about the first point in my original post, about how to make the jaws spin, i.e. for collision detection?
Accepted by topic author AlexDup
‎02-09-2017 07:18 AM

Re: How can I use my chuck in a lathe simulation?

See if this is from any help. I get the chuck & jaws simulation/rotation with those. I could be wrong but you need to ensure that both Device ID and Holder ID matches.










Re: How can I use my chuck in a lathe simulation?

Thx both of you for the help, it as very useful for me.



Re: How can I use my chuck in a lathe simulation?



This is a very helpful response. What is this editor you are using?



Organization, an essential part of Productivity !

Production: NX10.0.3 MP13, VERICUT 8.0
Development: VB.NET, Tcl/Tk Testing: NX11.0, iMachining 2.0, Adaptive Roughing

Learn online

Solution Information