Skip to content

Commit

Permalink
delays for modbus ser.send
Browse files Browse the repository at this point in the history
  • Loading branch information
salhk committed Sep 12, 2023
1 parent f115a09 commit 1a93baa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modbus/modbus.tbs
Original file line number Diff line number Diff line change
Expand Up @@ -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<targ
wend
ser.setdata(data)
ser.send()
end if
Expand Down

0 comments on commit 1a93baa

Please sign in to comment.