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.

Modbus TCP/IP
#1
Hi, first time to set up a communication Modbus TCP/IP in a HomeLynk.
KNX precens detectors should send a 1bit (1/0) to the ventilation system via Modbus, how should i start ?
Ventilation system is Modbus slave, and have IP 172.xx.xx.xxx, ID 240, and port 502

This is a script from ventilation system: 

  //mbreg[10001] = 0
//end
//Gate 1 slinga 1

addrange
g1 11101 11119
remnode
g1 11107
//Gate 1 slinga 2

addrange
g2 12107 12129
remrange
g2 12108 12119
//Gate 2 slinga 1

addrange
g3 21101 21127
remnode
g3 22114
//Gate 2 slinga 2

addrange
g4 22128 22141
remnode
g4 22133
//Gate 3 slinga 1
//addrange g5 31101 31116
//Gate 3 slinga 2
//addrange g6 32108 32109
//Gate 4 slinga 1

//Gate 4 slinga 2



foreach
n g1
  GMR = n -
1100

 
if mbreg[GMR] equal 1
   
tassign rep["Nrvarozon" @ n] 71
 
end
 
  
if mbreg[GMR] equal 0
   
restore rep["Nrvarozon" @ n]

 
end
next

foreach
n g2
  GMR = n -
2100

 
if mbreg[GMR] equal 1
   
tassign rep["Nrvarozon" @ n] 71
 
end
 
  
if mbreg[GMR] equal 0
   
restore rep["Nrvarozon" @ n]
 
end
 

next



foreach
n g3
  GMR = n -
10900

 
if mbreg[GMR] equal 1
   
tassign rep["Nrvarozon" @ n] 71
 
end
 
  
if mbreg[GMR] equal 0
   
restore rep["Nrvarozon" @ n]
 
end
 

next

foreach
n g4
  GMR = n -
11900

 
if mbreg[GMR] equal 1
   
tassign rep["Nrvarozon" @ n] 71
 
end
Reply


Messages In This Thread
Modbus TCP/IP - by AndersH - 22.01.2018, 07:02
RE: Modbus TCP/IP - by Daniel - 22.01.2018, 10:16
RE: Modbus TCP/IP - by AndersH - 22.01.2018, 13:37
RE: Modbus TCP/IP - by Daniel - 22.01.2018, 13:47
RE: Modbus TCP/IP - by AndersH - 07.02.2018, 14:29

Forum Jump: