15.06.2023, 09:10
(15.06.2023, 08:32)Daniel Wrote: You can use this.
https://forum.logicmachine.net/showthread.php?tid=4530
Thank you so much!
I have only a question about the code:
Code:
require('bacnet')
-- read from 192.168.0.21, device ID 21
bacnet.deviceip = '192.168.0.21'
val1 = bacnet.readvalue(21, 'binary value', 2049)
val2 = bacnet.readvalue(21, 'binary value', 2050)
val3 = bacnet.readvalue(21, 'binary value', 2051)
log(val1, val2, val3)
The line "bacnet.deviceip = '192.168.0.21' " set the ip of the bacnet server that the Logic Machine want to read, right?
Because I think that there will be some problem in this situation:
- Logic Machine 1 read the analog value with id 6 from the bacnet server with id 7;
- Logic Machine 2 read the analog value with id 6 from the bacnet server with id 8;
- Logic Machine 3 read the analog value with id 6 from the bacnet server with id 9;
This is why I was trying to change the bacnet id of the Logic Machine.
For example, using the bacnet client app, where I have 2 Logic Machine I can see that they have both bacnet id 4194303.
I know that it is a third part app but I cannot see any option to change it by script.