This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

Modbus Mapping
#1
Hi,

need help a little - I can't correctly read statuses from ventilation machine.  I create mapping, but some is done not correctly:

In manual:

Current mode R/W unsigned char 0 - 10
READ ONLY:
Stanby = 0,
Away = 1,
Normal = 2,
Intensive = 3,
Boost = 4,
Kitchen = 5,
Fireplace = 6,
Override = 7,
Holiday = 8,
Air quality = 9,
Off = 10
WRITE ONLY:
Away = 1,
Normal = 2,
Intensive = 3,
Boost = 4


Mine:

{
      "name": "Current Mode Statuss and Change",
      "bus_datatype": "uint8",
      "datatype": "uint16",
      "type": "register",
      "address": 4,
  "writable": 1,
      "value_custom": {
        "0": "StandBy",
        "1": "Away",
        "2": "Normal",
"3": "Intensive",
"4": "Boost",
"5": "Kitchen",
"6": "Fireplace",
"7": "Override",
"8": "Holiday",
"9": "Air Quality",
"10": "Off"
      }


Also problem to read CO2 sensor:

manual:

Air quality or humidity
(sensor 1 - B8) RO unsigned short 0 - 65535 ppm,%

Mine:

{
"name": "AirQuality sensor2 CO2",
"bus_datatype": "uint8",
"datatype": "uint8",
"type": "register",
"address": 951,
"writable": 0,
"units": "ppm",
"value_multiplier": "1"
}

What datatype and bus datatype should be??

BR,

Alexander
Reply
#2
Hi Use RTU read test with int16/uint16 and paste results for both registers.
Reply
#3
Daniel,

sorry, I not mention I use Modbus TCP mapping, and as I found test works only for RTU mode..

Alex
Reply
#4
Try via script then
Code:
require('luamodbus')
mb = luamodbus.tcp()
mb:open('192.168.0.1', 502)
mb:connect()

mb:setslave(1)

-- read from address 1000
value = mb:readregisters(1000)
log(value)
Reply
#5
(24.07.2020, 13:28)Daniel. Wrote: Try via script then
Code:
require('luamodbus')
mb = luamodbus.tcp()
mb:open('192.168.0.1', 502)
mb:connect()

mb:setslave(1)

-- read from address 1000
value = mb:readregisters(1000)
log(value)

Daniel,

thank you very much, variant int16/uint16 working as needed.

Alex
Reply


Forum Jump: