Post Reply 
HP-IL protocol questions
12-27-2019, 01:03 PM
Post: #1
HP-IL protocol questions
Hi all,

I've recently acquired a PILBox to use with my HP-71B and 41C machines. It opens up a whole new world of possibilities!

Before going any further, I *do* have Kane, Harper and Ushijima's excellent "The HP-IL System: An Introductory Guide to the Hewlett-Packard Interface Loop" which has enabled me to progress significantly in developing a virtual HP-IL device but the questions I have here don't appear to be covered in the book and online searches reveal virtually nothing about HP-IL at all.

Question 1: There would appear to be a convention whereby the Accessory ID returned by a device in response to an SAI frame is just a byte of which the upper 4 bits represent the type of accessory (mass storage, printer etc.) and the lower 4 bits a sub-type. Is there any convention regarding what values of the accessory type portion of the AID represent which type of accessory? From what I can gather, accessory IDs in the range 0x10 to 0x1f would be mass storage devices with 0x10 being the default that the HP-71B at least looks for and uses absent any order to the contrary. As for any others, I'm drawing a blank.

Question 2: When a talker is sending a series of DAB frames to a listener, the controller can interrupt this process by sending an NRD frame to the talker in place of the echoed DAB frame. The talker acknowledges this interruption by forwarding the NRD frame back to the controller, which subsequently forwards the DAB frame that it had substituted originally for the NRD frame and the listener acknowledges by sending an ETO or ETE frame even though the transmission is not necessarily complete. The controller can then do whatever urgent stuff it needed the loop for and then reconfigure the talker and listener as before the interruption and send out an SDA frame. The talker sees this frame and completes the transmission by sending out the remaining data bytes followed by an ETO/ETE frame. What happens after the SDA frame if the controller interrupted the process when the talker was sending out the final byte? The controller had no way of knowing that it was the last byte so as far as it knows, the talker still has pending data to send. The talker seeing the SDA frame is going to be in a position where it's supposed to resume sending data but it has no more to send. Does it send another ETO/ETE frame to indicate the end of the transmission or does it just forward the SDA frame back to the controller?

There are only 10 types of people in this world. Those who understand binary and those who don't.
Find all posts by this user
Quote this message in a reply
12-27-2019, 01:27 PM
Post: #2
RE: HP-IL protocol questions
OK, I have an answer to question 1 already thanks to Gary Friedman's "Control the World with HP-IL"

[Image: aid.png]

There are only 10 types of people in this world. Those who understand binary and those who don't.
Find all posts by this user
Quote this message in a reply
12-27-2019, 05:50 PM (This post was last modified: 12-27-2019 05:53 PM by J-F Garnier.)
Post: #3
RE: HP-IL protocol questions
(12-27-2019 01:03 PM)grsbanks Wrote:  Question 1: There would appear to be a convention whereby the Accessory ID returned by a device in response to an SAI frame is just a byte of which the upper 4 bits represent the type of accessory (mass storage, printer etc.) and the lower 4 bits a sub-type. Is there any convention regarding what values of the accessory type portion of the AID represent which type of accessory?
...
OK, I have an answer to question 1 already thanks to Gary Friedman's "Control the World with HP-IL"
A more complete list is detailed in appendix C.4 of the HP-IL specification (available on MoHPC DVD/USB-key), including the "Analytic Instrument" class (112-127) and the definition of the subclasses.
Regarding the HP-IL ID and AID, not all HP devices comply to these rules, for instance the HP3468 multimeter doesn't answer at all to the SAI (returns the SAI unchanged), it must be searched by its ID="HP3468A" or "HP3468B" depending on the multimeter version! It was a true design flaw in my opinion.
And on the other hand, the HP-82161 cassette drive, the HP82162 printer, and maybe others don't answer to the SDI command, but just to the SAI.

Quote:Question 2: When a talker is sending a series of DAB frames to a listener, the controller can interrupt this process by sending an NRD frame to the talker in place of the echoed DAB frame.
...
What happens after the SDA frame if the controller interrupted the process when the talker was sending out the final byte? The controller had no way of knowing that it was the last byte so as far as it knows, the talker still has pending data to send. The talker seeing the SDA frame is going to be in a position where it's supposed to resume sending data but it has no more to send. Does it send another ETO/ETE frame to indicate the end of the transmission or does it just forward the SDA frame back to the controller?
Devices generally are sending an EOT in response to a SDA if they have no (or no more) data to send, this is my recommendation for HP-IL device implementation. But some HP devices (the HP-82166 and the HP82164 interfaces) can just hold the SDA until they get something to send from the interface side. Of course, this locks the loop, potentially forever if no data is received from the interface side.

J-F
Visit this user's website Find all posts by this user
Quote this message in a reply
12-27-2019, 07:33 PM
Post: #4
RE: HP-IL protocol questions
(12-27-2019 05:50 PM)J-F Garnier Wrote:  A more complete list is detailed in appendix C.4 of the HP-IL specification (available on MoHPC DVD/USB-key), including the "Analytic Instrument" class (112-127) and the definition of the subclasses.

Thanks for that. I'm not sure if I'm looking at the right document, I see "Accessory ID and Status Message Definitions" in appendix D of the "HP-IL Reference Specification."

(12-27-2019 05:50 PM)J-F Garnier Wrote:  Regarding the HP-IL ID and AID, not all HP devices comply to these rules, for instance the HP3468 multimeter doesn't answer at all to the SAI (returns the SAI unchanged), it must be searched by its ID="HP3468A" or "HP3468B" depending on the multimeter version! It was a true design flaw in my opinion.
And on the other hand, the HP-82161 cassette drive, the HP82162 printer, and maybe others don't answer to the SDI command, but just to the SAI.

Yuck! Given that the 41's and 71's HP-IL modules include functions designed to work on both AID and ID you'd think HP would make devices that actually fit in with this!

(12-27-2019 05:50 PM)J-F Garnier Wrote:  
Quote:Question 2: [...] Does it send another ETO/ETE frame [...] or does it just forward the SDA frame back to the controller?

Devices generally are sending an EOT in response to a SDA if they have no (or no more) data to send, this is my recommendation for HP-IL device implementation.

Yup. That makes sense and it's what I actually implemented while hoping to get an answer here.

(12-27-2019 05:50 PM)J-F Garnier Wrote:  But some HP devices (the HP-82166 and the HP82164 interfaces) can just hold the SDA until they get something to send from the interface side. Of course, this locks the loop, potentially forever if no data is received from the interface side.

Now, that is is just nasty!

There are only 10 types of people in this world. Those who understand binary and those who don't.
Find all posts by this user
Quote this message in a reply
12-27-2019, 08:38 PM
Post: #5
RE: HP-IL protocol questions
(12-27-2019 07:33 PM)grsbanks Wrote:  
(12-27-2019 05:50 PM)J-F Garnier Wrote:  A more complete list is detailed in appendix C.4 of the HP-IL specification (available on MoHPC DVD/USB-key), including the "Analytic Instrument" class (112-127) and the definition of the subclasses.
Thanks for that. I'm not sure if I'm looking at the right document, I see "Accessory ID and Status Message Definitions" in appendix D of the "HP-IL Reference Specification."

You are probably looking at the HP-internal Reference Spec, Dec.80 (when HP-IL was still called "PIL"). You may better look at the official document 82166-90017, Nov.82.

J-F
Visit this user's website Find all posts by this user
Quote this message in a reply
12-27-2019, 09:21 PM
Post: #6
RE: HP-IL protocol questions
(12-27-2019 08:38 PM)J-F Garnier Wrote:  You are probably looking at the HP-internal Reference Spec, Dec.80 (when HP-IL was still called "PIL"). You may better look at the official document 82166-90017, Nov.82.

OK, found it. There is indeed some good info in there.

Thanks.

There are only 10 types of people in this world. Those who understand binary and those who don't.
Find all posts by this user
Quote this message in a reply
Post Reply 




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