• Hardware Diagnosis

    From hansolosnah@21:1/5 to All on Fri Feb 3 02:13:20 2023
    Newbie question:
    Hello Folks,
    Would you please explain to me why in my
    google searches I see many notations that
    "Forth is a hardware diagnosis/control program"!?

    Thank you

    ziloo :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dennis Ruffer@21:1/5 to ziloo...@yahoo.com on Fri Feb 3 06:15:15 2023
    On Friday, February 3, 2023 at 2:13:24 AM UTC-8, ziloo...@yahoo.com wrote:
    Newbie question:
    Hello Folks,
    Would you please explain to me why in my
    google searches I see many notations that
    "Forth is a hardware diagnosis/control program"!?

    Thank you

    ziloo :)

    See: https://en.wikipedia.org/wiki/Open_Firmware

    DaR

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Myron Plichota@21:1/5 to daru...@gmail.com on Mon Feb 6 02:25:40 2023
    On Friday, February 3, 2023 at 9:15:17 AM UTC-5, daru...@gmail.com wrote:
    On Friday, February 3, 2023 at 2:13:24 AM UTC-8, ziloo...@yahoo.com wrote:
    Newbie question:
    Hello Folks,
    Would you please explain to me why in my
    google searches I see many notations that
    "Forth is a hardware diagnosis/control program"!?

    Thank you

    ziloo :)
    See: https://en.wikipedia.org/wiki/Open_Firmware

    DaR
    Between 1980 and 1999 I used various Forth dialects for diagnostics on products I helped design.
    Those diagnostics were used in the factory and in the field, and the technicians loved the ability to go beyond what was canned.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From hansolosnah@21:1/5 to Myron Plichota on Mon Feb 6 03:38:16 2023
    On Monday, February 6, 2023 at 1:55:41 PM UTC+3:30, Myron Plichota wrote:
    On Friday, February 3, 2023 at 9:15:17 AM UTC-5, daru...@gmail.com wrote:
    On Friday, February 3, 2023 at 2:13:24 AM UTC-8, ziloo...@yahoo.com wrote:
    Newbie question:
    Hello Folks,
    Would you please explain to me why in my
    google searches I see many notations that
    "Forth is a hardware diagnosis/control program"!?

    Thank you

    ziloo :)
    See: https://en.wikipedia.org/wiki/Open_Firmware

    DaR
    Between 1980 and 1999 I used various Forth dialects for diagnostics on products I helped design.
    Those diagnostics were used in the factory and in the field, and the technicians loved the ability to go beyond what was canned.

    Thank you Myron for your response!
    Would you please elaborate on how you used Forth for diagnostics?
    What products did you design and where did Forth come into use?
    Thank you
    ziloo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Valencia@21:1/5 to Myron Plichota on Mon Feb 6 07:43:51 2023
    Myron Plichota <myronplichota@gmail.com> writes:
    Between 1980 and 1999 I used various Forth dialects for diagnostics on products I helped design.

    Years ago, out of the blue a company in Costa Rica contacted me for some help adapting ForthOS to their production line diagnostics. We got it all nailed down, and a few weeks later a box arrived from them with some excellent
    coffee and a very nice check! I suspect Forth is tucked here and there in surprising corners throughout the world.

    Though, alas, no doubt less and less with time.

    Andy Valencia
    Home page: https://www.vsta.org/andy/
    To contact me: https://www.vsta.org/contact/andy.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From hansolosnah@21:1/5 to Andy Valencia on Tue Feb 7 14:54:13 2023
    On Monday, February 6, 2023 at 7:16:31 PM UTC+3:30, Andy Valencia wrote:
    Myron Plichota <myronp...@gmail.com> writes:
    Between 1980 and 1999 I used various Forth dialects for diagnostics on products I helped design.
    Years ago, out of the blue a company in Costa Rica contacted me for some help adapting ForthOS to their production line diagnostics. We got it all nailed down, and a few weeks later a box arrived from them with some excellent coffee and a very nice check! I suspect Forth is tucked here and there in surprising corners throughout the world.

    Though, alas, no doubt less and less with time.

    Andy Valencia
    Home page: https://www.vsta.org/andy/
    To contact me: https://www.vsta.org/contact/andy.html

    My question is: What makes Forth suitable for diagnostics?
    ziloo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jach Feng@21:1/5 to All on Tue Feb 7 16:15:01 2023
    hansolosnah 在 2023年2月8日 星期三清晨6:54:15 [UTC+8] 的信中寫道:
    On Monday, February 6, 2023 at 7:16:31 PM UTC+3:30, Andy Valencia wrote:
    Myron Plichota <myronp...@gmail.com> writes:
    Between 1980 and 1999 I used various Forth dialects for diagnostics on products I helped design.
    Years ago, out of the blue a company in Costa Rica contacted me for some help
    adapting ForthOS to their production line diagnostics. We got it all nailed
    down, and a few weeks later a box arrived from them with some excellent coffee and a very nice check! I suspect Forth is tucked here and there in surprising corners throughout the world.

    Though, alas, no doubt less and less with time.

    Andy Valencia
    Home page: https://www.vsta.org/andy/
    To contact me: https://www.vsta.org/contact/andy.html
    My question is: What makes Forth suitable for diagnostics?
    ziloo
    First, Forth is an interactive environment which helps much on diagnostics job. Second, not like other "interactive" script languages such as Python or JavaScript, Forth is very close to the hardware.

    --Jach

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hugh Aguilar@21:1/5 to Jach Feng on Tue Feb 7 16:33:49 2023
    On Tuesday, February 7, 2023 at 5:15:02 PM UTC-7, Jach Feng wrote:
    hansolosnah 在 2023年2月8日 星期三清晨6:54:15 [UTC+8] 的信中寫道:
    My question is: What makes Forth suitable for diagnostics?
    ziloo
    First, Forth is an interactive environment which helps much on diagnostics job. Second, not like other "interactive" script languages such as Python or JavaScript, Forth is very close to the hardware.

    Jach is right --- Forth is great for diagnosing hardware.
    The technician can write a one or two-line Forth word that causes something to happen
    in the outside world, then execute that word on the command-line (outer interpreter).
    If he keeps his eye on the oscilloscope when he hits the [enter] key, he can see if the
    result in the outside world is what he expected.

    Diagnostic software is possible in C, but is much more difficult.
    The technician has to write a C program, not just a single C function, then run that program on the board. C is not interactive --- getting the board to do something
    in the outside world is a laborious process --- it could take an hour to do in C
    what can be done in one minute in Forth.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lorem Ipsum@21:1/5 to hughag...@gmail.com on Tue Feb 7 20:44:29 2023
    On Tuesday, February 7, 2023 at 7:33:51 PM UTC-5, hughag...@gmail.com wrote:
    On Tuesday, February 7, 2023 at 5:15:02 PM UTC-7, Jach Feng wrote:
    hansolosnah 在 2023年2月8日 星期三清晨6:54:15 [UTC+8] 的信中寫道:
    My question is: What makes Forth suitable for diagnostics?
    ziloo
    First, Forth is an interactive environment which helps much on diagnostics job. Second, not like other "interactive" script languages such as Python or JavaScript, Forth is very close to the hardware.
    Jach is right --- Forth is great for diagnosing hardware.
    The technician can write a one or two-line Forth word that causes something to happen
    in the outside world, then execute that word on the command-line (outer interpreter).
    If he keeps his eye on the oscilloscope when he hits the [enter] key, he can see if the
    result in the outside world is what he expected.

    Diagnostic software is possible in C, but is much more difficult.
    The technician has to write a C program, not just a single C function, then run
    that program on the board. C is not interactive --- getting the board to do something
    in the outside world is a laborious process --- it could take an hour to do in C
    what can be done in one minute in Forth.

    I have used interactive C before. I believe it was a product from the company that had VxWorks, don't recall their name (maybe the VxWorks company?) The debugging tool would allow lines of C to be entered. Worked about as well as you might expect, but
    it was interactive.

    Some of the adventures I've had using C. I was once working on the hardware for a board and had a software guy working with me. I was trying to move forward with the process and he was focusing on one routine that had been written to encapsulate a
    specific memory bus operation, something like a single 16 bit transfer, rather than 32 bits or something. This routine had just one line of actual code I believe, or maybe two lines, one to do the bus operation and one to put the result into the format
    for returning the value. The guy kept analyzing this tiny module and could not explain to me why this was taking forever. I offered to explain it to him, but no, he wanted to "understand" it. Finally, I was going to fall asleep, so I left. I don't
    think the issue was ever resolved. I have no idea how such a simple thing could require so much effort to understand. But you know how C is, get the address of this and use it as a pointer to that...

    I'm working with my brother who is much more a businessman and much less technical. He has a little gadget that does a very simple translation of a serial data stream. So far, the only person with a good solution to the problem was from this group and
    has an MCU running Forth. So we are probably going to let him program it in Forth. The specification is so simple, it would not be much code in any language, but in Forth, I'm thinking maybe five words, ten words tops.

    Initialize
    begin
    read_line
    translate_line
    send_line
    1 +
    dup 20 >= if output_header drop 0 then
    again

    read_line reads a line of text from a serial port, terminated by \r\n, while not overflowing the input buffer.

    translate_line has to add formatting characters to the date and time / and :, while removing the two leading characters.

    send_line just sends the data out a serial port.

    output_header sends five lines of fixed text to the output serial port.

    This is so simple, it almost writes itself. The C code was not terribly more complex, but I think it used C++ on an arduino and used memory allocation!

    --

    Rick C.

    - Get 1,000 miles of free Supercharging
    - Tesla referral code - https://ts.la/richard11209

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Valencia@21:1/5 to hansolosnah on Wed Feb 8 10:35:33 2023
    hansolosnah <ziloo_goony@yahoo.com> writes:
    My question is: What makes Forth suitable for diagnostics?

    It's easy to develop all the bits of testing, and even unit test them interactively. You can also manually fiddle the hardware while you're
    shaking out all the rough edges. It's teeny, and very easy to integrate onto almost any platform. It's simple, so special cases are easy to code up and integrate.

    Because the entire system can live on each target, you can remote in and usefully talk to it over serial, including code changes and reload live.

    Andy Valencia
    Home page: https://www.vsta.org/andy/
    To contact me: https://www.vsta.org/contact/andy.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)