HP Forums
HP-IL and EMU71 - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: HP-IL and EMU71 (/thread-21382.html)

Pages: 1 2


HP-IL and EMU71 - hesc - 02-29-2024 11:01 PM

Dear all,

I was using my HP71B to communicate with the 3468A multimeter. That works.

The program:
10 ! DCV HP 71/3468A
20 REAL V
30 CLEAR
40 D=DEVADDR("HP3468A")
60 ENTER Big Grin ; V
70 DISP V
80 END

I was wondering if I was also able to use the EMU71 with the PIL-Box for this purpose. I installed the virtual HP-IL ROM and executed VER$. The result was OK: HPIL:1B.
I programmed the exact program in EMU71 as it worked in the real HP71 and made the connections with the PIL-box. Running the program hangs.
The EMUL71 cannot be put on again and the only way to get it working was to reset it with loss of my program.
1. How can I save the program? I tried to initialise a tape, but that did not work. I tried to back it up, but that did not work either.
2. What went wrong: why isn't it possible to turn on the EMU71 without a reset?
3. Why does the program hang?

Thank you for your reply.

Kind regards,
Henk Schellen


RE: HP-IL and EMU71 - rprosperi - 03-01-2024 01:41 AM

To connect Emu71/Win to physical devices involves using virtual HP-IL, so you are using ILPILbox (from here: https://hp.giesselink.com/hpil.htm), right? If not, get that, study the docs and you'll probably quickly have an A-HO moment.

If you are, then please supply information about the configuration (e.g. device order) etc. and if you are seeing successful loop traffic upon startup (enable the scope on IL-Per).

Initially, configuring the virtual loop is a bit bewildering, but in the end, after taking your time to configure all the parts, it's actually very easy and logical; Christoph made it super easy and sensible to setup, all the magic is well-hidden.


RE: HP-IL and EMU71 - hesc - 03-01-2024 08:27 AM

Dear rprosperi,

I already made connections with my real HP71B and the PilBox and transferred files.
Now, I tried to use the virtual EMU71 for this purpose and I used Christoph's manual https://hp.giesselink.com/Emu71/Emu71.htm to configure it exactly as described by Christoph. I used VER$ to verify the settings.

There might be a complication, as far as I understand up to now:
I am using Parallels desktop on my Mac with Windows 11 as a virtual machine. I have to choose for the Mac or Windows when connecting the Pil-Box by USB. I tried both.
Up to now I have no idea how to solve the problem.

Kind regards,
Henk


RE: HP-IL and EMU71 - rprosperi - 03-01-2024 01:43 PM

For EMU71/Win to connect to real HP-IL devices other, you MUST use ILPilbox in addition to ILPer, which acts as a kind of gateway between the physical loop and the virtual loop. This should work fine under Parallels.

Please study the virtual HP-IL (3rd diagram) layout on the link I sent, and then the manual for how to configure ILPilbox and ILPer to communicate via TCP/IP (sounds complex, but is not).


RE: HP-IL and EMU71 - hesc - 03-01-2024 09:16 PM

Dear Bob,

Thank you for your suggestions. I tried to follow up your suggestions. However, I do not succeed in starting ILPilbox, nor ILPer to work under Windows 11 and get an error regarding a so-called side-by-side configuration? It suggests that I have to look at an application event log, which I cannot find. Please see attachment.
So, indeed, it sounds too complex for me...

Kind regards,

Henk


RE: HP-IL and EMU71 - rprosperi - 03-02-2024 12:15 AM

I'm not sure of the cause of this error... we may have to wait until Christoph notices this thread.

Was the VS2005 Runtime, also found on the same page, installed?

The problem does not appear to be related to using Parallels on macOS to me, but I don't use macOS so I can't really advise for sure about that.

Let's see what Christoph has to say...


RE: HP-IL and EMU71 - Sylvain Cote - 03-02-2024 12:30 AM

(03-02-2024 12:15 AM)rprosperi Wrote:  Was the VS2005 Runtime, also found on the same page, installed?
Probably not, please install/reinstall Visual Studio 2005 runtime package then try it again.
  • VS2005 Runtime : The Microsoft Visual C++ 2005 SP1 Redistributable Package (x86).
I am assuming that you have an Intel Mac and not a M1/M2/M3 Mac.


RE: HP-IL and EMU71 - hesc - 03-02-2024 10:55 PM

Bob and Sylvain,
Thank you both for your reactions.
It is indeed the new generation Mac with M1 chip. But Windows 11 on parallels works fine, so I will try your suggestions for (re-) installing the Visual Studio package.
Kindest regards,
Henk


RE: HP-IL and EMU71 - Sylvain Cote - 03-02-2024 11:23 PM

(03-02-2024 10:55 PM)hesc Wrote:  It is indeed the new generation Mac with M1 chip. But Windows 11 on parallels works fine
ok, but are you running Windows for ARM processor or Windows for Intel processor in Parallels Desktop ?

Type system information into the search box and click the result to open this app.
Under the System Summary tab on the left side, locate the System Type section and see if it is ARM64-based PC (ARM64) or x64-based PC (64-bit).


RE: HP-IL and EMU71 - hesc - 03-03-2024 09:54 PM

Dear Sylvain and Bob,

I checked the type of running processor for Windows and it is indeed an ARM64. I installed the VS2005 runtime as you suggested and after that, Ilper and Ilpilbox are running! However, I missed a serial interface COM1 in the pil-box link.
I managed to install a COM1 in my virtual Windows and chose it in the pil-box link
After that, I could start the Pil-Box link COM1.
I could also start IlPer, however, only with PIL-Box link TCP/IP because COM1 was not available any more.
In the port0 settings of EMU71 I get the message TCP/IP server port 6000 already in use.
A RESTORE IO in EMU71 gives: HPIL ERR:Loop Broken.
Concluding, it seems that the soft- and hardware are working, but the configuration is very confusing for me:
What should be the settings in
1. Ilpilbox
2. Ilper
3. Emu71
Thanks for helping out.

Kind regards,
Henk


RE: HP-IL and EMU71 - Sylvain Cote - 03-03-2024 11:59 PM

(03-03-2024 09:54 PM)hesc Wrote:  I checked the type of running processor for Windows and it is indeed an ARM64.
good

(03-03-2024 09:54 PM)hesc Wrote:  I installed the VS2005 runtime as you suggested and after that, Ilper and Ilpilbox are running!
I am somewhat surprised here,
Visual Studio C++ 2005 runtime only support Intel processor and never supported ARM 64-bit processor.
AFAIK Visual Studio C++ runtime 2012 was the first version supporting ARM 64-bit processor.
Apple M processors are part of the ARM 64-bit family.

(03-03-2024 09:54 PM)hesc Wrote:  Concluding, it seems that the soft- and hardware are working, but the configuration is very confusing for me:

You should not use ILPer and ILPILBox at the same time.

Setup between Emu71, ILPILBox, PIL-Box and 3421A
  • connect the HP-IL side of the PIL-Box to the 3421A
  • connect the USB side of the PIL-Box to the computer
  • in parallels desktop, map the new serial port in Windows (COMx)
  • start ILPILBox
    • Fill in the following values in HP-IL Link section
      • Out TCP/IP address: localhost
      • Out Port: 60000
      • In Port: 60001
    • Fill in the following values in PIL-Box Link section
      • set to the correct COMx port
    • Press Start button
  • start Emu71
    • select menu: EditPort Configuration
    • in Port Configuration dialog, Port section
      • select Port 0 in Port drop down menu
      • press Add button
    • in Port Configuration dialog, Configuration section
      • select HPIL in Module Type drop down menu
      • enter the HP-IL ROM filename in Filename text box (ex.: HPIL1B.BIN)
      • press TCP/IP Configuration Configure button
      • in HP-IL Interface Setup dialog, enter the following values:
        • Out TCP/IP address: localhost
        • Out Port: 60001
        • In Port: 60000
        • Press OK button
    • in Port Configuration dialog, Port section
      • Press Apply button
      • Press OK button
    • now do the following commands in Emu71:
      Code:
      RESET HPIL
      RESTORE IO
      CLEAR LOOP
      OUTPUT 1 ; "DCV5"
      ENTER 1 ; V
      DISP V
      Display the value from the acquisition unit
      Code:
      .066387

I have tried the above and it works.


RE: HP-IL and EMU71 - hesc - 03-04-2024 10:04 PM

Dear Sylvain,

Thank you for your extensive answer. It helped me very much. I followed your 'script' exactly and indeed, it works! I can make a connection between the virtual EMU71 and the real multimeter HP3468A and data acquisition unit HP3421A.

Now I would like to copy (save) the program on the virtual EMU71 to a folder on the hard disk of the windows system where EMU71 is running. I assume that I do not need the Pil-Box itself and that I can use ILPer for mass storage to a mounted drive HDRIVE1 (hdrive.dat). I put the PIL-Box link to TCP/IP. I wrote a program TEST1 on EMU71 and tried to copy it to the HDRIVE1 using the following command:
COPY TEST1 TO :HDRIVE1
The result was an HPIL error: device not found.
INITIALIZE :HDRIVE1
resulted in HPIL err: device not ready
COPY TEST1 TO :2
resulted in invalid medium, etc.
So now I am at the end of trial and error...
Can you help me out again?

Many thanks on forehand,
Henk


RE: HP-IL and EMU71 - rprosperi - 03-04-2024 11:10 PM

Yes, you can use ILPer in place of ILPilBox, configure IPer's TCIP the same way you had ILPilBox configured.

But also remember to treat the virtual Emu71 just like a real device, including doing OFF IO before you power off to change the loop configuration, make the changes, then power EMU71 On and use RESTORE IO again to configure the loop, and you should be OK.


RE: HP-IL and EMU71 - Sylvain Cote - 03-05-2024 05:29 AM

Hello Henk,

Here's another small how-to.

Setup between Emu71 and ILPer (TCP/IP mode, no PIL-Box)
  • start ILPer
    • in Mass Storage section, enter the following values
      • Drive HP9114B: path with filename of the LIF file (ex.: C:\Temp\HP9114B.DAT )
      • Drive HDRIVE1: path with filename of the LIF file (ex.: C:\Temp\HDRIVE1.DAT )
    • in DosLink section, enter the following values
      • Out: path with filename of the doslkink output file (ex.: C:\Temp\my-out.dat )
      • In: path with filename of the doslkink input file (ex.: C:\Temp\my-in.dat )
    • in PIL-Box Link section, enter the following values
      • In drop-box, select TCP/IP option
    • at the bottom-right of the ILPer dialog
      • uncheck Scope check box
    • at the top-left of the ILPer dialog
      • click on the small icon to bring up a menu
      • select TCP/IP Setup...
        • Out TCP/IP address: localhost
        • Out Port: 60000
        • In Port: 60001
        • Press OK button
    • Press Start button
  • start Emu71
    • use the same configuration as the previous how-to
    • reinitialise the HP-IL loop and reconfigure the devices in the loop
      Code:
      RESET HPIL
      RESTORE IO
    • Device list
      Code:
      Address :  DEVAID  : DEVID$
         1    : 2E /  46 : "DISPLAY"
         2    : 10 /  16 : "HP9114B"
         3    : 10 /  16 : "HDRIVE1"
         4    : 4E /  78 : "DOSLINK"
    • Format the HP-9114B virtual floppy ( C:\Temp\HP9114B.DAT )
      Code:
      INITALIZE TAPE1:MASSMEM(1)
    • Create a new BASIC file
      Code:
      EDIT
    • Enter your program in Emu71 memory
      Code:
      10 ! DCV HP 71/3468A
      20 REAL V
      30 CLEAR
      40 D=DEVADDR("HP3468A")
      60 ENTER D ; V
      70 DISP V
      80 END
    • Rename your BASIC file
      Code:
      RENAME TO DCV71
      CAT                       // shows: "DCV71      BASIC    77 MM/DD/YY HH:MM"
    • Copy your program from Emu71 memory to the floppy drive
      Code:
      COPY DCV71 TO :MASSMEM(1)
    • List tape content to printer
      Code:
      DISPLAY IS :1
      CAT :MASSMEM(1)
      Use up arrow key and down arrow key to navigate the file catalog, ON key leave the catalog
      Code:
         NAME    S TYPE   LEN    DATE    TIME 
      DCV71        BASIC    77 03/05/24 00:16
    • unmap display to printer
      Code:
      DISPLAY IS *



RE: HP-IL and EMU71 - Dave Frederickson - 03-05-2024 05:45 AM

Now all you need to do is upgrade to Emu72 with a 4-line display.
http://www.jeffcalc.hp41.eu/emu71/emu72.html


RE: HP-IL and EMU71 - Sylvain Cote - 03-05-2024 02:15 PM

I know I previously said not to use ILPer and ILPILBox at the same time, but here you need to. Wink

Setup between Emu71, ILPer, ILPILBox, PIL-Box and 3468B
  • connect the HP-IL side of the PIL-Box to the 3468B
  • connect the USB side of the PIL-Box to the computer
  • in parallels desktop, map the new serial port in Windows (COMx)
  • start ILPILBox
    • Fill in the following values in HP-IL Link section
      • Out TCP/IP address: localhost
      • Out Port: 60000 ← IMPORTANT
      • In Port: 60002 ← IMPORTANT
    • Fill in the following values in PIL-Box Link section
      • set to the correct COMx port
    • Press Start button
  • start ILPer
    • in Mass Storage section, enter the following values
      • Drive HP9114B: path with filename of the LIF file (ex.: C:\Temp\HP9114B.DAT )
      • Drive HDRIVE1: path with filename of the LIF file (ex.: C:\Temp\HDRIVE1.DAT )
    • in DosLink section, enter the following values
      • Out: path with filename of the doslkink output file (ex.: C:\Temp\my-out.dat )
      • In: path with filename of the doslkink input file (ex.: C:\Temp\my-in.dat )
    • in PIL-Box Link section, enter the following values
      • In drop-box, select TCP/IP option
    • at the bottom-right of the ILPer dialog
      • uncheck Scope check box
    • at the top-left of the ILPer dialog
      • click on the small icon to bring up a menu
      • select TCP/IP Setup...
        • Out TCP/IP address: localhost
        • Out Port: 60002 ← IMPORTANT
        • In Port: 60001 ← IMPORTANT
        • Press OK button
    • Press Start button
  • start Emu71
    • select menu: EditPort Configuration
    • in Port Configuration dialog, Port section
      • select Port 0 in Port drop down menu
      • press Add button
    • in Port Configuration dialog, Configuration section
      • select HPIL in Module Type drop down menu
      • enter the HP-IL ROM filename in Filename text box (ex.: HPIL1B.BIN)
      • press TCP/IP Configuration Configure button
      • in HP-IL Interface Setup dialog, enter the following values:
        • Out TCP/IP address: localhost
        • Out Port: 60001 ← IMPORTANT
        • In Port: 60000 ← IMPORTANT
        • Press OK button
    • in Port Configuration dialog, Port section
      • Press Apply button
      • Press OK button
    • reinitialise the HP-IL loop and reconfigure the devices in the loop
      Code:
      RESET HPIL
      RESTORE IO
    • Get device accessory identifier
      Code:
      Address :  Request   :  Display  : Hex value       : Display :
         1    :  DEVAID(1) :    46     : DTH$(DEVAID(1)) :  0002E  :
         2    :  DEVAID(2) :    16     : DTH$(DEVAID(2)) :  00010  :
         3    :  DEVAID(3) :    16     : DTH$(DEVAID(3)) :  00010  :
         4    :  DEVAID(4) :    76     : DTH$(DEVAID(4)) :  0004E  :
         5    :  DEVAID(5) :    -1     : HP-IL SAI message is not supported by the peripheral
    • Get device identifier
      Code:
      Address :  Request   : Display   : 
         1    :  DEVID$(1) : "DISPLAY" : 
         2    :  DEVID$(2) : "HP9114B" : 
         3    :  DEVID$(3) : "HDRIVE1" : 
         4    :  DEVID$(4) : "DOSLINK" : 
         5    :  DEVID$(5) : "HP3468B" :

You are now ready to use your virtual and physical peripherals, have fun! Smile


RE: HP-IL and EMU71 - Christoph Giesselink - 03-05-2024 06:51 PM

Hi together,

just updated my Virtual HP-IL example page from 2015.

The graphic is still from 2015, but now the "Setup the loop" picture contain arrows and a small description about the dependencies between "In Port" and "Out Port" to create a virtual loop.

There is still a document from the Allschwil Meeting 2014 with a short view behind the curtain Virtual HP-IL Concept.

Bob Prosperi made a presentation for the HHC 2014 meeting with the title Virtual Loops, PILS and LIF; An Update on HP-IL.

There's also a video of this presentation. The part how to configure a loop is around minute 35:00. But IMHO it's worth to view the complete video.

Over the years many tips and tutorials how to setup Virtual HP-IL have been published in this forum. So I will not give any individual support how to configure a loop configuration.

An essential is to understand the concept of real HP-IL with the HP-IL specific commands inside the calculator to control the loop. Therefore you have read the calculator manual and maybe extra literature about HP-IL.

Then you have to invest time to understand the concept of Virtual HP-IL. When you understood the concept behind you need no "try and error" any more to build a mixed HP-IL loop with real and virtual devices.

All my Virtual HP-IL device implementations and the HP41 emulator program V41 are written in C++. To run them you must install a compiler specific runtime. To be compatible with most Windows versions, the programs have been compiled with Visual Studio 2005 as x86 application and so you need the VS2005 runtime for x86: vcredist2005_x86.exe

But there's another important topic, Microsoft called it, the "DLL Hell". DLL's are made to have one implementation for a function which can be used by all applications on the Windows system. But the nature of code is, that it might be buggy or must be extended to integrate new features. The result is an equal DLL with the same name and with a new version number. But it sometimes happen, that a function inside the new DLL version behaves a little bit different and so it's incompatible with the prior version. To make it short, to get out of this hell, Microsoft introduced so called side-by-side DLLs. Side-by-side DLL's are the same DLL but in different versions. So each application can load the side-by-side DLL version the application was made with. If the application can't find the DLL version the program was made with, it accepts also a newer version of the DLL, but not an older version!

Back to my Visual Studio 2005 compiler installation. This installation also integrated the last available hotfixes and so the created application code need the latest VS2005 runtime with the highest version numbers. This vcredist2005_x86.exe file is not easy to find for download because older versions may have the same name but not working with the application.


RE: HP-IL and EMU71 - hesc - 03-05-2024 09:59 PM

Dear Sylvain,

Thank you for your help again.
Your second to last 'script' worked fine. I was able to use the mass storage. That helps a lot!
With your last script I had 2 problems:
- for some reason the start button in ILPer does not dim, i.e. become grey after pressing and the stop button stays grey?
- DEVAID(5) indeed delivers -1, but I do not get DEVAID$(5) : "HP3468A". Is that the result of 'HP-IL SAI message is not supported by the peripheral'? Do I have to input it manually in some way or did I make some mistake.
As a result of it the multimeter is not accessible...

Thanks again for your effort!
Henk


RE: HP-IL and EMU71 - Sylvain Cote - 03-05-2024 10:01 PM

(03-04-2024 11:10 PM)rprosperi Wrote:  But also remember to treat the virtual Emu71 just like a real device, including doing OFF IO before you power off to change the loop configuration, make the changes, then power EMU71 On and use RESTORE IO again to configure the loop, and you should be OK.
It is not necessary to do a OFF IO before doing a loop change.
  • IO disabled → POWER OFF send nothing.
  • IO disabled → POWER ON send nothing.
  • IO enabled → POWER OFF send nothing or send a LPD message (Loop Power Down).
  • IO enabled → POWER ON send nothing.
  • RESTORE IO → reconfigure the loop but does not query the devices for their Accessory ID.
When I decide to use the 71B unplugged and before removing the HP-IL cables, I normally do a OFF IO to prevent a delay at power on.


RE: HP-IL and EMU71 - Sylvain Cote - 03-05-2024 10:12 PM

(03-05-2024 09:59 PM)hesc Wrote:  - for some reason the start button in ILPer does not dim, i.e. become grey after pressing and the stop button stays grey?
re-check your configuration

(03-05-2024 09:59 PM)hesc Wrote:  - DEVAID(5) indeed delivers -1
expected

(03-05-2024 09:59 PM)hesc Wrote:  , but I do not get DEVAID$(5) : "HP3468A".
The command is DEVID$(5)

(03-05-2024 09:59 PM)hesc Wrote:  Is that the result of 'HP-IL SAI message is not supported by the peripheral'?
No, the comment was for the DEVAID( device_address ) return value of -1 only