Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Releases: kbeaugrand-org/iotedge-plc-publisher

v1.2.0

22 Oct 17:45
be3412f
Compare
Choose a tag to compare

What's Changed

  • Bump actions/setup-dotnet from 3.0.0 to 3.0.1 by @dependabot in #9
  • Bump actions/setup-dotnet from 3.0.1 to 3.0.2 by @dependabot in #13
  • Bump docker/build-push-action from 3.1.1 to 3.2.0 by @dependabot in #12
  • Bump docker/login-action from 2.0.0 to 2.1.0 by @dependabot in #11

Full Changelog: v1.1.0...v1.2.0

v1.1.0

05 Oct 15:54
65f1a08
Compare
Choose a tag to compare

What's Changed

  • Bump actions/setup-dotnet from 2 to 3.0.0 by @dependabot in #8
  • Run polling thread in high priority + trigger send thread when data a… by @kbeaugrand in #10

Full Changelog: v1.0.0...v1.1.0

v1.0.0

20 Sep 10:49
44b70be
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.0.7...v1.0.0

v0.0.7

20 Sep 07:41
Compare
Choose a tag to compare

Full Changelog: v0.0.5...v0.0.7

v0.0.6

20 Sep 07:37
Compare
Choose a tag to compare

Full Changelog: v0.0.5...v0.0.6

v0.0.5

20 Sep 07:09
Compare
Choose a tag to compare

Full Changelog: v0.0.4...v0.0.5

v0.0.4

19 Sep 12:58
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.0.3...v0.0.4

v0.0.3

19 Sep 08:47
b423c31
Compare
Choose a tag to compare

What's Changed

  • Transform and batch messages in separate thread by @kbeaugrand in #2

Full Changelog: v0.0.2...v0.0.3

v0.0.2

19 Sep 06:51
475a463
Compare
Choose a tag to compare
v0.0.2 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: v0.0.1...v0.0.2

v0.0.1

19 Sep 06:24
Compare
Choose a tag to compare

IoT Edge PLC Publisher

This project aims to provide an Azure IoT Edge module for publishing PLC Tags values to Azure IoT Edge and Azure IoT Hub.

Usage

To use the module, you need to deploy the following Azure IoT Edge module:

 "PlcPublisher": {
        "restartPolicy": "always",
        "settings": {
            "image": "ghcr.io/kbeaugrand-org/azure-iotedge-plc-publisher:latest",
            "createOptions": "{}"
        },
        "status": "running",
        "type": "docker"
    }

Edge Hub routing

    "routes": {
        "PlcPublisherToUpstream": "FROM /messages/modules/PlcPublisher/* INTO $upstream",
    },

Supported PLCs

It can be one of the following values:

  • ControlLogix: Control Logix-class PLC
  • Plc5: PLC/5 PLC
  • Slc500: SLC 500 PLC
  • LogixPccc: Control Logix-class PLC using the PLC/5 protocol
  • Micro800: Micro 800 PLC
  • MicroLogix: Micro Logix PLC
  • Omron: Omron PLC

Supported Tag Types

It can be one of the following values:

  • BOOL: Boolean
  • SINT: Signed 8-bit integer
  • INT: Signed 16-bit integer
  • DINT: Signed 32-bit integer
  • LINT: Signed 64-bit integer
  • LREAL: Signed 64-bit floating point
  • REAL: Signed 32-bit floating point
  • STRING: String
  • ARRAY_BOOL: Array of boolean
  • ARRAY_SINT: Array of signed 8-bit integer
  • ARRAY_INT: Array of signed 16-bit integer
  • ARRAY_DINT: Array of signed 32-bit integer
  • ARRAY_LINT: Array of signed 64-bit integer
  • ARRAY_LREAL: Array of signed 64-bit floating point
  • ARRAY_REAL: Array of signed 32-bit floating point
  • ARRAY_STRING: Array of string

Direct Methods

This module exposes the following direct methods:

  • ListTags: List all the tags available in the PLC.
  • ListUdtTypes: List all the UDT types available in the PLC.
  • ListPrograms: List all the programs available in the PLC.
  • ReadTag: Read a tag value.
  • ReadArray: Read an array value.

Payloads

For the ListTags, ListUdtTypes and ListPrograms methods, the payload is a JSON object with the following structure:

{
    "gateway": "`<the gateway ip or hostname>`",
    "path": "<the path to the PLC>",
    "plcType": "<the PLC type>",
}

For ReadTag, the payload is a JSON object with the following structure:

{
    "gateway": "`<the gateway ip or hostname>`",
    "path": "<the path to the PLC>",
    "plcType": "<the PLC type>",
    "tag": "<the tag name>",
    "tagType": "<the tag type>"
}

For ReadArray, the payload is a JSON object with the following structure:

{
    "gateway": "`<the gateway ip or hostname>`",
    "path": "<the path to the PLC>",
    "plcType": "<the PLC type>",
    "tag": "<the tag name>",
    "tagType": "<the tag type>",
    "arrayLength": "<the array size>",
}

Module Twin

The module accepts the following properties in the module twin:

{
    "properties": {
        "desired": {
            "tags": [
                "gateway": "`<the gateway ip or hostname>`",
                "path": "<the path to the PLC>",
                "plcType": "<the PLC type>",
                "tag": "<the tag name>",
                "tagType": "<the tag type>",
                "pollingInterval": "<the polling interval in milliseconds>"
                "arrayLength": "<OPTIONAL - the array size if reading an array>",
            ]
        }
    }
}

Credits

This project leverages on https://github.com/libplctag/libplctag.NET to provide connectivity to the PLC devices.

License

This project is licensed under the MIT License (see ./LICENSE.md) for more details.