Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : EDITor F2 anomalies
Author | Message | ||||
carlschneider Senior Member Joined: 04/08/2023 Location: South AfricaPosts: 158 |
https://www.thebackshed.com/forum/ViewTopic.php?TID=15968&PID=208064#208064#208083 As previously undertaken herewith observations of the F2 intermittent issues with the program aborting with errors being reported to the console and running successfully with another F2 in response to the abort. General observations - The abort to console with error appears to occur after editing of the program - F2 again will run the program without any abort to console for invalid errors - the line number of the error to console depends on program structure and moves as the editing moves - The abort to console line errors appear to me to be errors associated with entering the code before parameters are set for commands or jumping into a subroutine Thoughts on possible causes, albeit from an amateur - Maybe delay between SAVE and RUN on F2 doesn't provide time to reset the program pointer - F2 is behaving as a CONTINUE for some reason - Program pointer is not being reset consistently I have attempted to provide the information in the following structured format, noting that the program is a work in progress and the line numbers are shifting but not the structure ; -A. Line of Error reported at console and code at that line -B. Where I altered the code in the EDITor -C. Structure of code between where I was working in EDITor and the Line of the error on the console First recorded instance A. 17 ADC OPEN 250000,1,ADCComplete B. Was editing in Sub ADCComplete C. Structure ... Sub ADCComplete ... End Sub Sub GetModBus 'WriteModbus ReadModBus ... End Sub Do ' ... Loop Sub GetFreq ... End Sub Sub DoMinute ... End Sub Sub SetPort ... End Sub Sub AssembleModBusStrings ... End Sub Sub ReadModBus ... End Sub Sub WriteModbus ... End Sub Sub ServiceWebInterrupt ... End Sub Sub AssembleJSONSTring ... End Sub Sub AssembleResponseHeader ... End Sub Second recorded instance A. 165 WEB CLOSE TCP CLIENT in Sub WriteModBus B. Editing in Sub ADCComplete C. Structure ... 42 Sub ADCComplete ... 65 End Sub Sub GetModBus 'WriteModbus ReadModBus ... End Sub Do ' ... Loop Sub GetFreq ... End Sub Sub DoMinute ... End Sub Sub SetPort ... End Sub Sub AssembleModBusStrings ... End Sub Sub ReadModBus ... End Sub Sub WriteModbus ... End Sub Sub ServiceWebInterrupt ... End Sub Sub AssembleJSONSTring ... End Sub Sub AssembleResponseHeader ... End Sub Third recorded instance A. 220 End Sub of Sub ServiceWebInterrupt B. Editing in Sub ADCComplete C. Structure ... Sub ADCComplete ... End Sub Sub GetModBus 'WriteModbus ReadModBus ... End Sub Do ' ... Loop Sub GetFreq ... End Sub Sub DoMinute ... End Sub Sub SetPort ... End Sub Sub AssembleModBusStrings ... End Sub Sub ReadModBus ... End Sub Sub WriteModbus ... End Sub Sub ServiceWebInterrupt ... End Sub Sub AssembleJSONSTring ... End Sub Sub AssembleResponseHeader ... End Sub Fourth recorded instance A.17 ADC OPEN 250000,1,ADCComplete B. Editing in Sub ADCComplete C. Structure ... Sub ADCComplete ... End Sub Sub GetModBus 'WriteModbus ReadModBus ... End Sub Do ' ... Loop Sub GetFreq ... End Sub Sub DoMinute ... End Sub Sub SetPort ... End Sub Sub AssembleModBusStrings ... End Sub Sub ReadModBus ... End Sub Sub WriteModbus ... End Sub Sub ServiceWebInterrupt ... End Sub Sub AssembleJSONSTring ... End Sub Sub AssembleResponseHeader ... End Sub Hope this helps pinning down what remains an intermittent issue. For reference > option list WebMite MMBasic Version 5.07.08b11 OPTION COLOURCODE ON OPTION CPUSPEED (KHz) 252000 OPTION DISPLAY 41, 140 OPTION WIFI ***, **********, PICO**** OPTION TCP SERVER PORT 80 OPTION TELNET CONSOLE ON > Cheers Carl Retirement is tough on Hobbies without a day job |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6100 |
You haven't said if you are using the TELNET terminal as your console or using the USB. A MEMORY report would be useful. Instead of F2, can you try F1 to save and then RUN. That might help isolate the cause. I have experienced random errors on RUN and the following RUN is OK, but I have not seen it for a while now. Jim VK7JH MMedit MMBasic Help |
||||
carlschneider Senior Member Joined: 04/08/2023 Location: South AfricaPosts: 158 |
Thanks for the response Jim. This using USB on a MBPro Mid 2012 running Ventura 13.1 through OpenCore Legacy Patcher. I'm running the Terminal.app and Screen to tie to the USB. I will attempt to add Memory reports when next logging an anomaly. I will try the F1 then F2 approach and see if that makes a difference, or do you mean specifically F1 to SAVE and then typing RUN at the console? Cheers Carl Retirement is tough on Hobbies without a day job |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2136 |
After you have exited the editor with F1, F2 becomes a shortcut to RUN and prints RUN to the console. For 'Belt and Braces' try both ways. |
||||
carlschneider Senior Member Joined: 04/08/2023 Location: South AfricaPosts: 158 |
F1 F2 gave me the same problem again so I then used F1 RUN which gave the same issue. I'll try doing it over Telnet and see what happens, although telnet is a bit laggy :) Cheers Carl Retirement is tough on Hobbies without a day job |
||||
carlschneider Senior Member Joined: 04/08/2023 Location: South AfricaPosts: 158 |
Nope whether I use USB or Telnet its the same or both F1 F2 and F1 run. I'll try and remember to do the memory report next time :) Cheers Carl Retirement is tough on Hobbies without a day job |
||||
carlschneider Senior Member Joined: 04/08/2023 Location: South AfricaPosts: 158 |
I notice on telnet the console is overwriting the EDITor window. Don't recall seeing this occur on USB... Cheers Carl Retirement is tough on Hobbies without a day job |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6798 |
The built-in editor is designed to work using standard ASCII codes through the USB or directly connected TTL serial input. We usually find that any problems are with the terminal emulation setup or the terminal emulator itself, neither of which can be influenced by MMBasic. The F2 command simply sends RUN<CRLF> to the command line of the editor. If your terminal isn't handling that then you need to sort that out first. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
carlschneider Senior Member Joined: 04/08/2023 Location: South AfricaPosts: 158 |
Thank you all for the guidance, much appreciated. Cheers Carl Retirement is tough on Hobbies without a day job |
||||
Print this page |