mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
fixes to rtu modbus
This commit is contained in:
parent
8e28dbf2a6
commit
f940c136bf
@ -56,11 +56,11 @@ function modbus.new(rtu_dev, use_parallel_read)
|
||||
-- run parallel tasks if configured
|
||||
if self.use_parallel then
|
||||
parallel.waitForAll(table.unpack(tasks))
|
||||
end
|
||||
|
||||
if access_fault then
|
||||
return_ok = false
|
||||
readings = MODBUS_EXCODE.SERVER_DEVICE_FAIL
|
||||
end
|
||||
if access_fault or #readings ~= count then
|
||||
return_ok = false
|
||||
readings = MODBUS_EXCODE.SERVER_DEVICE_FAIL
|
||||
end
|
||||
else
|
||||
readings = MODBUS_EXCODE.ILLEGAL_DATA_ADDR
|
||||
@ -105,11 +105,11 @@ function modbus.new(rtu_dev, use_parallel_read)
|
||||
-- run parallel tasks if configured
|
||||
if self.use_parallel then
|
||||
parallel.waitForAll(table.unpack(tasks))
|
||||
end
|
||||
|
||||
if access_fault then
|
||||
return_ok = false
|
||||
readings = MODBUS_EXCODE.SERVER_DEVICE_FAIL
|
||||
end
|
||||
if access_fault or #readings ~= count then
|
||||
return_ok = false
|
||||
readings = MODBUS_EXCODE.SERVER_DEVICE_FAIL
|
||||
end
|
||||
else
|
||||
readings = MODBUS_EXCODE.ILLEGAL_DATA_ADDR
|
||||
@ -154,11 +154,11 @@ function modbus.new(rtu_dev, use_parallel_read)
|
||||
-- run parallel tasks if configured
|
||||
if self.use_parallel then
|
||||
parallel.waitForAll(table.unpack(tasks))
|
||||
end
|
||||
|
||||
if access_fault then
|
||||
return_ok = false
|
||||
readings = MODBUS_EXCODE.SERVER_DEVICE_FAIL
|
||||
end
|
||||
if access_fault or #readings ~= count then
|
||||
return_ok = false
|
||||
readings = MODBUS_EXCODE.SERVER_DEVICE_FAIL
|
||||
end
|
||||
else
|
||||
readings = MODBUS_EXCODE.ILLEGAL_DATA_ADDR
|
||||
@ -203,11 +203,11 @@ function modbus.new(rtu_dev, use_parallel_read)
|
||||
-- run parallel tasks if configured
|
||||
if self.use_parallel then
|
||||
parallel.waitForAll(table.unpack(tasks))
|
||||
end
|
||||
|
||||
if access_fault then
|
||||
return_ok = false
|
||||
readings = MODBUS_EXCODE.SERVER_DEVICE_FAIL
|
||||
end
|
||||
if access_fault or #readings ~= count then
|
||||
return_ok = false
|
||||
readings = MODBUS_EXCODE.SERVER_DEVICE_FAIL
|
||||
end
|
||||
else
|
||||
readings = MODBUS_EXCODE.ILLEGAL_DATA_ADDR
|
||||
|
@ -24,7 +24,7 @@ local sna_rtu = require("rtu.dev.sna_rtu")
|
||||
local sps_rtu = require("rtu.dev.sps_rtu")
|
||||
local turbinev_rtu = require("rtu.dev.turbinev_rtu")
|
||||
|
||||
local RTU_VERSION = "beta-v0.9.0"
|
||||
local RTU_VERSION = "beta-v0.9.1"
|
||||
|
||||
local rtu_t = types.rtu_t
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user