Logic Machine Forum
BACnet write speed - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Hardware (https://forum.logicmachine.net/forumdisplay.php?fid=12)
+--- Thread: BACnet write speed (/showthread.php?tid=1519)



BACnet write speed - Evens - 09.08.2018

Hi,
 
Is there any way to adjust the write speed of BACnet objects?
We have a case where we are trying to send some data to a Wago plc and the speed is too high. 
we have solved it by using os.sleep in script. But we are planning to use the scene controller in LM and not script every scene.
 
When adding a os.sleep of 0.1s it worked perfectly.
 
Any simple solution?
 
BR Even Sundgot.


RE: BACnet write speed - admin - 09.08.2018

I suppose this might be an issue with parallel execution of write request.

You can lock parallel access via semaphores library so all writes are executed one by one:
Code:
require('sem')
require('bacnet')

value = event.getvalue()

-- wait for lock for up to 10 seconds
sem.runlocked('bacnetlock', 10, function()
  bacnet.write(127001, 'analog value', event.dstraw, value)  
end)



RE: BACnet write speed - Evens - 09.08.2018

Perfect! Thanks Smile