|
Post by mikejec on Sept 24, 2020 9:06:43 GMT -5
I need to increase the time-out on an RS-232 channel to 3000ms instead of default 1000ms. No Flow control though.
Is the following correct? Change this Com = 16384
OPEN "COM7: 57600,N,8,1,ds0,cs0,rs" FOR RANDOM AS #1 To this Com = 16384
OPEN "COM7: 57600,N,8,1,ds3000,cs3000,rs" FOR RANDOM AS #1
|
|
|
Post by Rod on Sept 24, 2020 10:38:27 GMT -5
If you use the default open statement the flow control and timeout are effectively off. Liberty will wait forever for coms data. If your link has no flow control there is no point in setting ds or cs
So if you want to timeout after 3000ms then just set a timer. Check the buffer for data every 500ms say, if you get data reset the counter, if not increment the counter. When you get to 7 that’s your timeout.
|
|
|
Post by mikejec on Sept 24, 2020 12:01:57 GMT -5
Thanks Rod, That is easy enough. I will try that. Mike
|
|