panky
 Guru
 Joined: 02/10/2012 Location: AustraliaPosts: 1111 |
Posted: 03:12am 24 Dec 2023 |
|
|
|
Without trying to flog a dead horse, the area of interest appears to be the asynchronous interaction between the underlying OS (serial hardware handler and Windows itself), OLC and MMBasic. That is, if you do any form of serial read and IMMEDIATELY follow with a serial close, confusion reigns!
Two solutions/workarounds:-
1. Don't open a comport, do a read then immediately close the com port in any loop (not recommended anyway as all you are doing is wasting system resources in repetitively creating buffers then freeing them);
2. If you MUST do 1 above out of sheer stubbornness, put a PAUSE 1 immediately above the CLOSE statement and live with the performance hit ( on my i7 laptop, a pause of 500uS appears to be the crossover between conflict (lockup) and reliable operation).
The ' works with MMBasic for DOS ' overlooks the complexity added through OLC.
Sorry to butt in Peter but I'm with you - live with it!
Doug. |