Part Family Programming in VMS with Input Files

Many customers produce “families” of related parts, or parts that are nearly identical, but whose features vary in size and placement. Most measurement platforms require separate programs for each part in the “part family”. However, in VMS, a single program can run all parts in a family by utilizing a text file.

Two parts that differ in size, but are part of the same “part family”

The figure above shows two different sizes of the FastStart training part. Creating separate programs for each part would be time consuming and prone to errors. Instead, consider designing the part program to handle many different sizes. In this example, an input text file is used with the part program. The sample program can be downloaded using this link. Sample.txt should be placed in the C:\ViewMM\VMS\PROG\ folder.

First, the input text file must be created, and the format for each line needs to be defined. In the image below, each line has three items separated by commas, i.e. the part number, the value for dimension A, and the value for dimension B. It is recommended to add a header line as the first line to remind the user what dimensions are being entered.

Sample input file to be used with program

Next, the program must have the necessary steps to read this file and determine the values to use. VMS has the capability to read this input file, determine which line is for the current part, and apply the values for the dimensions to variables in the program. Please refer to the example in the VMS File I/O issue of the VIEW Vision Tech Bulletin and the function help within VMS for more information about specific functions mentioned.

In the program shown below, the operator is prompted to enter the part number (“SampleA”). Then, the program will read Sample.txt and search for that line that has “SampleA” as the first entry in the line. When that line is found, the function parse_line() is used to extract individual strings separated by a delimiter (a comma in this case) and puts them in a string array. The variables A and B can then be assigned their value from their respective locations in this array.

Sample.voy

Finally, the variables A and B need to be used in the program to measure the two circles. Edit the circle measurement step “C2” and replace X stage position with the variable “A”. Do the same for “C3”, but replace Y stage position with variable “B”. The finders will be placed dynamically according to the specific part, instead of the same position each time. As the program grows, more variables will need to be defined and their dimensions entered into the input file.

Adding future parts becomes fast and easy. To add “SampleC”, simply add another line in Sample.txt with the new dimensions. The program is ready to run immediately! By utilizing these techniques, programs in VMS become more dynamic and efficient, giving you more time to spend doing the things you love, like developing new parts.

Thank you for your interest in

Part Family Programming in VMS with Input Files

In order for you to view this file we ask that provide us with some information.
[dlm_gf_form download_id="2111" gf_ajax="true"]
Thank you for your interest in

Part Family Programming in VMS with Input Files

In order for you to view this file we ask that provide us with some information.
[dlm_gf_form download_id="2115" gf_ajax="true"]
Thank you for your interest in

Part Family Programming in VMS with Input Files

In order for you to view this file we ask that provide us with some information.
[dlm_gf_form download_id="2114" gf_ajax="true"]
Thank you for your interest in

Part Family Programming in VMS with Input Files

In order for you to view this file we ask that provide us with some information.
[dlm_gf_form download_id="2113" gf_ajax="true"]
Thank you for your interest in

Part Family Programming in VMS with Input Files

In order for you to view this file we ask that provide us with some information.
[dlm_gf_form download_id="2116" gf_ajax="true"]
Thank you for your interest in

Part Family Programming in VMS with Input Files

In order for you to view this file we ask that provide us with some information.
[dlm_gf_form download_id="2118" gf_ajax="true"]
Thank you for your interest in

VMS® and Elements® Software

In order for you to view this file we ask that provide us with some information.
[dlm_gf_form download_id="2109" gf_ajax="true"]
Thank you for your interest in

VIEW Full Product Line

In order for you to view this file we ask that provide us with some information.
[dlm_gf_form download_id="2110" gf_ajax="true"]
Thank you for your interest in

Part Family Programming in VMS with Input Files

In order for you to view this file we ask that provide us with some information.
[dlm_gf_form download_id="2117" gf_ajax="true"]
Thank you for your interest in

Part Family Programming in VMS with Input Files

In order for you to view this file we ask that provide us with some information.
[dlm_gf_form download_id="2042" gf_ajax="true"]

This website uses cookies to ensure you get the best experience on our website. By continuing to use this site, you agree to our use of cookies. Learn more.