Showing results for 
Search instead for 
Do you mean 

Error: 'Command "SetJointValue" called with invalid argument'

Hello everyone,


I want to implement a SCARA from Adept into NX CAM to simulate it and drive a circle. It's a project for university.

I build an kinematic model in which I defined axis 1 and 2 as rotational and axis 3 as linear. Additionally I created a spindle and a setup with a part, a blank and fixtures. All axis moves in the right way here. After that I took the cse_driver and the postprocessor from sim01_mill_3ax and customized it.

In the MCF I implemented an method to transformate the position given in NC to angles for the axis 1 and 2. And I think here is something wrong. When I want to simulate a NC-Code the error  'Command "SetJointValue" called with invalid argument' followed by the error 'Unspecified error when excecuting method "MOTION"'. Both errors are given two times in a row (I think due to a mistake in the angle for axis 1 AND a mistake in the angle for axis 2).

I also wrote subprogrames in the cse_driver and metacodes in the MCF. And of course I changed the machine_database.dat in ascii-folder.


To indentify the mistake I changed the value which is given to axis 1 and 2 to the value of Z which is given to axis 3 (linear axis). Then it only says that the axis limits are violated but the model moves. So the mistake has to be in the calculation of the angles. I also tested to put the formula directly into the SetJointValue-command but this doesn't work too. Des anybody have an idea what is wrong?

I attach two screenshots of the method named MOTION.


I hope you have all informations to understand my problem. This is my first entry in a NX-Forum.

Oh, and I use NX 11 and the sinumerik controller.




Re: Error: 'Command "SetJointValue" called with invalid argument'

I guess that the $X, $Y etc. are not declared in NC Code.


The SetVariable command sets a value to a NC variable but do not take care of the definition or declaration.

I assume you´re working with the Sinumerik. Either you add the $X, $Y etc. to the system variables  in variables tab in Machine Configurator (Global Variables are channel independent, Variables are channel dependent). Or you define the variables directly in the NC Code e.g.




Re: Error: 'Command "SetJointValue" called with invalid argument'

Thanks for reply!


We defined all variables in Machine Configurator as variables (not global variables) but the machine is an single-channel machine. Because of that I thought it is not relevant whether the variables are global or not.Variables.JPG

Re: Error: 'Command "SetJointValue" called with invalid argument'


yes in that case its not relevant.

I don´t see the definition of $W or $V in Machine Configuration. In Method2.JPG you try to set the value to ACHSE1 and ACHSE2 with the value of $W and $V.


Re: Error: 'Command "SetJointValue" called with invalid argument'



I'm sorry for not responding in the last days!

We changed the name in Machine Configuartion and in the programm from '$V' and '$W' to '$PHI1' and '$PHI2'. Excuse me that I did not mention this.




Re: Error: 'Command "SetJointValue" called with invalid argument'

and it works or not?

Re: Error: 'Command "SetJointValue" called with invalid argument'

No, it doesn't work. We surrendered now.

We have even tried to include the mcf and the kinematic model from a friend, who worked on the same task (to include the Scara). His model worked on his computer but our system does not run with his files, too. So the mistake can maybe be found in an higher level of NX? I really don't know.

Re: Error: 'Command "SetJointValue" called with invalid argument'

sorry I´m confused... which state showing the screeenshots in your first post? Please describe your environment again. It´s hard to understand the whole thing. In the most cases its a customization problem and not a NX problem.

Re: Error: 'Command "SetJointValue" called with invalid argument'

Okay, sorry!


I add pictures of our newest version.

Additionally you can see the error message we get when we want to simulate a machinecodefile.

The evironment:

We have to implement a Scara in NX CAM to simulate a drive of an circle with the robot. This was an task given by a professor. First we copied the files from sim01-mill-3ax which was already implented in the program. Now we wanted to customize it step by step. So second we create an kinematic model and put it into our graphics-folder. There also lay all of our needed part-files. We customized the machine_database in ascii-folder. Then we created a new mcf in Machine Configurator. We write subprogrammes and metacodes for the G-Commands and M-Commands. To define the adresses X,Y and Z we write the Method 'MOTION' which is also shown in two pictures. In postprocessor we changed nothing.  We use the sinumerik-postprocessor.

Re: Error: 'Command "SetJointValue" called with invalid argument'

Please add a screenshot with the NC Code and the kinematic model

Learn online

Solution Information