Step 4: Create an NC Measurement Routine File

When you create PC-DMIS measurement routines for NC Server, you cannot use the minus character (-) in the PC-DMIS measurement routine's path or file name.

  1. Using PC-DMIS NC, create a measurement routine to measure the desired features on the part and generate output. You can use the server computer if you are not running the NC Server application on it. Otherwise, you need another computer that runs PC-DMIS NC.

For information on the NC Server operation, see the NC Server documentation.

  1. From the Settings toolbar, select the machine to use.

  2. At the beginning of the measurement routine, create an unmarked alignment. You might define the work offset using the features on the CAD model. However, you can do this in a variety of ways.

  3. Change to DCC mode.

  4. If you are using controller resident probe calibration, use a probe that has the same nominal ball diameter as the probe in the NC machine. If you are using PC-DMIS probe calibration, select the probe and tip that you calibrated.

  5. To generate the CNC measurement routine from your measurement routine, select the Operation | CNC Programming | Create CNC Measurement Routine menu item. PC-DMIS NC generates a file with a .cnc extension. This command also displays the probe's path. Unmarked commands are ignored.

  6. If needed, modify the Macro Number box. This option is the measurement routine number that identifies this measurement sequence within the CNC system. This is true for all Fanuc style controls that identify measurement routines by a number, such as O1234. For other controls, the output file name identifies the measurement routine.

  7. If desired, modify where you want to send the CNC measurement routine. To modify the location, click the Browse button, and navigate to a different folder. Otherwise, accept the default pathway.

  8. Click OK. PC-DMIS NC generates the CNC measurement routine, and the probe path appears in the Graphic Display window. If you encounter errors, consult the log file inside any text editor application, such as Notepad. In Windows 10, the log file is located in the "C:\Users\<LoginName>AppData\Local\Temp" folder and has an .log extension.

Note When Creating Programs for Fanuc Controllers

When you create a program for use on Fanuc controllers, NC Server encodes the PC-DMIS measurement routine file name (.prg) and its path in the CNC program's variables. This means that the CNC program may use up a significant number of controller variables depending on the length of the path and the name of the PC-DMIS .prg file.

To understand how many variables the CNC program requires to encode the path, count the number of characters in the combined folder path and PC-DMIS measurement routine file name and divide by 3. The result defines the number of variables the CNC program requires. You must ensure that the number of variables are available for use when you run the CNC program on the Fanuc controller.

Example: A measurement routine file and folder of "​​C:\MYDirectory\Program1.prg​​" contains 27 characters. If we divide that by three we can determine that it requires nine variables to encode it in the CNC program file.

You must ensure that there are enough free variables available at runtime to allow for the path to be properly encoded.​

If it is not possible for you to store your PC-DMIS measurement routine files in a location with a short path, there is a workaround. For the workaround, you create a symbolic link or junction to the top-level folder where you save your measurement routine files, like this:

  1. To begin, create a "short path" folder somewhere on your computer. This could simply be "​​C:\PCDMIS​​", but make sure you create the "short path" folder before you continue with this workaround.

  2. Open a Command Prompt window with Administrator privileges.

  3. Type this command: mklink /j <short path> <target path>

<short path> is the location that you want to create the junction to the Target Path location.

<target path> is the actual or the "long path" location of where you store your PC-DMIS measurement routine files.

Example: mklink /j C:\PCDMIS C:\MyDirectory\Program1.prg

If any of your paths contain spaces, be sure to bound them with quotation marks.

  1. Press Enter to create the junction.

  2. After the Command Prompt window creates the junction, run PC-DMIS and configure the default folder where you save your measurement routine files to point to the new "short path" location.

You can now use the new short path to access your measurement routine files that are in the actual or long path location.

Next Step...