Hey,
I tried to find some answers here in the forum but without sucsess.
I am reading a value from a dosingpump. I manage to get the raw (DEZ) value. For example as in the image below: 26032. But this value is somehow scaled to another value, which is correctly displayed on the pump: The pump display here 878 ml/ h, which is the corret value
Here is a small image from the software of the dosing pump:
Here is my flow:
[
{
"id": "40353ef1cf303d73",
"type": "modbus-flex-getter",
"z": "776cf9194f6008fb",
"name": "",
"showStatusActivities": false,
"showErrors": false,
"logIOActivities": false,
"server": "0e3ec676f3e39293",
"useIOFile": false,
"ioFile": "",
"useIOForPayload": false,
"emptyMsgOnFail": false,
"keepMsgProperties": false,
"x": 560,
"y": 240,
"wires": [
[
"57de69c1fdcc80b9",
"1a39356543e7b1ea"
],
[]
]
},
{
"id": "57de69c1fdcc80b9",
"type": "modbus-response",
"z": "776cf9194f6008fb",
"name": "",
"registerShowMax": 20,
"x": 570,
"y": 280,
"wires": []
},
{
"id": "eb5d2c0cd8ba7a73",
"type": "function",
"z": "776cf9194f6008fb",
"name": "R_207_Batchvolume",
"func": "msg.payload =\n{ value: msg.payload, \n'fc': 3, \n'unitid': 0, \n'address': 110, \n'quantity':1 \n \n} ;\nreturn msg",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 320,
"y": 280,
"wires": [
[
"40353ef1cf303d73"
]
]
},
{
"id": "e92a8786fb25e7d8",
"type": "inject",
"z": "776cf9194f6008fb",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "2",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 130,
"y": 280,
"wires": [
[
"eb5d2c0cd8ba7a73"
]
]
},
{
"id": "3990b57a3e45d703",
"type": "debug",
"z": "776cf9194f6008fb",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1070,
"y": 240,
"wires": []
},
{
"id": "1a39356543e7b1ea",
"type": "buffer-parser",
"z": "776cf9194f6008fb",
"name": "",
"data": "payload",
"dataType": "msg",
"specification": "spec",
"specificationType": "ui",
"items": [
{
"type": "uint16be",
"name": "Batchvolume",
"offset": 0,
"length": 1,
"offsetbit": 0,
"scale": "0",
"mask": ""
}
],
"swap1": "",
"swap2": "",
"swap3": "",
"swap1Type": "swap",
"swap2Type": "swap",
"swap3Type": "swap",
"msgProperty": "payload",
"msgPropertyType": "str",
"resultType": "keyvalue",
"resultTypeType": "return",
"multipleResult": false,
"fanOutMultipleResult": false,
"setTopic": true,
"outputs": 1,
"x": 830,
"y": 240,
"wires": [
[
"3990b57a3e45d703"
]
]
},
{
"id": "0e3ec676f3e39293",
"type": "modbus-client",
"name": "CIM500",
"clienttype": "tcp",
"bufferCommands": true,
"stateLogEnabled": false,
"queueLogEnabled": false,
"tcpHost": "10.240.6.39",
"tcpPort": "502",
"tcpType": "DEFAULT",
"serialPort": "/dev/ttyUSB",
"serialType": "RTU-BUFFERD",
"serialBaudrate": "9600",
"serialDatabits": "8",
"serialStopbits": "1",
"serialParity": "none",
"serialConnectionDelay": "100",
"serialAsciiResponseStartDelimiter": "0x3A",
"unit_id": "1",
"commandDelay": "1",
"clientTimeout": "1000",
"reconnectOnTimeout": true,
"reconnectTimeout": "2000",
"parallelUnitIdsAllowed": true
}
]
I am asking myself if it is some buffer parser related problem or did the company scaled this value with a function?
Anyone an idea?
Thank you