XML file structure


This topic describes the XML file structure using the Table-Table CNC-Machine definition example.

XML tags

The XML-based definition of a CNC-Machine consists of several commands (tags), each of them describes the specific item of the CNC-Machine definition tree.

Each tag is enclosed between the “<” and “>” signs.

Example:

<machine_definition>

Some XML constructions consist of opening and closing tags; the closing tag starts from the “/” symbol.

Example:

<machine_definition>

CNC-Machine definition tags

</machine_definition>

For some tags, opening and closing can be performed in the single tag.

Example:

<view_transform initialvalue="1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000" />

XML tags can contain a number of variables.

Example:

name=”Table_table”; here name is the variable name and ”Table_table” is the value. The value must be enclosed in quotation marks.

The automatically generated XML file is the following:

The order of the commands (tags) of the XML file is the same as the order of the CNC-Machine components in the CNC-Machine definition tree.

<?xml version=”1.0” encoding=”UTF-8” ?>

This string is similar for each XML file; it describes the used version of XML format and encoding.

<machine_definition>

This tag starts the CNC-Machine definition.

<machine_data name="Table_table" version="1.8" units="metric" controller="">

This tag defines the name of the CNC-Machine and the used units.

<view_transform initialvalue="1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000" />

</machine_data>


This tag starts the transformation definition. The initialvalue variable defines the used transformation matrix.

<axis id="X" type="translation" x="1.00000000" y="0.00000000" z="0.00000000" minvalue="-380.000000" maxvalue="380.000000" valuetype="cont" initial_value="0.000000">

This tag starts the X-axis definition. The <axis> tag enables you to define the type of the axis (translational/rotational), axis orientation and limits.

<geometry name="Sliding carriage" geo="table_table - x_axis-1.stl" clrr="0.00000000" clrg="0.00000000" clrb="1.00000000" alpha="0.00" reflectivity="0.00" reflectivityBitmapFileName="" objtype="geometry" />

This tag defines the geometry of the part performing X-axis movements. The name variable defines the geometry ID. The geo variable defines the STL file used for the geometry definition. The clrr, clrg and clrb variables define the RGB components of the geometry color. The values of these parameters have to be in the range from 0 to 1. The alpha variable defines the transparency of the geometry. The reflectivity variable defines the reflectivity of the geometry.

<axis id="Z" type="translation" x="0.00000000" y="0.00000000" z="1.00000000" minvalue="0.000000" maxvalue="350.000000" valuetype="cont" initial_value="350.000000">

<geometry name="Spindle unit" geo="table_table - z_axis-1.stl" clrr="0.50196081" clrg="1.00000000" clrb="1.00000000" alpha="0.00" reflectivity="0.00" reflectivityBitmapFileName="" objtype="geometry" />

The Z-axis definition.

<transform id="station_transform" initialvalue="1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000">

This tag starts the tool transformation definition. The initialvalue variable defines the used transformation matrix.

<transform id="adaptor_transform" initialvalue="1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000">

<geometry name=”tool” geo=”tool.stl” clrr=”0.00000000” clrg=”1.00000000” clrb=”0.00000000” alpha=”0.0”  reflectivity=”0.0” objtype=”tool” holderr=”0.00000000” holderg=”1.00000000” holderb=”1.00000000” />

This tag defines the transformations of the tool-adaptor unit.

<transform id="holder_transform" initialvalue="1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000">

This tag defines the holder transformation.

<geometry name="tool" geo="tool.stl" alpha="0.00" reflectivity="0.00" reflectivityBitmapFileName="" objtype="tool" cuttr="1.00000000" cuttg="1.00000000" cuttb="0.00000000" noncuttr="0.11764706" noncuttg="0.11764706" noncuttb="0.11764706" arborr="0.11764706" arborg="0.11764706" arborb="0.11764706" holderr="0.11764706" holderg="0.11764706" holderb="0.11764706" />

This tag defines the geometry of the tool (with the tool holder). The clrr, clrg and clrb variables define the RGB components of the tool color. The holderr, holderg and holderb variables define the RGB components of the tool holder color.

<geometry name="tool_tip_1" geo="tool_tip.stl" clrr="1.00000000" clrg="0.00000000" clrb="0.00000000" alpha="0.00" reflectivity="0.00" reflectivityBitmapFileName="" objtype="geometry" />

This tag defines the geometry of the tool tip.

</transform>

End tag for the holder transformation definition.

<transform id="tool_adaptor1" initialvalue="1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000" objtype="mountadapter" />

This tag defines the tool adaptor transformation. Since the station may hold more than one tool, each adaoptor is assigned with a sequential number.

</transform>

End tag for transformation definition of the tool-adaptor unit.

</transform>

End tag for the tool transformation definition.

</axis>

End tag for the Z-axis definition.

</axis>

End tag for the X-axis definition.

<axis id="Y" type="translation" x="0.00000000" y="-1.00000000" z="0.00000000" minvalue="-350.000000" maxvalue="350.000000" valuetype="cont" initial_value="0.000000">

Start Y-axis definition.

<axis id="A" type="rotation" x="-1.00000000" y="0.00000000" z="0.00000000" minvalue="-110.000000" maxvalue="110.000000" valuetype="cont" initial_value="0.000000" rzx="0.00000000" rzy="0.00000000" rzz="-30.00000000">

Start B-axis definition. For rotational axes the rzx, rzy and rzz variables define the location of the rotation base point.

<axis id="C" type="rotation" x="0.00000000" y="0.00000000" z="-1.00000000" minvalue="-1000.000000" maxvalue="1000.000000" valuetype="cont" initial_value="0.000000" rzx="0.00000000" rzy="0.00000000" rzz="0.00000000">

Start of C-axis definition.

<geometry name="Rotary table" geo="table_table - table-1.stl" clrr="0.50196081" clrg="0.50196081" clrb="1.00000000" alpha="0.00" reflectivity="0.00" reflectivityBitmapFileName="" objtype="geometry" />

Definition of the CNC-Machine part performing C-axis movements.

<transform id="fixture_transform1" initialvalue="1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000">

This tag starts the workpiece transformation definition. The initialvalue variable defines the used transformation matrix.

<transform id="fixture_adaptor1" initialvalue="1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000" objtype="mountadapter" />

This tag defines the fixture adaptor. Since the machine may have more than one table, each item is assigned with a sequential number.

</transform>

End tag for the fixture transformation definition.

<transform id="workpiece_transform1" initialvalue="1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000">

This tag defines the stock and target transformation. Since the machine may have more than one table, each item is assigned with a sequential number.

<transform id="wcs1" initialvalue="1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000" />

This tag defines the workpiece transformation.

<transform id="workpiece_adaptor1" initialvalue="1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000" objtype="mountadapter" />

This tag defines the workpiece adaptor transformation.

</transform>

End tag for the workpiece transformation definition.

</axis>

End tag for the C-axis definition.

<geometry name="tilting table" geo="table_table - b_axis-1.stl" clrr="1.00000000" clrg="0.50196081" clrb="0.00000000" alpha="0.00" reflectivity="0.00" reflectivityBitmapFileName="" objtype="geometry" />

Definition of the CNC-Machine part performing B-axis movements.

</axis>

End tag for the B-axis definition.

<geometry name="saddle" geo="table_table - y_axis-1.stl" clrr="0.00000000" clrg="0.50196081" clrb="1.00000000" alpha="0.00" reflectivity="0.00" reflectivityBitmapFileName="" objtype="geometry" />

Definition of the CNC-Machine part performing Y-axis movements.

</axis>

End tag for the Y-axis definition.

<geometry name="mh_Housing" geo="table_table - base-1.stl" clrr="0.75294125" clrg="0.75294125" clrb="0.75294125" alpha="0.00" reflectivity="0.00" reflectivityBitmapFileName="" objtype="geometry" />

Housing model definition.

<collcheck id="cc1" name="cc1" group1="Spindle unit,tool" group2="Rotary table,saddle,tilting table" />

Collision checking definition. The group1 and group2 variables enable you to define groups of CNC-Machine components.

 <magazine>

<head name="CS1">

            <transform id="Part_CS" initialvalue="1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000" />

        </head>

These tags define the current coordinate system.

<head name="TH_FX1">

            <geometry name="TH_adaptor1" geo="fixture.stl" clrr="0.11764706" clrg="0.11764706" clrb="0.11764706" alpha="0.00" reflectivity="0.00" reflectivityBitmapFileName="" objtype="fixture" />

</head>

These tags define the STL holders for the Spindle Turret. The items are numbered according to the number of tools used for a certain workpiece machining.

<head name="Target_Stock1">

Start of Target and Stock definition.

<geometry name="workpiece1" geo="workpiece1.stl" clrr="0.65098041" clrg="0.79215688" clrb="0.94117647" alpha="0.00" reflectivity="0.00" reflectivityBitmapFileName="tablereflection.bmp" objtype="workpiece" />

Workpiece geometry definition.

<geometry name="stock1" geo="stock1.stl" clrr="0.50196081" clrg="0.32156864" clrb="0.00000000" alpha="0.00" reflectivity="0.00" reflectivityBitmapFileName="" objtype="stock" />

Stock geometry definition.

<geometry name="toolpath" geo="toolpath1.asc" clrr="0.80000001" clrg="0.80000001" clrb="0.80000001" alpha="0.00" reflectivity="0.00" reflectivityBitmapFileName="" objtype="toolpath" />

Tool path definition.

</head>

End of Target and Stock definition.

<head name="fxt1">

Start tag for fixture defined in the setup.

<geometry name="fixture1" geo="fixture.stl" clrr="0.11764706" clrg="0.11764706" clrb="0.11764706" alpha="0.00" reflectivity="0.10" reflectivityBitmapFileName="tablereflection.bmp" objtype="fixture" />

</head>

End tag for fixture defined in the setup.

</magazine>

End tag for the magazine definition.

</machine_definition>

End tag for the CNC-Machine definition.

 

Related Topics

  1. CNC-machine definition