Skip to main content
Version: 2.7

Data Aggregation with FANUC

This tutorial uses FANUC device or FANUC Simulator (CNCGuide). Further an OPC-UA server is used to access the aggregated device information.

Preconditions

  1. HumanOS IoT Designer installed on development client (Check Installation Manual)

  2. Connectivity to a FANUC Control or Installation of CNCGuide from FANUC.

  3. OPC-UA Client installed on the development client

RECOMMENDATION

Examples work with UAExpert from Unified Automation. Download UAExpert here

Step 2: Create a Designer Project for FANUC

  1. Create an IoT project with HumanOS IoT Designer. Check Tutorial 1 Example for details about OPC-UA Bridges.

  2. Add a new device template for FANUC Controllers.
    In this example we use the empty device template.

    Create Template

  3. Add following nodes to the device template.

    • Group node called Controller
    • Data node called Available
    • Data node called MainProgram
    • Data node called OperationMode
    • Data node called PartCounter
    NOTE

    Use the predefined data nodes from the designer.

  4. Add a new blank data node called AggregatedDataNode. This node is used to store the aggregated data from the processor.

    • set the port match id to AggregatedDataType.
    • turn on the "Write" switch
    • set the data type to HumanOS.Kernel.DataModel.Entity.TGenericEntity, HumanOS.Kernel.Base.
    NOTE

    The "Write"-flag must be turned on, otherwise the processor can not write its data to the data node.

  5. Add the Port Matching Rule. This rule is necessary to match the data nodes with the input and output ports of the aggregator processor.

  6. Add the aggregator processor

  7. Add following input ports and corresponding match ids

    • Input port named AvailableFlag with port match id AvailableType and data type System.Int32.
    • Input port named OperationMode with port match id OperationModeType and data type System.Int32
    • Input port named ProgramName with port match id MainProgramType and data type System.String.
    • Input port named WorkpieceCount with port match id PartCounterType and data type System.Int32.
    • Output port named OutputPort with port match id AggregatedDataType and data type HumanOS.Kernel.DataModel.Entity.TGenericEntity, HumanOS.Kernel.Base.
    NOTE

    The port names are used to generate the field names of the entity.

Step 3: Create FANUC Device

  1. Create a FANUC Device within the default-Target.

    Create Device

    NOTE

    Use the address NCGUIDE! to connect to the CNCGuide simulator.

    NOTE

    Use <ip-address>:8193 to connect to a real FANUC controller using port 8193.

  2. Build and run HumanOS IoT Gateway

  3. Connect with OPC-UA client to the OPC-UA server. Use the connection address opc.tcp://localhost:4840.

    OpcUa Client

The OPC-UA provides the AggregatedDataNode as string data type containing a JSON.

Example:

{
"Id": "ec0760c6-6255-4441-8a82-cb4c0f37be97",
"AvailableFlag": "1",
"OperationMode": "1",
"ProgramName": "0",
"WorkpieceCount": "952"
}