From 1a93baacaab875010f169dd6eed6867fc28f4c67 Mon Sep 17 00:00:00 2001 From: Jimmy Hu Date: Tue, 12 Sep 2023 18:11:13 +0800 Subject: [PATCH] delays for modbus ser.send --- modbus/modbus.tbs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modbus/modbus.tbs b/modbus/modbus.tbs index bf36440..9514b68 100644 --- a/modbus/modbus.tbs +++ b/modbus/modbus.tbs @@ -354,7 +354,11 @@ sub modbus_proc_ser_data_sent() AND modbus_request_queue(modbus_queue_start).protocol=modbus_RTU then modbus_request_queue(modbus_queue_start).timestamp=sys.timercountms dim data as string=modbus_master_get_request(modbus_request_queue(modbus_queue_start)) + ser.rxclear() ser.txclear() + dim targ as dword=sys.timercountms+1 + while sys.timercountms