Editing CFG files with KinematicsDesign

Application

KinematicsDesign allows editing CFG files in the control. In this process, KinematicsDesign displays the fixtures graphically and thus supports troubleshooting and removal of errors.

Description of function

When opening a CFG file in the control, the control makes KinematicsDesign available as a selection item.

KinematicsDesign offers the following functions:

  • Editing of fixtures with graphic support
  • Feedback in case of incorrect entries
  • Integration of transformations
  • Addition of new elements
    • 3D model (M3D or STL files)
    • Cylinder
    • Prism
    • Cuboid
    • Truncated cone
    • Hole

You can integrate both STL files and M3D files into CFG files more than once.

Syntax in CFG files

The following syntax elements are used within the various CFG functions:

Function

Description

key:= ""

Name of the function

dir:= ""

Direction of a transformation (e.g., X)

val:= ""

Value

name:= ""

Name displayed if a collision occurs (optional input)

filename:= ""

File name

vertex:= [ ]

Position of a cube

edgeLengths:= [ ]

Dimensions of a cuboid

bottomCenter:= [ ]

Center of a cylinder

radius:=[ ]

Radius of a cylinder

height:= [ ]

Height of a geometric object

polygonX:= [ ]

Line of a polygon in X

polygonY:= [ ]

Line of a polygon in Y

origin:= [ ] 

Starting point of a polygon

Each element is assigned its own key. A key must be unambiguous and unique, meaning that it must not occur more than once in the description of a fixture. Based on the key, the elements are referenced to each other.

The following functions are available if you wish to use CFG functions to describe a fixture in the control:

Function

Description

CfgCMOMesh3D(key:="Fixture_body",
filename:="1.STL",name:="")

Definition of fixture component

 
Tip

You can also enter an absolute path for the defined fixture component (e.g., TNC:\nc_prog\1.STL)

CfgKinSimpleTrans(key:="XShiftFixture",
dir:=X,val:=0)

Shift in X axis

Inserted transformations, such as a shift or rotation, are effective for all of the elements following in the kinematic chain.

CfgKinSimpleTrans(key:="CRot0",
dir:=C,val:=0)

Rotation in C axis

CfgCMO ( key:="fixture",
primitives:= ["XShiftFixture","CRot0",
"Fixture_body"],
active :=TRUE, name :="")

Describes all of the transformations contained in the fixture. The parameter active := TRUE activates collision monitoring for the fixture.

The CfgCMO contains collision objects and transformations. The fixture is combined based on the arrangement of the different transformations. Here, the transformation XShiftFixture shifts the center of rotation of the transformation CRot0.

CfgKinFixModel(key:="Fix_Model",
kinObjects:=["fixture"])

Fixture designation

CfgKinFixModel contains one or more CfgCMO elements.

Geometric shapes

You can add simple geometric objects to your collision object either directly in the CFG file or by using KinematicsDesign.

All integrated geometric shapes are subelements of the higher-order CfgCMO, in which they are listed as primitives.

The following geometric objects are available:

Function

Description

CfgCMOCuboid ( key:="FIXTURE_Cub", 
vertex:= [ 0, 0, 0 ], 
edgeLengths:= [0, 0, 0], 
name:="" )

Definition of a cuboid

CfgCMOCylinder ( key:="FIXTURE_Cyl", 
dir:=Z, bottomCenter:= [0, 0, 0], radius:=0, height:=0, name:="")

Definition of a cylinder

CfgCMOPrism ( key:="FIXTURE_Pris_002", 
height:=0,  polygonX:=[],  polygonY:=[], 
name:="",  origin:= [ 0,  0,  0 ] )

Definition of a prism

A prism is described by entering the height and several polygonal lines.

Creating a fixture entry with a collision object

The content below describes the procedure with KinematicsDesign opened.

To create a fixture entry with a collision object:

    1. Select Insert chucking equipment
    2. KinematicsDesign creates a new fixture entry within the CFG file.
    3. Enter a keyname for the fixture (e.g., clamping jaw)
    4. Confirm your input
    5. KinematicsDesign loads the input.

    1. Move cursor down one level

    1. Select Insert collision object
    2. Confirm your input
    3. KinematicsDesign creates a new collision object.

    Defining geometric shapes

    KinematicsDesign allows you to define various geometric shapes. You can construct simple fixtures by combining several geometric shapes.

    To define a geometric shape:

    1. Create a fixture entry with a collision object

    1. Select the cursor key beneath the collision object

    1. Select the desired geometric shape (e.g., a cuboid)
    2. Define the position of the cuboid (e.g., X = 0, Y = 0, Z = 0)
    3. Define the dimensions of the cuboid (e.g., X = 100, Y = 100, Z = 100)
    4. Confirm your input
    5. The control displays the defined cuboid in the graphic.

    Integrating 3D models

    The integrated 3D models must meet the requirements of the control.

    To integrate a 3D model as a fixture:

    1. Create a fixture entry with a collision object

    1. Select the cursor key beneath the collision object

    1. Select Insert 3D model
    2. The control opens the Open File window.
    3. Select the desired STL or M3D file
    4. Press OK
    5. The control integrates the selected file and displays the file in the graphic window.

    Fixture placement

    You can place the integrated fixture at any position (e.g., for correcting the orientation of an external 3D model). For this purpose, insert transformations for all axes you wish to use.

    To position a fixture with KinematicsDesign:

    1. Define the fixture

    1. Select the cursor key beneath the element to be positioned

    1. Select Insert transformation
    2. Enter a key name for the transformation (e.g., Z shift)
    3. Select the axis for the transformation (e.g., Z)
    4. Select the value for the transformation (e.g., 100)
    5. Confirm your input
    6. KinematicsDesign inserts the transformation.
    7. KinematicsDesign depicts the transformation in the graphic.

    Notes

    • If one of the transformations contains the ? character in the key, you can enter the value of the transformation within the Combine fixtures function. This allows easy positioning of clamping jaws, for example.
    • Combining fixtures in the New Fixture window

    • As an alternative to using KinematicsDesign, you can also create fixture files directly from the CAM system or by using the appropriate code in a text editor.

    Example

    The example below describes the syntax of a CFG file for a vise with two movable jaws.

    Files used

    Various STL files are used to describe the vise. Since the jaws of the vise are dimensionally identical, they are defined using the same STL file.

    Code

    Explanation

    CfgCMOMesh3D 
    (key:="Fixture_body",
    filename:="vise_47155.STL",
    name:="")

    Body of the vise

    CfgCMOMesh3D 
    (key:="vise_jaw_1",
    filename:="vise_jaw_47155.STL",
    name:="")

    First jaw of the vise

    CfgCMOMesh3D 
    (key:="vice_jaw_2",
    filename:="vise_jaw_47155.STL",
    name:="")

    Second jaw of the vise

    Definition of jaw opening width

    In this example, the opening width of the vise is defined using two mutually dependent transformations.

    Code

    Explanation

    CfgKinSimpleTrans
    (key:="TRANS_opening_width",
    dir:=Y, val:=-60)

    Jaw opening width of the vise in Y direction: 60 mm

    CfgKinSimpleTrans
    (key:="TRANS_opening_width_2",
    dir:=Y, val:=30)

    Position of the first jaw of the vise in Y direction: 30 mm

    Positioning of the fixture within the working space

    The defined fixture components are positioned using various transformations.

    Code

    Explanation

    CfgKinSimpleTrans (key:="TRANS_X", dir:=X, 
    val:=0) CfgKinSimpleTrans (key:="TRANS_Y", dir:=Y,
    val:=0) CfgKinSimpleTrans (key:="TRANS_Z", dir:=Z,
    val:=0) CfgKinSimpleTrans (key:="TRANS_Z_vise_jaw",
    dir:=Z, val:=60) CfgKinSimpleTrans (key:="TRANS_C_180",
    dir:=C, val:=180) CfgKinSimpleTrans (key:="TRANS_SPC", dir:=C,
    val:=0) CfgKinSimpleTrans (key:="TRANS_SPB", dir:=B,
    val:=0) CfgKinSimpleTrans (key:="TRANS_SPA", dir:=A,
    val:=0)

    Positioning of the fixture components

    In this example, a rotation by 180° is inserted for rotating the defined jaw of the vise. This is necessary because the same initial model is used for both jaws of the vise.

    The rotation inserted applies to all subsequent components in the transformation chain.

    Description of the fixture

    You need to combine all objects and transformations in the CFG file in order to ensure that the fixture is correctly depicted in the simulation.

    Code

    Explanation

    CfgCMO (key:="FIXTURE", primitives:= [ 
    "TRANS_X", 
    "TRANS_Y", 
    "TRANS_Z", 
    "TRANS_SPC", 
    "TRANS_SPB", 
    "TRANS_SPA",     
    "Fixture_body", 
    "TRANS_Z_vise_jaw", 
    "TRANS_opening_width_2", 
    "vicse_jaw_1", 
    "TRANS_opening_width", 
    "TRANS_C_180", 
    "vise_jaw_2" ], active:=TRUE, name:="") 

    Combining the transformations and objects contained in the fixture

    Fixture designation

    You need to assign a designation to the combined fixture.

    Code

    Explanation

    CfgKinFixModel (key:="FIXTURE1",
    kinObjects:=["FIXTURE"])

    Designation of the combined fixture