The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
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
SBA;  // 2400 bauds
SBC;  // 4800 bauds
SBE;  // 9600 bauds
SW0;  // 8 bits
P4;   // no parity
SS0;  // 1 stop bit
C0;   // no protocol
SL0;  // use CTS(4), DCD(8) & DSR(6)
SL2;  // use CTS(4)
SL4;  // use DCD(8)
SL6;  // use DSR(6)
SL7;  // no hardware handshake

HP-71B program (working)
Code:
10 RESTORE IO
20 REMOTE :RS232
30 OUTPUT :RS232 ; "SBC;SW0;P4;SS0;C0;SL7;"
40 LOCAL
50 OUTPUT :RS232 ; "HELLO WORLD"

HP-41C program (<' means append) (not working)
Code:
01 LBL "CFG232"
02 AUTOIO
03 1  
04 SELECT
05 REMOTE
06 "SBC;SW0;P4;"
07 <"SS0;C0;SL7;"
08 OUTA
09 LOCAL
10 "HELLO WORLD"
11 OUTA
12 END

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. 
Go To Local is a device specific command, which means that only devices that are currently listeners will respond to the message. 
If your interface is a listener and it receives a Go To Local message, it changes back to Local mode. 
Remember that your interface is still remote enabled, so if it becomes a listener again, it will then change back to Remote mode.
The Not Remote Enable command not only puts the device back into Local mode, but it also disables the device from going back into Remote mode if it is made a listener.

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
LAD 01  RFC             // selecting 82164A as listener
GTL     RFC             // tell 82164A to go into LOCAL mode temporary
UNL     RFC             // unselecting 82164A as listener

'HELLO WORLD' OUTA
Code:
AAU     RFC     AAD  1  // reconfiguring the loop
TAD 01  RFC             // selecting 82164A as talker
SAI     DAB 42          // requesting its accessory ID
UNT     RFC             // unselecting 82164A as talker
AAU     RFC     AAD  1  // reconfiguring the loop
LAD 01  RFC             // selecting 82164A as listener and at the same time going back into REMOTE mode 8-(
                        // the following data (my "HELLO WORLD" message) is not passed through
DAB 48  DAB 45  DAB 4C  DAB 4C  DAB 4F  DAB 20  DAB 57  DAB 4F  DAB 52  DAB 4C  DAB 44  DAB 0D  DAB 0A  
UNL     RFC             // unselecting 82164A as listener

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
NRE     RFC             // telling every device in the loop to go back to local mode

HP-41C program (<' means append) (working)
Code:
01 LBL "CFG232"
02 AUTOIO
03 1  
04 SELECT
05 REMOTE
06 "SBC;SW0;P4;"
07 <"SS0;C0;SL7;"
08 OUTA
09 NOTREM
10 "HELLO WORLD"
11 OUTA
12 END

Sylvain

Edit: changed the faulty 71B program from "40 LOCAL :RS232" to "40 LOCAL" (see the next post from Jean-François)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP-41C HP-IL REMOTE & LOCAL commands - Sylvain Cote - 06-03-2018 07:55 PM



User(s) browsing this thread: 1 Guest(s)