09.08.2018, 09:00
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:
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)