MTConnect - Example: Integrating variables

You have the option of integrating additional variables into MindSphere.

Requirement

  • The FOCAS library must support these variables.

  • File "Devices.xml".

Creating variableA

  1. Open MindSphere.

  2. Create an asset in the "Asset Manager".

  3. Open the asset and select "MTA Asset Config".

  4. Create the variable, e.g. "VariableA".

  5. Determine the path and file name "Devices.xml" in the file "agent.cfg".
    The file is located in the following directory: C:\Program Files\Siemens\cppagent_bin\bin\agent.cfg

  6. In the example, you can see the following content of the file "agent.cfg":
    ServiceName = MTConnect Agent 840D
    BufferSize = 17
    Devices = Devices.xml
    Port = 5000  
    Adapters
    {
    Adapter_1
    {
    Host = 172.27.33.128
    Port = 7878
    }
    }  
    # Logger Configuration
    logger_config
    {
    logging_level = info
    output = file agent.log
    }

    • Line "Devices = Devices.xml": Here you determine the name and location of the xml file:
      Example: Devices = D:\MyMachine.xml

  7. Enter all changes in the file "MyMachine.xml":
    Example: The controller shall output information in the following format:
    <DataItems>
    <DataItem category="SAMPLE" id="x2" name="Xact" nativeUnits="MILLIMETER" subType="ACTUAL" type="POSITION" units="MILLIMETER"/>
    <DataItem category="SAMPLE" id="x3" name="Xcom" nativeUnits="MILLIMETER" subType="COMMANDED" type="POSITION" units="MILLIMETER"/>
    <DataItem category="SAMPLE" id="n3" name="Xload" nativeUnits="PERCENT" type="LOAD" units="PERCENT"/> <DataItem category="CONDITION" id="Xloadc" type="LOAD"/> <DataItem category="CONDITION" id="Xsystem" type="SYSTEM"/>
    </DataItems>  

    • Xact is the variable created in MindSphere, e.g. "VariableA".

    • Adjust the following line:
      <DataItem category="SAMPLE" id="x2" name="Xact" nativeUnits="MILLIMETER" subType="ACTUAL" type="POSITION" units="MILLIMETER"/>
      Change id="x2" into id="VariableA"

  8. Restart your PC to reload the configuration.

Variable for feedrate override

  1. Check whether your controller outputs this kind of variables to MindSphere.

  2. Check the configuration in the MTConnect Agent.
    You can see the following data content in the example:
    <DataItems>

    <DataItem category="EVENT" id="path2_execution" name="p2_execution" type="EXECUTION"/>

    <DataItem category="EVENT" id="path2_dry_run" name="p2_dry_run" subType="DRY_RUN" type="CONTROLLER_MODE_OVERRIDE"/>

    <DataItem category="EVENT" id="path2_single_block" name="p2_single_block" subType="SINGLE_BLOCK" type="CONTROLLER_MODE_OVERRIDE"/>

    <DataItem category="EVENT" id="path2_axis_lock" name="p2_axis_lock" subType="MACHINE_AXIS_LOCK" type="CONTROLLER_MODE_OVERRIDE"/>

    <DataItem category="EVENT" id="path2_optional_stop" name="p2_optional_stop" subType="OPTIONAL_STOP" type="CONTROLLER_MODE_OVERRIDE"/>

    <DataItem category="EVENT" id="path2_toolid" name="p2_tool_id" type="TOOL_ASSET_ID"/>

    <DataItem category="EVENT" id="path2_part_count" name="p2_part_count" type="PART_COUNT"/>

    <DataItem category="EVENT" id="path2_active_axes" name="p2_active_axes" type="ACTIVE_AXES"/>

    <DataItem category="EVENT" id="path2_program" name="p2_program" type="PROGRAM"/>

    <DataItem category="EVENT" id="path2_message" name="p2_message" type="MESSAGE"/>

    <DataItem category="EVENT" id="path2_feedrate_ovr" name="p2_feedrate_override" nativeUnits="PERCENT" subType="PROGRAMMED" type="PATH_FEEDRATE_OVERRIDE" units="PERCENT"/>

    <DataItem category="EVENT" id="path2_rapid_ovr" name="p2_rapid_override" nativeUnits="PERCENT" subType="RAPID" type="PATH_FEEDRATE_OVERRIDE" units="PERCENT"/>

    <DataItem category="EVENT" id="path2_spindle_ovr" name="p2_spindle_override" nativeUnits="PERCENT" type="ROTARY_VELOCITY_OVERRIDE" units="PERCENT"/>

    </DataItems>

  3. The configuration of the controller and MTConnect is described in the following: Feed override is sent via element <DataItem>:
    <DataItem category="EVENT" id="path2_feedrate_ovr" name="p2_feedrate_override" nativeUnits="PERCENT" subType="PROGRAMMED" type="PATH_FEEDRATE_OVERRIDE" units="PERCENT"/>

  4. Copy the content of the following ID element: id="path2_feedrate_ovr".

In MindSphere

  1. Log into MindSphere.

  2. Select the Asset Manager.

  3. Open your Asset.

  4. Select the "Advanced" tab in the "MTA Asset Config".

    • Click the "Add configuration" button.
      The selection of triggers is displayed:

    • Select the desired trigger with a mouse click.

    131232642187.png
  5. Select the time-based / cyclic trigger, for example.

    • Enter the aspect name, e.g. "Feedrateover"

    • Select the read cycle.

    • Click on "Add variable".

    131225590667.png
  6. An input line for the new variable is displayed.
    Define the variable, e.g.:

    • Name: FeedRateOver

    • Address: path2_feedrate_ovr

    • Data type: DOUBLE

    • Unit: %

  7. Click the "Save" button.