Adapters

Adapters configuration

Purpose: Each Adapter is configured through its relevant Module Twin Desired Properties JSON in Azure IoT Hub. Each adapter expects its own specific set properties and some common properties. These configurations can be found and changed through Upkip Administration or Azure IoT Hub Devices. Different adapters are implemented as Modules in IoT devices running on Windows machines or Modules in IoT Edge devices running on Linux machines in manufacturer premises.

Adapters Configuration in Upkip Administration

Precondition: Log in Upkip Administration with Microsoft user. Select Organization. Select Gateways. From TAB Modules, select some module and press Edit.

Figure 1: Upkip Gateways Device modules configuration

User can make changes only in Desired configuration and click Save button.

Desired configuration is filled by developers.

Reported configuration is returned by Azure.

The both configurations is expected to be the same.

Adapters Configuration in IoT Hub

Precondition: Log in azure portal with registered user. Select IoT Hub.

Figure 2: IoT Hub - IoT Edge device

Select IoT devices à the list of devices is shown.

Click on some device:

When clicking on some module there is opened Module Identity Details page.

Figure 3: IoT Hub - IoT Edge device - Module Details

When clicking on Module Identity Twin

Figure 4: IoT Hub - IoT Edge device - Module Identity Twin

Adapters as Windows modules

Purpose: Adapters are implemented as windows IoT Hub/IoT devices/Modules. They are used to support connection and communication with corresponding type of machines, equipment or protocols. They run on Windows machines in the manufacturer premises.

Below are described configurations for the following adapters implemented as IoT Hub/IoT devices/Windows Modules:

Each Windows adapter contains:

{
  "ConnectionRetryInterval": 1,
  "ConnectionRetryAttempts": 1,
  "ConnectionRetryMaxInterval": 5
}
  "SensorDataItemsToMonitor": {
    "M1": "Name1,Name2,…"
  }
{
  "TagDownsampling": {
    "1": {
      "Pattern": "<regex>",
      "TimeInterval": "0.00:00:20",
      "Percent": 0.6,
      "Absolute": 10,
      "SpikePercent": 50,
      "RegEx": "<regex>"
    }
  }
}

Adapter for Heidenhain machines

Purpose: To support communication with Heidenhain machines (a third-party license is required)

Configuration JSON:

"desired": {
    "IPAddress": "192.168.1.98",
    "Port": "19000",
    "Devices": {
        "M79": "79;19200;8;N;1;Heidenhain 79;192.168.1.51;19000;0;localhost;3;0;none;none;1;heidenhain.dll",
        "M211": "211;19200;8;N;1;Heidenhain 211;192.168.1.49;19000;0;localhost;2;0;none;none;1;heidenhain.dll",
        "M45": "45;19200;8;N;1;Heidenhain 45;192.168.1.98;19000;0;localhost;1;0;none;none;1;heidenhain.dll"
    },
    "LicenseKey": "1234567890acbdefghijklmnopqrstuvwxyz"
}

Description:

Adapters for Fanuc Controllers

Purpose: Adapters support communication with Fanuc controllers by different interfaces - MTConnect protocol or by using Fanuc Robots interface SDK.

Adapter for Fanuc Controller using Fanuc Robot Interface SDK

Purpose: To support communication with Fanuc Controllers by using Fanuc Robots Interface SDK.

Configuration JSON:

"desired": {
    "TimeZone": "E. Europe Standard Time",
    "Robots": {
        "R218": {
            "HostName": "192.168.1.86",
            "Interval": 2000,
            "MonitorAlarms": true,
            "SysVariables": "$FAST\_CLOCK:int",
            "RegNumerics": "1,2,3,4,5,...",
            "RegStrings": "1,2,3,4,5,...",
            "MonitorProgram": true
        }
    }
}

Description:

Fanuc Focas MTConnect Adapter

Purpose: To support communication with Fanuc Controllers by MT Connect protocol

Configuration JSON:

"desired": {
    "Machines": {
        "M1": {
            "ConfigFilename": "adapter.ini",
            "AdapterArguments": "debug <configFilename>",
            "Port": "7801",
            "MachineIP": "192.168.1.83",
            "MachinePort": "8193",
            "SspeedOvr": "30",
            "Fovr": "12"
        }
    }
}

Description:

Adapter for MTConnect protocol

Purpose: To support communication with machines by MTConnect protocol. MTConnect Adapter supports connection with machine and collect data. MTConnect Agent supports connection with set of adapters and buffers data. MTConnectController collects data received from the agent and transfers data to cloud.

Adapter MTConnect Agent

Purpose: Support connection with machine, collect and buffers data.

Configuration JSON:

"desired": {
    "configFilename": "agent.cfg",
    "agentArguments": "debug <configFilename>",
    "BufferSize": "20",
    "MaxAssets": "1025",
    "CheckpointFrequency": "1000",
    "DevicesXmlFileName": "Devices.xml",
    "Port": "5000",
    "ReconnectInterval": "1000",
    "IgnoreTimestamps": "true",
    "Adapters": {
      "M1": {
        "Host": "127.0.0.1",
        "Port": "7886"
      }
    }
}  

Description:

Adapter MTConnect Collector

Purpose: Receive and buffer data from MTConnect agent and transfer data to cloud.

Configuration JSON:

"desired": {
    "mtcAgentSockets": {
        "main": {
            "URL": "http://127.0.0.1:5000/",
            "PollIntervalMS": 1000,
            "DataItemsToRequest": 10000
        }
    },
    "dataItemsToMonitor": {
        "M1": "path\_position,block,line,f\_command,"
    },
    "ErrorSplit": {
        "Heidenhain": {
            "BaseErrorDataItem": "ERRTX",
            "BaseErrorDataItemClearValues": "None,NONE,Unavailable,MAGAZINE IS RUNNING",
            "SplitByDataItem": "ERRCL",
            "SplitByDataItemClearValues": "0",
            "OutputDataItems": {
                "ERRTX\_warning": {
                    "SplitValues": "2,3,4,5,6,7"
                },
                "ERRTX\_info": {
                    "SplitValues": "8"
                }
            }
        }
    }
}

Description:

Adapter for OPC protocols

Purpose: To support communications with machines by OPC (OLE for Process Control) protocols.

Adapter for OPC Classic protocol

Purpose: To support communications with machines by OPC (Classic) protocol.

Configuration JSON:

"desired": {
    "servers": {
        "M1": {
            "UrlNoProtocol": "OPC\_SERVER/server.name.1/{013ge92f-96cd-12d3-87f2-4402041ff057}",
            "SamplingRate": 500,
            "AlarmsAndEventsFilters": {
                "LowSeverity": 1,
                "HighSeverity": 1000,
                "Qualities": "\*",
                "Types": "\*",
                "Sources": "\*"
            },
            "ConnectAeClient": false,
            "SendFalseBooleans": true,
            "SamplingRateSpecified": true
        }
    }
}

Description:

Adapter for OPC UA protocol

Purpose: To support communication with machines through OPC UA (Unified Architecture) protocol.

Configuration JSON:

"desired": {
    "servers": {
        "R1": {
            "DiscoveryUrl": "opc.tcp://192.168.1.120:4840",
            "SessionChannelTimeout": 30000,
            "PublishingInterval": 500,
            "KeepAliveCount": 10,
            "LifetimeCount": 30,
            "PublishingEnabled": true,
            "UserName": "",
            "Password": "",
            "SamplingInterval": -1,
            "QueueSize": 1,
            "DiscardOldest": true,
            "OverrideServerTime": true,
            "SecurityPolicy": "None",
            "HandshakeTags": {
                "0134\_WP\_DataPresent": {
                    "Enabled": true,
                    "ServerValue": "True",
                    "ClientValue": "False",
                    "DataType": "System.Boolean",
                    "ReadTags": "3:name1,3:name2,…"
                }
            },
            "BitwiseTags": {
                "0004\_Safety\_State": {
                    "Bits": {
                        "0": {
                            "Type": "Safety\_DoorLeftOpen"
                        },
                        "1": {
                            "Type": "Safety\_DoorRightOpen"
                        },
                        "2": {
                            "Type": "Safety\_DoorWeldCelllOpen"
                        },
                        "3": {
                            "Type": "Safety\_LightgridTables"
                        },
                        "4": {
                            "Type": "Safety\_RobotInAutoPos"
                        },
                        "5": {
                            "Type": "Safety\_EstopLeftOpPanel"
                        },
                        "6": {
                            "Type": "Safety\_EstopRightOpPanel"
                        },
                        "7": {
                            "Type": "Safety\_EstopRobot"
                        },
                        "8": {
                            "Type": "Safety\_EstopWeld"
                        }
                    }
                }
            },
            "EnableInternalLogs": false,
            "HandshakeRetryDelay": "10000"
        }
    }
}

Description:

BitwiseTags defines how to identify separate bits in tags which contain bitwise values

Adapter for Siemens S7 controllers

Purpose: To support communication with SiementsS7 controllers.

Configuration JSON:

"desired": {
    "Machines": {
        "PLC-Process1": {
            "SensorID": "PLC-Process1",
            "CPUType": "S71500",
            "IPAddress": "172.16.2.110",
            "Port": 102,
            "Rack": 0,
            "Slot": 1,
            "Tags": {
                "MachineNumber": "DB1011.DBW12",
                "Spindle": "DB1011.DBW124"
            },
            "TimerIntervalSec": 1
        }
    }
}

Description:

There is also developed adapter for RPC Sinumerik interfaces for Siemens controllers.

Adapter for ABB Robot controllers

Purpose: To support communication with ABB robots controllers.

Configuration JSON:

"desired": {
    "Robots": {
        "Robot1": {
            "IP": "192.168.1.95",
            "Interval": 5000,
            "Monitor": {
                "State": true,
                "OperatingMode": true,
                "ExecutionStatus": true,
                "ExecutionCycle": true,
                "IOSignals": "Start,Stop,MotorsOFF,MotorsON",
                "EventLogTypes": "Error,Warning,Information",
                "ActiveMechanicalUnitProperties": "\*"
            },
            "OverrideServerTime": true
        }
    }
}

Description:

Adapter for Balluff controllers

Purpose: To support communication with Balluff controllers

Configuration JSON:

"desired": {
    "controllers": {
        "COM3": {
            "Interface": "Serial",
            "Port": "COM3",
            "SerialParity": "None",
            "Interval": 100,
            "HeadToSensorID": {
                "1": "COM3-Head1",
                "2": "COM3-Head2",
                "3": "COM3-Head3",
                "4": "COM3-Head4"
            }
        }
    }
}

Description:

Adapter for SQL DB communication

Purpose: To support communication with SQL databases.

Configuration JSON:

"desired": {
    "TimerTickMs": 5000,
    "Clients": {
        "DMG\_MORI\_Messenger\_V2": {
            "ConnectionString": "<connection\_string>",
            "ProgressFileName": "progress.txt",
            "Entries": {
                "DMG": {
                    "SensorID": "DMG",
                    "Queries": {
                        "1": {
                            "Sql": "SELECT \* FROM [db].[dbo].[Table] WHERE EntryType = 4 AND id > {0} ORDER BY id DESC",
                            "Items": {
                                "Timestamp": "Timestamp",
                                "Parameter": "ERRNO",
                                "ExtendedParameter": "ERRTX"
                            },
                            "Identifier": "Id"
                        }
                    }
                }
            }
        }
    }
}

Description:

Adapters as Linux modules

Purpose: Adapters are implemented as IoT Hub/IoT Edge devices/Modules. They are used to support connection and communication with corresponding type of machines, equipment or protocols. They run on Linux machines in the manufacturer premises.

Below are described configurations for the following adapters implemented as IoT Edge devices/Linux modules:

Each Linux adapter contains:

"ConnectionRetryInterval": 1,
"ConnectionRetryAttempts": 1,
"ConnectionRetryMaxInterval": 5
  "SensorDataItemsToMonitor": {
    "M1": "Name1,Name2,…"
  }
{
  "TagDownsampling": {
    "1": {
      "Pattern": "<regex>",
      "TimeInterval": "0.00:00:20",
      "Percent": 0.6,
      "Absolute": 10,
      "SpikePercent": 50,
      "RegEx": "<regex>"
    }
  }
}

Adapter for Modbus protocol

Purpose: To support communication with Modbus protocol.

Configuration JSON:

"desired": {
    "servers": {
        "Legiomix": {
            "Port": "/dev/ttyS0",
            "SlaveID": 1,
            "BaudRate": 9600,
            "Parity": "Even",
            "StopBits": "One",
            "RegTags": {
                "0": "model",
                "1": "id\_modbus",
                "2": "T1",
                "3": "T2",
                "4": "id\_number",
                "5": "serial\_number",
                "6": "nc\_status"
            },
            "BitwiseTags": {
                "8": {
                    "Bits": {
                        "0": {
                            "Type": "IN1\_STATUS"
                        },
                        "1": {
                            "Type": "IN2\_STATUS"
                        },
                        "8": {
                            "Type": "OUT1\_STATUS"
                        },
                        "9": {
                            "Type": "OUT2\_STATUS"
                        },
                        "10": {
                            "Type": "OUT3\_STATUS"
                        }
                    }
                }
            },
            "RegistryRanges": {
                "1": {
                    "StartingAddress": 0,
                    "NumberOfValues": 15
                },
                "2": {
                    "StartingAddress": 1000,
                    "NumberOfValues": 31
                }
            }
        }
    }
}

Description:

Adapter for OPC UA protocol

Purpose: To support communication with machines through OPC UA (Unified Architecture) protocol.

Configuration JSON and description can be found under the same adapter on Windows Gateway. To OPC UA protocol adapter.

Adapters for MTConnect protocol

Purpose: To support communication with machines by MTConnect protocol. MTConnect Adapter supports connection with machine and collect data. MTConnect Agent supports connection with set of adapters and buffers data. MTConnect Controller collects data received from the agent and transfers data to cloud.

Configuration JSON and description can be found under the same adapter on Windows Gateway.

To adapters for MTConnect protocol

Adapter MTConnect Agent

Purpose: To support connection with machine, collect and buffers data.

Configuration JSON and description can be found under the same adapter on Windows Gateway.

Adapter MTConnect Collector

Purpose: Receive and buffer data from MTConnect agent and transfer data to the cloud.

Configuration JSON and description can be found under the same adapter on Windows Gateway.

Adapter for SAPB1 ERP communication

Purpose: To support communication with SAP Business 1 ERP system.

Configuration JSON:

"desired": {
 "sapB1ConnectionSring": "<connection\_string>",
 "sapB1dbName": "SBO\_Live",
 "organizationId": "2",
 "syncDaysBack": "5000",
 "messageRows": 20,
 "operationsWithoutProgress": "OperationName",
 "departmentMapping": "Drei=Turning,Fres=Milling",
 "timeZoneId": "Europe/Oslo"
}

Description: