Products > Test Equipment

Anyone have an HP / Agilent E1406A VXI controller with IBASIC?

<< < (3/4) > >>

gjcrooks:
Thanks for the information. I must admit I didn't know Python supported VISA but now that I do I think we will be becoming better acquainted. I will try upgrading one of my 512kB cards with the IBASIC ROM and let you know if it works.

I had forgotten about using copy /b to binary combine files. I am wondering if this is the answer to my other problem. I will try creating a binary file with the table information and then binary combine it with the commands. I can then use your Python script to send it to the card - I may need a slight tweak to the ID as I don't think it needs to be in LOADER mode to make the change. To save you wasting your time reading manuals let me try this first and I will let you know how I get on - you have already been very generous to give up your time to assist me.

Have a great weekend.

gjcrooks:
Good news - end goal achieved!

I created a binary table file and used copy /b to create a file to send via IEE using your python script. I had to tweak slghtly as my first try just mapped 1 port to GPIB address GPIB1::9::24::INSTR. The table maps to GPIB address not logical address. Having changed the mappings to 3, 4 & 5 everything now works perfectly.

I haven't tried the IBASIC firmware yet but will let you know how that goes.

Many thanks for your help as it pointed me in the right direction to resolve this.

JimmyJimJames:
Thanks for all of the information on this thread (and sorry to revive it, but I'm running out of ideas).

Have any of you usd the old VXIDLD.EXE program and the RS232 interface to upload the new firmware?

That program is in the same https://archive.org/download/ftp.keysight.com/ directory:
https://web.archive.org/web/20040806112541/http://ftp.agilent.com/pub/mpusup/vxi/E1406/

I created a FreeDOS VirtualBox machine, and I've successfully used the VXIDLD.EXE program to load drivers to the E1406A (after reading the directions which say to copy only the .DC files I need into a separate directory with the VXIDLD files) but I cannot get the firmware to load.

There's some sort of weird naming convention, shown in the VXIDLD.CFG file, which I tried to follow, renaming the ibA.09.01 file to be IA09011.PC .  VXIDLD seems to find the file, but the program stops with the error saying: 
ERROR:  ROM program file 'IA09011.PC' is empty or not readable (file will not be used)

Any ideas?  I looked at the source in the VXIDLD.BAS and VXIDLD.GET files and sort of see that it's opening the file in binary mode and trying to read a character, making sure it's not a hex zero.  It looks like that is somehow failing.

Could the file not have been saved in binary mode from the archive site?  I do recall when using FTP, you had to specifically specify binary mode, but I don't see how to do that on the archive site.

EDIT: As a follow-up, I wrote a quick C program to read the first 20 characters from the ibA.09.01 file, and it shows the first character being a 0x00, which would make the code fail.



gslick:

--- Quote from: JimmyJimJames on August 04, 2021, 08:39:28 pm ---There's some sort of weird naming convention, shown in the VXIDLD.CFG file, which I tried to follow, renaming the ibA.09.01 file to be IA09011.PC .  VXIDLD seems to find the file, but the program stops with the error saying: 
ERROR:  ROM program file 'IA09011.PC' is empty or not readable (file will not be used)

Any ideas?  I looked at the source in the VXIDLD.BAS and VXIDLD.GET files and sort of see that it's opening the file in binary mode and trying to read a character, making sure it's not a hex zero.  It looks like that is somehow failing.

EDIT: As a follow-up, I wrote a quick C program to read the first 20 characters from the ibA.09.01 file, and it shows the first character being a 0x00, which would make the code fail.

--- End quote ---

The 1,048,576 byte (exactly 1MB) ibA.09.01 ROM file is a pure binary ROM image file.

The VXIDLD.BAS program appears to be set up to work with a ROM program file that contains a header section with the program download commands. It also uses the CHECked data format for download over a serial port, which uses one byte to send every 4 bits, with 1 control bit and 3 check bits for the 4 data bits, as documented in the Keysight E1406A Command Module, User Manual and SCPI Programming, E1406-90004.

If you want to use the VXIDLD.BAS program to download the main ROM image using the contents of the ibA.09.01 ROM file, you would need to prepend the expected program download command header, and translate each byte in the ROM image into two bytes in the CHECked data format. I'm not sure if inserting a \r character every 80 characters is necessary too.

GetPFInfo routine from VXIDLD.BAS:


--- Code: --- SUB GetPFInfo
 '
 ' This subprogram gets information about the ROM program file.
 '
   DIM JunkByte AS STRING * 1,CheckByte AS STRING * 1,LenByte AS STRING * 1
   DIM Expect$
 'RS-232 control begins
     ' Program file format:
     '   CONTENTS                BYTES MEANING
     '   ----------------- --      -------------------------------
     '   CNTL-D 1 connect to display system (0x04)
     '   ST UNKNOWN\r 11 insure terminal control not used
     '   SI LOADER\r 10 connect to loader instrument
     '   *RST\r 5 device reset
     '   PROG:DEL;   9 SCPI command
     '   DEF:CHEC #8 11 SCPI command header
     '   dddddddd 8 (BS) size of data block, BS=2xROM
     '   ... N flash ROM code, N=BS+(BS/80)
     ' this includes \r every 80 chars
     '   <CR> 1 terminate command (0x0d)
     '
     Expect$=CHR$(04)+"ST UNKNOWN"+CHR$(13)+"SI LOADER"+CHR$(13)+"*RST"+CHR$(13)+"PROG:DEL;DEF:CHEC #8"
     CmdSize=LEN("PROG:DEL;DEF:CHEC #8")+8+1 'Cmd + 1 char fudge
 'RS-232 control ends
   '
   IF ""<>PFFName$ THEN
     BadFile=0 'FALSE
     ErrorOccured=0 'FALSE
     ON ERROR GOTO SetErrorOccured
     OPEN SeDir$+PFFName$ FOR BINARY AS #3
     GET #3,1,JunkByte$
     IF JunkByte$=CHR$(0) THEN ErrorOccured=1 'TRUE
     ON ERROR GOTO 0
     IF 0<>ErrorOccured THEN
       CALL ReportErr("ROM program file '"+SeDir$+PFFName$+"' is empty or not readable (file will not be used)")
       BadFile=1 'TRUE
     ELSE
       BlkLenStart=LEN(Expect$)
       PFPSize=0
       FOR I=1 TO 8
         GET #3,BlkLenStart+I,LenByte$
         IF "0">LenByte$ OR "9"<LenByte$ THEN
           BadFile=1 'TRUE
         ELSE
           PFPSize=10*PFPSize+VAL(LenByte$)
         END IF
       NEXT I
       'Compute the size of all ROM program parts based on block size
 'RS-232 control begins
         PFFSize=BlkLenStart+8+PFPSize+((PFPSize+CmdSize+1) \ 79)+1
 'RS-232 control ends
       ' Check that the file looks okay
       FOR J=1 TO LEN(Expect$)
         GET #3,J,CheckByte$
         IF MID$(Expect$,J,J-(J)+1)<>CheckByte$ THEN BadFile=1 'TRUE
       NEXT J
       IF 0<>BadFile THEN CALL ReportErr("ROM program file '"+SeDir$+PFFName$+"' is not in proper format (file will not be used)")
     END IF
     CLOSE #3
     IF 0<>BadFile THEN PFFName$=""
   END IF
 END SUB 'GetPFInfo

--- End code ---

When I downloaded the ROM image using the contents of the ibA.09.01 ROM file, I did so over the GPIB port in plain binary format without using the CHECked data format, instead of over the serial port using the CHECked data format.

JimmyJimJames:

--- Quote from: gslick on August 17, 2021, 01:55:51 am ---
--- Quote from: JimmyJimJames on August 04, 2021, 08:39:28 pm ---There's some sort of weird naming convention, shown in the VXIDLD.CFG file, which I tried to follow, renaming the ibA.09.01 file to be IA09011.PC .  VXIDLD seems to find the file, but the program stops with the error saying: 
ERROR:  ROM program file 'IA09011.PC' is empty or not readable (file will not be used)

Any ideas?  I looked at the source in the VXIDLD.BAS and VXIDLD.GET files and sort of see that it's opening the file in binary mode and trying to read a character, making sure it's not a hex zero.  It looks like that is somehow failing.

EDIT: As a follow-up, I wrote a quick C program to read the first 20 characters from the ibA.09.01 file, and it shows the first character being a 0x00, which would make the code fail.

--- End quote ---

The 1,048,576 byte (exactly 1MB) ibA.09.01 ROM file is a pure binary ROM image file.

The VXIDLD.BAS program appears to be set up to work with a ROM program file that contains a header section with the program download commands. It also uses the CHECked data format for download over a serial port, which uses one byte to send every 4 bits, with 1 control bit and 3 check bits for the 4 data bits, as documented in the Keysight E1406A Command Module, User Manual and SCPI Programming, E1406-90004.

If you want to use the VXIDLD.BAS program to download the main ROM image using the contents of the ibA.09.01 ROM file, you would need to prepend the expected program download command header, and translate each byte in the ROM image into two bytes in the CHECked data format. I'm not sure if inserting a \r character every 80 characters is necessary too.

<snip>

When I downloaded the ROM image using the contents of the ibA.09.01 ROM file, I did so over the GPIB port in plain binary format without using the CHECked data format, instead of over the serial port using the CHECked data format.

--- End quote ---

Thank you for the reply.  For some reason I didn't think about the CHECKed format applying to the ROM images.  Duh.

The only functional way that I've been able to load the D-SCPI drivers to the E1406A for the cards in the system, is using a DOS Virtual Machine with the VXIDLD.EXE program, communicating to the serial port.  The VXIDLD.EXE program is also supposed to transfer the firmware files, but I guess that I need a firmware file version for the serial port transfer, like we have the .DC format driver files for serial port transfer, versus the .DU format driver files used for the GPIB interface.

I didn't intend to use the .BAS file, nor do I have a BASIC interpreter, but I just wanted to use the existing VXIDLD.EXE program, and figured the .BAS file gave me insight into the operation.

I've never worked with VXI equipment before, and I finally got a functional E1406A controller card out of the three used ones we purchased.  (Bad GPIB buffer chip on one, seemingly bad RAM/Flash on the other.)  All of them only have version 9.00 firmware:
HEWLETT-PACKARD,E1406A,0,A.09.00

When I still had the E1406A with the bad GPIB buffer and needed to use the serial port, I had a weird problem where I was unable to communicate to the E1441A ARB cards via the serial interface (using SI and SA commands) but could get to two other types of cards.  I was hoping that the firmware update would fix this issue, but since I now have a card with functional GPIB, I probably won't try to load 9.01 onto the card, especially if I have to convert the file to a different format.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod