HP-41C HP-IL REMOTE & LOCAL commands
|
06-03-2018, 07:55 PM
(This post was last modified: 06-03-2018 09:14 PM by Sylvain Cote.)
Post: #1
|
|||
|
|||
HP-41C HP-IL REMOTE & LOCAL commands
Hello,
I just spend several hours trying to understand why I was not able to successfully configure a HP-82164A RS-232 interface with a HP-41C while it was a walk in the park with a HP-71B. The default configuration of the interface is: 9600 bauds, 8 bits, no parity, 1 stop bit, no protocol, no hardware handshake My new configuration for the interface is: 4800 bauds, 8 bits, no parity, 1 stop bit, no protocol, no hardware handshake In my test programs, I could have chosen to change the baud rate only, but I decided to set all the parameters just in case, anyway as you will see, that is not the issue here. My HP-IL setup is: IL-Controller (71B/41C) <-> HP-82164A <-> back-to-IL-Controller My RS232 setup is: HP-82164A <-> DB25-to-DB9-adapter <-> NULL-modem-adapter <-> DB9-to-USB-dongle <-> MacBookPro <-> Serial-macOS-Program (cfg: 4800,8,n,1) The following three blocks was my starting point ... HP-82164A remote commands subset (82164A OM Rem Cmd P.37 to P.40) Code: SB8; // 1200 bauds HP-71B program (working) Code: 10 RESTORE IO HP-41C program (<' means append) (not working) Code: 01 LBL "CFG232" When I ran the HP-71B program I saw the expected "HELLO WORLD" message on the terminal application but not so for the HP-41C. I tried several configuration changes but to no avail, in the end I had no choice but to go into the low level stuff, the RAW HP-IL messages. 8-) I changed my physical setup to a debugging one: HP-IL setup: IL-Controller <-> PILBox#1 [pyilper --instance one with Scope] <-> HP-82164A <-> PILBox#2 [pyilper --instance two with Scope] <-> IL-Controller RS232 setup: HP-82164A <-> DB25-to-DB9-adapter <-> NULL-modem-adapter <-> DB9-to-USB-dongle <-> MacBookPro <-> Serial-macOS-Program (cfg: 4800,8,n,1) Then I traced the HP-IL messages and manually mapped them to their high level commands for both IL-Controllers (71B & 41C) After that I compared both logs taking into account the small IL management differences between both IL-Controler and found why it was not working with the HP-41C. This is what I have found: HP-71B REMOTE command issue a HP-IL REN (Remote Enable) message (as expected) HP-41C REMOTE command issue a HP-IL REN (Remote Enable) message (as expected) HP-71B LOCAL command issue a HP-IL NRE (Not Remote Enable) message (as expected) HP-41C LOCAL command issue a HP-IL GTL (Go To Local) message (totally unexpected for me) I then checked the 82160A manual and it is correctly specified that the LOCAL command issue a GTL message, so the command works as specified. After that I checked the 82164A manual and this is what I found: Code: There are two command messages that set the interface back into Local mode: Go To Local and Not Remote Enable. Ha! Ha! This is why it was not working with the HP-41C. Because the LOCAL command was not putting the interface in local mode for good (NRE) but only temporary (GTL), the next time it will receive data in listening mode, the interface will go back into remote mode and try to interpret the data as instructions instead of passing it through. Here is the proof ... LOCAL Code: AAU RFC AAD 1 // reconfiguring the loop 'HELLO WORLD' OUTA Code: AAU RFC AAD 1 // reconfiguring the loop The only way I found to solve the issue is to use the NOTREM (Not Remote Enable) command from the 82183A Ext.I/O ROM module. NOTREM Code: AAU RFC AAD 1 // reconfiguring the loop HP-41C program (<' means append) (working) Code: 01 LBL "CFG232" Sylvain Edit: changed the faulty 71B program from "40 LOCAL :RS232" to "40 LOCAL" (see the next post from Jean-François) |
|||
06-03-2018, 08:32 PM
(This post was last modified: 06-03-2018 08:42 PM by J-F Garnier.)
Post: #2
|
|||
|
|||
RE: HP-41C HP-IL REMOTE & LOCAL commands
Hello Sylvain,
Yes it was a common pitfall at the time. The HP41 with the HPIL module only is unable to set the parameters of the HP82164, and also of the HP82165/166 GPIOs (that requires the use of DDL/DDT commands). The extended I/O module was mandatory with these interfaces -unless using the default configuration. I believe the behavior of the REMOTE/LOCAL commands has an historical explanation. They comes from the HP-IB (aka IEEE488) world in instrumentation applications, and intended to enable or disable the remote control of the instrument from a computer rather than from the front panel. Once the instrument remote commands were enabled, it was possible to temporary go back to local (front panel commands) until a new command is received. When the remote/local were used to select between commands and data for interfaces, the same behavior was kept unfortunately. To make the things even worst: on the 71, "LOCAL" uses NRE (Not Remote Enable), but "LOCAL :1" uses GTO (Goto Local) ! (same on the 75). Your HP71 code should NOT work ! And there is also this LOCAL LOCKOUT command :-) J-F |
|||
06-03-2018, 09:22 PM
Post: #3
|
|||
|
|||
RE: HP-41C HP-IL REMOTE & LOCAL commands
Hello Jean-François,
(06-03-2018 08:32 PM)J-F Garnier Wrote: I believe the behavior of the REMOTE/LOCAL commands has an historical explanation.This make a lot of sense. (06-03-2018 08:32 PM)J-F Garnier Wrote: Your HP71 code should NOT work !You are right, in my program I only have LOCAL and not LOCAL :RS232, I probably did a copy/paste when I wrote the initial post (now corrected). I was curious, I tested both variant and it did what you explained, the thing is that although I do not remember it, I surely knew this back in the 1980's. Thanks for your precious information and for the error correction. Best regards, Sylvain |
|||
06-05-2018, 08:42 AM
Post: #4
|
|||
|
|||
RE: HP-41C HP-IL REMOTE & LOCAL commands
(06-03-2018 08:32 PM)J-F Garnier Wrote: Hello Sylvain, That's probably why I never had any trouble with it. My original purpose for getting the 41 and HP-IL in 1986 was to control IEEE-488 equipment on the workbench through the HP82169A HPIL-to-HPIB interface converter. The equipment consisted of things like signal generators, DMMs, and relay units, and they mostly had their own front-panel controls, so they could be used manually without external computer control, or under computer control for automated test setups. During program development, I might occasionally want to press the LOCAL button on one piece of equipment or another to check something by changing settings from the equipment's own front panel. I always used the 41 in MANIO (manual I/O address selection), because the HPIL-to-HPIB interface converter, although mostly transparent, did not have the autoaddressing like HP-IL does; so each piece of equipment on the IEEE-488 (HP-IB) had to be addressed with SELECT. There was no choice about that; and all of their addresses had to be above the number of things on HP-IL, and the interface converter had to be the last thing on the loop. Printer, mass storage, and anything else I had must come before the HP82196A. I have the FSI164A which was almost identical to the HP82164A except that it came with two RS-232 channels standard, and up to eight if you paid extra, and could be powered with batteries. I originally used it to control an EPROM programmer, and later, interfaced to other things on the workbench. I don't remember ever having any problem with it, although I heard it has a bug with even parity (which I never tried). Sylvain, I do find it a bit curious that you would use AUTOIO and then 1 SELECT. http://WilsonMinesCo.com (Lots of HP-41 links at the bottom of the links page, at http://wilsonminesco.com/links.html#hp41 ) |
|||
06-06-2018, 12:28 AM
(This post was last modified: 06-06-2018 12:33 AM by Sylvain Cote.)
Post: #5
|
|||
|
|||
RE: HP-41C HP-IL REMOTE & LOCAL commands
Hello Garth,
(06-05-2018 08:42 AM)Garth Wilson Wrote: Sylvain, I do find it a bit curious that you would use AUTOIO and then 1 SELECT. My original intention was to use it as a loop continuity check, but as you will see, it does not add anything to the final solution. Your question made me realize that I should have traced all the 82160A & 82183A functions long ago. Actually I did it in the 1980s with the HP-IL Dev. ROM (MONITOR) when it became available. Being completely away from the HP calculator world between 1989 and 2011 made me lose most of that deep knowledge. I am slowly rebuilding it, but doing part time takes forever ... As you will see, in this specific case, SELECT generate the same set of HP-IL messages as MANIO and AUTOIO commands. It is special to see AUTOIO generating twice the same set of messages. So here it is ... (for simplicity’s sake, I have not included IDY and ETO frames) HP-41 Command Sequence Code: MANIO MANIO Code: AAU RFC AAD 1 TAD 01 RFC SAI DAB 2E LAD 01 RFC UNL RFC 1 SELECT Code: AAU RFC AAD 1 TAD 01 RFC SAI DAB 2E LAD 01 RFC UNL RFC AUTOIO Code: AAU RFC AAD 1 TAD 01 RFC SAI DAB 2E LAD 01 RFC UNL RFC 1 SELECT Code: AAU RFC AAD 1 TAD 01 RFC SAI DAB 2E LAD 01 RFC UNL RFC Above HP-IL messages explanation Code: AAU RFC AAD 1 // loop reconfiguration Regards, Sylvain |
|||
06-06-2018, 02:08 AM
Post: #6
|
|||
|
|||
RE: HP-41C HP-IL REMOTE & LOCAL commands
Those results are certainly unexpected!
I like your description of AUTOIO sending the identical sequence twice: "Special". Initially I wondered if the sequence is sent twice due to possible latency in some of the early HP-IL devices, but then realized HP-IL is literally bit-serial, so failures replying (due to delays) to the initial sequence would hang the loop even on the first time around. The docs for the 41 IL modules was weak, especially for the Extended IO and Devel ROMs. No help there.... In the end, did you find any practical difference in the loop behavior after setting the different modes? --Bob Prosperi |
|||
06-06-2018, 03:01 AM
Post: #7
|
|||
|
|||
RE: HP-41C HP-IL REMOTE & LOCAL commands
(06-06-2018 02:08 AM)rprosperi Wrote: I like your description of AUTOIO sending the identical sequence twice: "Special".Well, it's probably my fren-glish here, we have the same word in both languages but with potentially different usage. (06-06-2018 02:08 AM)rprosperi Wrote: In the end, did you find any practical difference in the loop behavior after setting the different modes?I am just restarting to trace all the commands, but I expect to have some behavioural differences between manual and auto modes later on. I will post traces here as I do them and I will create an article when it's complete enough. Just be patient, these traces will be done when I have free time between the other projects that are themselves done in my personal free time, which I do not have in abundance. |
|||
06-06-2018, 07:43 AM
Post: #8
|
|||
|
|||
RE: HP-41C HP-IL REMOTE & LOCAL commands
(06-06-2018 02:08 AM)rprosperi Wrote: The docs for the 41 IL modules was weak, especially for the Extended IO and Devel ROMs. No help there.... There is a whole section about the auto and manual modes in the HP82160 manual (p.46 english ed.). In the code from Sylvain, AUTOIO is not strictly mandatory (the code would run fine in MANIO), but I always advised to use AUTOIO unless there is a special need (°). SELECT is needed, to select the destination of OUTA. It could be omitted here if the interface is the first device but the general sequence is: AUTOIO "HP82164" FINDID SELECT and there would be a difference here between MANIO and AUTOIO if the 82164 is not the 1st device in the loop. The explanation is somehow hidden in the HP82160 manual, page 53 :-) (°) One need (and the only real one I encountered) is to use the printer functions (PRA, PRP, LIST, ...) to print to a non-printer device such as the HP82166 GPIO/converter (or DOSLINK in ILPer). J-F |
|||
06-06-2018, 01:04 PM
Post: #9
|
|||
|
|||
RE: HP-41C HP-IL REMOTE & LOCAL commands
(06-06-2018 07:43 AM)J-F Garnier Wrote:(06-06-2018 02:08 AM)rprosperi Wrote: The docs for the 41 IL modules was weak, especially for the Extended IO and Devel ROMs. No help there.... Yes, that section does describe the modes clearly, at a high (operational) level, but nothing about how this occurs at lower (HP-IL frame) levels. When using more than simply 1 tape drive and 1 printer with the 41, I was always frustrated that there was no way to see what occurred at lower levels. Eventually I got the Devel ROM which provided a (frustrating to use) loop scope, but I had moved on to the 71b so never really pursued it enough to grasp it all. As Sylvain suggests, a frame-by-frame breakdown of each high-level command is the best way to understand and use them, and I always thought such documentation should have been provided by HP, even if only in a separately purchased "advanced" manual or something similar. Thinking more about the example above, the sequences likely would have differed if there were more than 1 device connected, but still I always thought things were more 'different' at lower levels. Since I have a choice (for play) I'll stick with the 71b for HP-IL use. --Bob Prosperi |
|||
06-07-2018, 12:40 PM
Post: #10
|
|||
|
|||
RE: HP-41C HP-IL REMOTE & LOCAL commands
(06-06-2018 01:04 PM)rprosperi Wrote: As Sylvain suggests, a frame-by-frame breakdown of each high-level command is the best way to understand and use them, and I always thought such documentation should have been provided by HP, even if only in a separately purchased "advanced" manual or something similar.On the 41, the HP-IL is deliberately automated as much as possible, contrary to the 71 where you have a more precise control of the HP-IL. First the loop addresses are re-assigned in almost all HP-IL commands so you can add/remove devices at any time, and everything will still work - on the 71 you have to do a RESTORE IO to re-assign the addresses. Then, the HP41 checks for a printer almost every time it does something, to check for instance the trace mode on the 82162. And, worst, if a printer is on the loop and in AUTOIO, the HP41 continuously emits IDY frames to check if the user pressed a key on the 82162 (even if that printer is not actually present). So if you want to look at the low-level frames related to a high-level HP-IL command, I recommend to put the printer switch of the 82160 module in the disable position. J-F |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)