Logic Machine Forum
2 Virtual port and Bacnet Communication - 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: 2 Virtual port and Bacnet Communication (/showthread.php?tid=5087)



2 Virtual port and Bacnet Communication - savaskorkmaz - 10.11.2023

Hi,

In the forum there is a example about how we can create a second virtual ethernet port.

https://forum.logicmachine.net/showthread.php?tid=2595&pid=16682#pid16682

I need an example about how can i use second ethernet port ( eth0:2 ) for bacnet communication in my bacnet script shown below.

require('bacnet')

bacnet.deviceip = '192.168.0.21'
val1 = bacnet.readvalue(21, 'binary value', 2049)

Regards


RE: 2 Virtual port and Bacnet Communication - admin - 10.11.2023

It's not a virtual port but an option to assign multiple IP addresses to the same interface. For script to work one of the IP addresses on the interface must belong to the same subnet (192.168.0.0/24).