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 that you accept these cookies being set.

AHU MODBUS TCP VALUE
#1
Hi, I try to connect to Schneider-electric Homelynx and get the airflow from an IVP AHU ventilation unit with a climactix controller.
I need to compare two values in order to control a mixing valve.
The valve opens and closes until the two values are as equal as possible.
The value is to be retrieved from a Holding register with the address 4x0055 and 4x0056.
But unfortunately I do not get any values, it seems that it does not connect or I have typed the wrong code to get the air value correctly.

Code:
require('luamodbus')
if not mb then
   mb = luamodbus.tcp()
   mb:open('192.168.201.53')
   mb:connect()
end
mb:setdebug(true)
openvalue =  grp.getvalue('6/3/1')

tfvalue = mb:readinputregisters(54)
ffvalue = mb:readinputregisters(55)
mb:close()
if tfvalue > ffvalue then
 if openvalue < 220 then
   openvalue = openvalue + 25
 end
end
if ffvalue < ffvalue then
 if openvalue > 25 then
   openvalue = openvalue - 25
 end
end

grp.write('6/3/1', openvalue)

I would be very grateful if you can help me with this problem
/Tommy
Reply


Messages In This Thread
AHU MODBUS TCP VALUE - by Elmyran - 01.11.2018, 19:42
RE: AHU MODBUS TCP VALUE - by CHOUAIBOU - 01.11.2018, 21:10
RE: AHU MODBUS TCP VALUE - by admin - 02.11.2018, 08:17

Forum Jump: