When simulating operations in using a machine kit with a Siemens Sinumerik control type, NX returns the error message:
"The declaration of the variable '_ZSD' has failed."
Solution
This is connected to the way the Sinumerik post and common simulation engine driver files work. When a simulation run is initialized, the post writes out a to_ini.ini file that stores tool, offset, and other information for the simulation drivers to use. Refer to the NX documentation and the file ...\MACH\samples\nc_simulation_samples\Working_with_OOTB_MACH_Simulation_Examples.pdf for more information on this file and what it does.
By default, the to_ini.ini file is written to a \cse_files\subprog\ folder that the process creates in the same location as the .prt file for the current manufacturing setup. If that folder is unavailable for writing temp files or doesn't exist (as would be the case for a Teamcenter managed NX environment), it will be necessary to specify a working location by creating the UGII_CAM_CSE_USER_DIR environment variable and defining a folder as its value. In this case, that environment variable was defined with a valid folder location, but the post was not told to actually use it for the to_ini.ini file. The ini file would not be created and read back in correctly, which resulted in the internal _ZSD variable not being defined correctly.
To resolve this, the post for the simulation machine must be edited. In order to tell the post to NOT use the .prt file file for the temporary cse files and write to the location defined in UGII_CAM_CSE_USER_DIR instead:
- open the post in post builder
- edit the PB_CMD_init_ini_files custom command (typically found in the Start of Program event)
- edit the value for the mom_sinumerik_ini_location variable
by default, this is set to "Part" and it needs to be set to "ENV" for this use case, as noted in the comments in this custom command:
Hardware/Software Configuration
Platform: all
OS: n/a
OS Version: n/a
Product: NX
Application: CAM
Version: V11.0.2
Function: ISV
Ref: 002-8014346