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
#2
Hi
There is not enough info here. At last this script is not telling me anything. To which registry do you want to write and via what modbus function?
BR
------------------------------
Ctrl+F5
Reply
#3
If there is no info in the script file from the Ventilation guy leave it...
What information do i have to know ?
Reply
#4
Hi
Yes we can create profile and you have info on IP, ID(slave) and port
To create profile we need to know registry address and which modbus function to use.
BR
------------------------------
Ctrl+F5
Reply
#5
I solved the problem Smile

Used the Modbus profile description and made a profile with the adresses (registers) that ventilation system used ....
imported the profile to HL and added new devise with the profile, after that was only to connect the KNX groupadresses to wright register...

File looks like this (but have about 100 registers):
  
{
"manufacturer": "Lindinvent",
"description": "Lindintell",
"mapping": [
{
"name": "1065 Driftpers",
"bus_datatype": "bool",
"datatype": "int16",
"type": "register",
"address": 10001,
"writable": 1
},
{
"name": "1067 Tvätt",
"bus_datatype": "bool",
"datatype": "int16",
"type": "register",
"address": 10002,
"writable": 1
   }
  ]
}

Attached Files
.json   Lindinvent.json (Size: 27.86 KB / Downloads: 11)
Reply


Forum Jump: