Support Center

HOWTO: Configuring Custom Devices in DexGate

Last Updated: Feb 04, 2014 12:23PM CET
Since version 4.6.0 DEXGate can obtain information from custom devices. In order to do so a json device template must be created with the format explained below. After creating a file called "yourdevice" you'll need to add a line "customdevice.yourdevice=" in your modbus configuration file followed by the modbus addresses of your custom devices. For example if your device is called myPLC and it has the modbus addres 13 you'll use this line:
customdevice.myPLC=13

Custom device JSON format:

[ device1, device2, device3]

For Modbus bridge versions lower than v5.2.10, each device is a dictionary containing:
{
    "name-ext": String
    "services": [ service1, service2, service3, ...]
}

Since Modbus bridge version v5.2.10, each device is a dictionary containing:
{

    "name-ext": String
    
"delay": Integer
    "services": [ service1, service2, service3, ...]
}

The delay param is the time in ms between each register reading.


Each service is a dictionary containing:
{
    "initial-register": Integer,
    "type-of-register": String,
    "dexcell-service": Integer,
    "operation": String,
    "operand": Float,
    "type-of-value": String
}
  1. Initial-register is the initial modbus register (a integer between 0 and 65535)
  2. Type-of-register is either: 'input' or 'holding'​
  3. Dexcell-service is the dexcell service identificator. You can find them here.
  4. Operation is either:
  • ​nothing
  • multiply
  • divide
  • sum​
It can be very useful if, for example, we want to get the data in kW instead of W. In this case you will have to set the value to "divide"

      5. Operand is the operand of the operation. For example, in the kW to W case, we would set the operand value to 1000 to set the divisor of the operation to 1000.
      6. Type of value is one of the following:
  • uint8_msb
  • int8_msb
  • uint8_lsb
  • int8_lsb
  • uint16
  • int16
  • uint32
  • int32
  • uint32inv
  • int32inv
  • uint48
  • int48
  • uint64
  • int64
  • float

Example: Circutor CVM-mini
[
    {
        "name-ext" : "",
        "services" :[
            {
                "initial-register" : 30,
                "type-of-register" : "input",
                "dexcell-service" : 401,
                "operation" : "nothing",
                "operand" : 0,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 32,
                "type-of-register" : "input",
                "dexcell-service" : 403,
                "operation" : "nothing",
                "operand" : 0,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 34,
                "type-of-register" : "input",
                "dexcell-service" : 407,
                "operation" : "nothing",
                "operand" : 0,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 66,
                "type-of-register" : "input",
                "dexcell-service" : 409,
                "operation" : "nothing",
                "operand" : 0,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 70,
                "type-of-register" : "input",
                "dexcell-service" : 406,
                "operation" : "divide",
                "operand" : 1000,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 72,
                "type-of-register" : "input",
                "dexcell-service" : 413,
                "operation" : "divide",
                "operand" : 1000,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 36,
                "type-of-register" : "input",
                "dexcell-service" : 411,
                "operation" : "divide",
                "operand" : 100,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 38,
                "type-of-register" : "input",
                "dexcell-service" : 412,
                "operation" : "divide",
                "operand" : 100,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 80,
                "type-of-register" : "input",
                "dexcell-service" : 701,
                "operation" : "divide",
                "operand" : 10,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 60,
                "type-of-register" : "input",
                "dexcell-service" : 402,
                "operation" : "divide",
                "operand" : 1000,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 62,
                "type-of-register" : "input",
                "dexcell-service" : 404,
                "operation" : "divide",
                "operand" : 1000,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 64,
                "type-of-register" : "input",
                "dexcell-service" : 408,
                "operation" : "divide",
                "operand" : 1000,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 86,
                "type-of-register" : "input",
                "dexcell-service" : 410,
                "operation" : "divide",
                "operand" : 1000,
                "type-of-value": "int32"
            }
        ]
    },
    {
        "name-ext" : "a",
        "services" :[
            {
                "initial-register" : 0,
                "type-of-register" : "input",
                "dexcell-service" : 405,
                "operation" : "divide",
                "operand" : 10,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 2,
                "type-of-register" : "input",
                "dexcell-service" : 406,
                "operation" : "divide",
                "operand" : 1000,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 4,
                "type-of-register" : "input",
                "dexcell-service" : 406,
                "operation" : "nothing",
                "operand" : 0,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 6,
                "type-of-register" : "input",
                "dexcell-service" : 403,
                "operation" : "nothing",
                "operand" : 0,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 74,
                "type-of-register" : "input",
                "dexcell-service" : 409,
                "operation" : "nothing",
                "operand" : 0,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 8,
                "type-of-register" : "input",
                "dexcell-service" : 412,
                "operation" : "divide",
                "operand" : 100,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 48,
                "type-of-register" : "input",
                "dexcell-service" : 422,
                "operation" : "divide",
                "operand" : 1000,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 54,
                "type-of-register" : "input",
                "dexcell-service" : 423,
                "operation" : "divide",
                "operand" : 1000,
                "type-of-value": "int32"
            }
        ]
    },
    {
        "name-ext" : "b",
        "services" :[
            {
                "initial-register" : 10,
                "type-of-register" : "input",
                "dexcell-service" : 405,
                "operation" : "divide",
                "operand" : 10,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 12,
                "type-of-register" : "input",
                "dexcell-service" : 406,
                "operation" : "divide",
                "operand" : 1000,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 14,
                "type-of-register" : "input",
                "dexcell-service" : 406,
                "operation" : "nothing",
                "operand" : 0,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 16,
                "type-of-register" : "input",
                "dexcell-service" : 403,
                "operation" : "nothing",
                "operand" : 0,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 76,
                "type-of-register" : "input",
                "dexcell-service" : 409,
                "operation" : "nothing",
                "operand" : 0,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 18,
                "type-of-register" : "input",
                "dexcell-service" : 412,
                "operation" : "divide",
                "operand" : 100,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 50,
                "type-of-register" : "input",
                "dexcell-service" : 422,
                "operation" : "divide",
                "operand" : 1000,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 56,
                "type-of-register" : "input",
                "dexcell-service" : 423,
                "operation" : "divide",
                "operand" : 1000,
                "type-of-value": "int32"
            }
        ]
    },
    {
        "name-ext" : "c",
        "services" :[
            {
                "initial-register" : 20,
                "type-of-register" : "input",
                "dexcell-service" : 405,
                "operation" : "divide",
                "operand" : 10,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 22,
                "type-of-register" : "input",
                "dexcell-service" : 406,
                "operation" : "divide",
                "operand" : 1000,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 24,
                "type-of-register" : "input",
                "dexcell-service" : 406,
                "operation" : "nothing",
                "operand" : 0,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 26,
                "type-of-register" : "input",
                "dexcell-service" : 403,
                "operation" : "nothing",
                "operand" : 0,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 78,
                "type-of-register" : "input",
                "dexcell-service" : 409,
                "operation" : "nothing",
                "operand" : 0,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 28,
                "type-of-register" : "input",
                "dexcell-service" : 412,
                "operation" : "divide",
                "operand" : 100,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 52,
                "type-of-register" : "input",
                "dexcell-service" : 422,
                "operation" : "divide",
                "operand" : 1000,
                "type-of-value": "int32"
            },
            {
                "initial-register" : 58,
                "type-of-register" : "input",
                "dexcell-service" : 423,
                "operation" : "divide",
                "operand" : 1000,
                "type-of-value": "int32"
            }
        ]
    }
]​

Contact Us

  • Post a Public Question
  • Email Us
  • Tel : +34 931 810 195
    Hours: 9am - 6pm CEST, Mon to Fri
    support@dexmatech.com

    Check Public holidays here

    Support
support@dexma.com
http://assets2.desk.com/
false
dexma
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete