Commit 4641c290 authored by Pavel Vainerman's avatar Pavel Vainerman

fixed bug in ModbusSlave (askcount)

parent a5ca0a91
......@@ -375,6 +375,19 @@ void MBSlave::execute_tcp()
}
}
if( askcount_id!=DefaultObjectId )
{
try
{
shm->localSaveValue(aitAskCount,askcount_id,askCount,getId());
}
catch(Exception& ex)
{
dlog[Debug::CRIT] << myname
<< "(execute_rtu): (askCount) " << ex << std::endl;
}
}
for( IOMap::iterator it=iomap.begin(); it!=iomap.end(); ++it )
IOBase::processingThreshold(&it->second,shm,force);
}
......
......@@ -2,6 +2,7 @@
uniset-start.sh -f ./uniset-mbslave --mbs-name MBSlave1 --confile configure.xml --dlog-add-levels info,crit,warn \
--mbs-name MBSlave1 \
--mbs-type TCP --mbs-inet-addr 127.0.0.1 --mbs-inet-port 2048 --mbs-reg-from-id 1 --mbs-my-addr 0x01
--mbs-type TCP --mbs-inet-addr 127.0.0.1 --mbs-inet-port 2048 --mbs-reg-from-id 1 --mbs-my-addr 0x01 \
--mbs-askcount-id SVU_AskCount_AS
# --mbs-force 1
#--mbs-reg-from-id 1 \
\ No newline at end of file
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