Commit d73aef73 authored by Claes Sjofors's avatar Claes Sjofors

ScanInterval added to modbus slave object bugfix

parent 3060c98c
......@@ -6,3 +6,4 @@
081016 rk modbus Added more functionality.
090301 cs usbio Bugfix for Ai on port B. If Ai and Di/Do were mixed the Ai didn't work.
091208 cs modbus Modbus TCP Server implemented.
100316 cs modbus ScanInterval added to modbus slave object.
......@@ -123,6 +123,10 @@ static pwr_tStatus IoCardWrite (
pwr_sClass_Modbus_TCP_Slave *slave;
op = (pwr_sClass_Modbus_Module *) cp->op;
local = (io_sCardLocal *) cp->Local;
slave = (pwr_sClass_Modbus_TCP_Slave *) rp->op;
if ( op->ScanInterval > 1) {
if ( !local->has_read_method) {
if ( local->interval_cnt != 0) {
......@@ -137,10 +141,6 @@ static pwr_tStatus IoCardWrite (
return IO__SUCCESS;
}
op = (pwr_sClass_Modbus_Module *) cp->op;
local = (io_sCardLocal *) cp->Local;
slave = (pwr_sClass_Modbus_TCP_Slave *) rp->op;
if (slave->Status == MB__NORMAL) {
io_card_write(ctx, cp, local->output_area, pwr_eByteOrderingEnum_BigEndian, pwr_eFloatRepEnum_FloatIntel);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment