Logic Machine Forum
Modbus UTY-VMGX - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10)
+--- Thread: Modbus UTY-VMGX (/showthread.php?tid=4794)



Modbus UTY-VMGX - SevenP - 01.06.2023

Hi!

Recently I have started implementing fujitsu AC gateway UTY-VMGX by modbus TCP protcole. Project will consist of 8 indoor units and I am wondering if my approach (which I have verified for one unit) is LogicMachine's correct and can be optimised?

In attachment on page 16 is specified how to send control commands.
As it is stated in manual, addresses for reading and control temperature setpoint require some calculation. For these items, I have linked the objects from the modbus profile to the virtual addresses. Changes to temperature setpoint from KNX are passed by event based script as below. And changes from modbus gateway are handled by profile and "value_multiplier" parameter.

Code:
function setBit(value, bitnr)
local mask = bit.lshift(1, bitnr)
return bit.bor(value, mask)
end

-- get KNX temperature set value
knxVal = event.getValue()

-- value calculation to modbus gateway
knxVal = knxVal * 4

modbusVal = bit.lshift(knxVal, 1)
modbusVal = setBit(modbusVal, 0)

-- send value to virtual address
grp.write('32/2/1', value)

Another question is how to handle "Airflow setting" which should be:
value 3 for Low setting, 4 for Med, 5 for High etc.
From KNX controller there are different values for each fan step setting (eg. starting from 0 not 3), is there any way to do such simple conversion instead of writing a event based script for each KNX group address?

Best regards


RE: Modbus UTY-VMGX - Daniel - 01.06.2023

All possible options are listed here, the rest must be done by script.
https://openrb.com/docs/modbus.htm