You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried implement a modbusRTUSlave, use serialPort with InterByteTimeoutParser
but i get a problem
when my RTUMaster send a buffer to Slave,
Slave will get a packet, but next tick
InterByteTimeoutParser still remember the old packet,
i try use port.flush(), or just parser.currentPacket = []
when i call port.fluse() not working, parser.currentPacket=[] still not working
if i call parser._flust(),
it will except: maximum call stack size exceeded
How can i do, when i receive the packet over modbusRTU 3.5 char timeout.
it can flush old buffer?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I tried implement a modbusRTUSlave, use serialPort with InterByteTimeoutParser
but i get a problem
when my RTUMaster send a buffer to Slave,
Slave will get a packet, but next tick
InterByteTimeoutParser still remember the old packet,
i try use port.flush(), or just parser.currentPacket = []
but not working
my code:
for example i want set coil
the slave get :<Buffer 01 05 00 05 ff 00 9c 3b>
but, when i set again
slave get:<Buffer 01 05 00 05 ff 00 9c 3b 01 05 00 05 ff 00 9c 3b>
when i call port.fluse() not working, parser.currentPacket=[] still not working
if i call parser._flust(),
it will except: maximum call stack size exceeded
How can i do, when i receive the packet over modbusRTU 3.5 char timeout.
it can flush old buffer?
Beta Was this translation helpful? Give feedback.
All reactions