core

## Editing the usermachine.dat Data File

The machines listed in the dialog box come from two .dat files:

- The file "machine.dat" contains the default machine descriptions supplied by the PC-DMIS developers.

- The file "usermachine.dat" contains the machine descriptions of any machines the user has created and saved.

If there is no "machine.dat" file, the list of machines only displays the No Machine item.

You can use the information in machine.dat as a model to manually create your own machines in the usermachine.dat file. For information on where these files are stored, see "Understanding Data Files" in the "Setting Your Preferences" chapter.

Definitions of the machine.dat and usermachine.dat Files

The machine.dat file controls the graphical and numerical representation of the default machines available in PC-DMIS. If you need a custom machine or machine system within PC-DMIS, you need to define it in the usermachine.dat file. The usermachine.dat file follows the same format but it holds custom machines.

You need to strictly follow a specific format to define the machine.

This example describes the format and rules of the format with a list of the commands and their definitions.

ITEM:2000_20-12-18_ARM1 ARM

In the above code snippet, the following rules apply:

1. The first set of characters following the colon "ITEM:" is the name that appears in the Load Virtual Machine dialog box when you construct a machine setup (see the example dialog box image below). This is a unique name of your choice to identify the machine configuration.

You can find details in the Format of the Machine or Machine System ITEM section below.

2. The second set of characters, "ARM" in the above example, defines the type of machine connection.

The following information lists and defines the machine builder commands:

ITEM:<machine name>

Specifies the machine name displayed in the Load Virtual Machine dialog box in PC-DMIS.

ITEM <connection type>

Defines the type of connection. The ARM connection type is used in the above example. This doesn’t mean much in the case of a machine start, however.

cadgeom n1 n2 n3 n4 n5 n6 n7 n8 n9 n10 n11 n12 n13 <draw_file_name.draw>

Defines the position and rotation of the layers within the DRAW file:

n1 n2 n3

The X Y Z coordinate location from the origin of 0,0,0.

n4 n5 n6

The I J K vector for the X+ side of the layer.

n7 n8 n9

The I J K vector for the Y+ side of the layer.

n10 n11 n12

The I J K vector for the Z+ side of the layer.

n13

The layer to display. All previous "n" values are applied to this layer.

draw_file_name.draw

The DRAW file that the software uses to get the layer data. This file is located in the models\cmm folder in the PC-DMIS install directory.

tablecenter n1 n2 n3 n4 n5 n6

Defines the position of the machine table within the DRAW file:

n1 n2 n3

The distance of the center (XYZ) of the plate from the origin of the DRAW file.

n4 n5 n6

The I J K vector of the plate.

<joint type> n1 n2 n3 n4 n5 n6 n7 n8 n9 n10 <joint name>

Defines the type of joint used within the DRAW file:

<joint type>

The type of joint used. The options are "autojoint", "linearjoint", and "manualjoint".

n1 n2 n3

The X Y Z coordinate location from the origin 0,0,0.

n4 n5 n6

The I J K vector.

n7 n8

The angular offset value (n7) and the increment value (n8). These are mainly used for autojoint configurations and are typically set to 0 0 in most other configurations.

autojoint 244.147 -151.141 -586 0 0 1 0 0.01 -360 360 w axis

The example shows that the configuration starts at 0 (n7) and rotates in 0.01 (n8) degree increments.

n9 n10

The minus and plus motion for the defined axis. The first number (n9) is always a negative value or zero while the second number (n10) is always a positive number or zero.

<joint name>

A unique user-defined name for the joint for each ITEM definition. You can use space characters in the joint name.

connect n1 n2 n3 n4 n5 n6 <probe connection type> <joint type>

The machine position in relation to the last linear joint at which the probe connects:

n1 n2 n3

The X Y Z coordinate location of the probe connection from the last linear joint position.

n4 n5 n6

The I J K vector for the probe connection.

<probe connection type>

The machine-to-probe connection type. This is typically defined as ARM.

connectprev <command command_args>
The number of joints to back up to in a machine configuration. The limit is three.

connectprev - Back up to the first previous joint.

connectprevprev - Back up to the second previous joint.

connectprevprevprev - Back up to the third previous joint.

<command command_args> - The command related to the joint type and its arguments.

ITEM:GLOBAL_DEA_7-7-5_ROTAB ARM

cadgeom 0 0 0 1 0 0 0 1 0 0 0 1 1 global_DEA_7-7-5.draw

autojoint 0 0 0 0 1 0 0 0 -700 0 y axis

cadgeom 0 0 0 0 1 0 1 0 0 0 1 0 2 global_DEA_7-7-5.draw

autojoint 0 0 0 -1 0 0 0 0 0 700 x axis

cadgeom 0 0 0 0 1 0 0 0 1 1 0 0 3 global_DEA_7-7-5.draw

autojoint 0 0 0 0 1 0 0 0 -500 0 z axis

cadgeom 0 0 0 0 -1 0 1 0 0 0 0 1 4 global_DEA_7-7-5.draw

connect 0 0 0 0 0 1 ARM

connectprevprevprev autojoint 244.147 -151.141 -586 0 0 1 0 0.01 -360 360 w axis

cylinder 0 0 0 0 0 25 500

tablecenter 0.0 0.0 25.0 0 0 1

Format of the Machine or Machine System ITEM

Each new machine configuration defined in PC-DMIS is added to the machine.dat file. It begins with the "ITEM:" command. This command contains a distinct and descriptive name and a connection identifier. This identifier specifies the type of object it can be connected to as described above. Below, you can see the available connection identifiers with a brief description.

To define a probe configuration, you must work with a top-down approach. This means that your initial starting point is x=0, y=0, z=0, and everything is drawn from that point down. Consequently, all z values should have a negative value. Also, for most items, the 0, 0, 0 location is the center of the item. This makes it possible to have both positive and negative numbers in both the X and Y directions. Positive X always moves from left to right initially, and positive Y always moves from front to back as if you were looking FROM the positive Z direction.

The only command that defines an active configuration is "connect". You must have this command in your configuration. The "connect" command defines any location where another item can be added to the current item. Each connection must include a Connection Type identifier to define the type of the machine can take. This is typically an Arm connection type.

The commands that can change the coordinate system of the configuration are "linearjoint" and "autojoint". Take special care when you use either of these commands because each command transfers the origin of the configuration to the center of the joint. Keep in mind that the first "joint" command changes the axes of the coordinate system. What was the -Z direction now becomes the +X direction, and what was the +X direction now becomes the +Z direction. Y remains the same. These commands are usually used in pairs. The joints control the motion of the machine's components.

Connection Identifier Listing

ARM
Specifies that the connection occurs directly to the machine arm. Although there are many possible connection types, the ARM connection type is used in almost all machine configurations.

This is a typical Machine Code example:

ITEM:2000_20-12-18_ARM1 ARM

cadgeom 0 0 0 1 0 0 0 1 0 0 0 1 1 2000_20-12-18.draw

tablecenter 1345 1200 -2112 0 0 1

linearjoint 0 0 0 1 0 0 0 0 0 2690 x axis

cadgeom 0 0 0 1 0 0 0 0 1 1 0 0 2 2000_20-12-18.draw

linearjoint 0 0 0 -1 0 0 0 0 -1800 0 z axis

cadgeom 0 0 0 1 0 0 1 0 0 0 0 1 3 2000_20-12-18.draw

linearjoint 0 0 0 0 1 0 0 0 0 1200 y axis

cadgeom 0 0 0 0 1 0 1 0 0 0 1 0 4 2000_20-12-18.draw

connect 0 0 0 0 0 -1 ARM