Author Topic: HP8590E Series Option 103 Driver  (Read 6684 times)

0 Members and 1 Guest are viewing this topic.

Offline Bicurico

  • Super Contributor
  • ***
  • Posts: 1707
  • Country: pt
    • VMA's Satellite Blog
Re: HP8590E Series Option 103 Driver
« Reply #50 on: March 23, 2019, 02:12:39 am »
Hi,

I made some progress: I added a new tab in my "VMA Simple Spectrum Analyser for HP/Agilent 8590 Series" software.

I tried to make the backup/restore with USTATE command work, but ended up deleting the whole user memory... :(

I have a backup, but when I try to upload it, I get a checksum error.

On the bright side, I can do a catalog and I can upload files created on the built-in "editor". Save/Load is yet to be implemented.

Also, I am figuring out how to write DLP and softmenu shortcuts. Wrote my first script to quickly set my favourite frequency ranges:

Code: [Select]
FUNCDEF C_ATV,@
FA 100MHZ;
FB 680MHZ;
@;
KEYDEF 1, C_ATV,%CATV BAND%;
FUNCDEF D_VBT,@
FA 742MHZ;
FB 766MHZ;
@;
KEYDEF 2, D_VBT,%DVBT BAND%;
FUNCDEF F_M,@
FA 88MHZ;
FB 108MHZ;
@;
KEYDEF 3, F_M,%FM BAND%;

Uploading this will create three USER MENU entries, each calling a DLP that just sets start/end frequencies.

Regarding my lost USER memory space: it contained what I imagine was some personality card with tools. There was for instance a tool to show the RAM battery location. It was just a picture.

From my backup I can see the ASCII part with the DLP. I am not missing anything terribly important, but it would be great if I could restore that. Does anyone know what exactly this was? The backup is attached, but obviously it is not 100% OK.

There were some calibration routines, CPU test routines, etc.

Going to bed now...

Regards,
Vitor

Offline Bicurico

  • Super Contributor
  • ***
  • Posts: 1707
  • Country: pt
    • VMA's Satellite Blog
Re: HP8590E Series Option 103 Driver
« Reply #51 on: March 23, 2019, 10:08:57 am »
Woke up and checked the MSB and LSB and they match the exact file size.
One of the errors so far was that I forgot the final ;.

But it still doesn't work. I think there is some final CrLf missing or similar. Transmission always leaves the device waiting for more bytes or gives a wrong checksum error.

Had to leave for the day but I am still believing I might reload my backup to the device.

Regards,
Vitor

Online MitiTopic starter

  • Super Contributor
  • ***
  • Posts: 1320
  • Country: ca
Re: HP8590E Series Option 103 Driver
« Reply #52 on: March 23, 2019, 12:52:51 pm »
I've "cat"  :palm: in one .txt file all the instructions from Mark that helped me transfer the EMC personality into my HP8594E with option 103, using Linux Mint 19.1 Cinnamon and NI PCI-GPIB card. I've also attached the modified scripts that worked for me.

Thanks for the effort Mark!

Enjoy!
Fear does not stop death, it stops life.
 
The following users thanked this post: MarkL

Offline MarkL

  • Supporter
  • ****
  • Posts: 2120
  • Country: us
Re: HP8590E Series Option 103 Driver
« Reply #53 on: March 23, 2019, 02:40:43 pm »
Woke up and checked the MSB and LSB and they match the exact file size.
One of the errors so far was that I forgot the final ;.

But it still doesn't work. I think there is some final CrLf missing or similar. Transmission always leaves the device waiting for more bytes or gives a wrong checksum error.

Had to leave for the day but I am still believing I might reload my backup to the device.

Regards,
Vitor
The USTATE you posted in the zip file does not appear to match in length.  The length inside ustate.txt is 0x4ac2 == 19138, but the length of the file itself is 19711.

I also get a CRC error when trying to load your file, and it wiped out my user memory.

But looking at the contents of your file, I agree you haven't lost anything of consequence.  It seems to be leftovers from some kind of semi-automated calibration and health checks for the SA itself.  There's lots of unlocking of service level routines (CF-2001HZ), and I see a bunch of undocumented calibration commands.  It's probably a good thing it didn't run.

It's possible that buried in these undocumented commands is a way to automate backup of the calibration constants which, AFAIK, the only official way to back them up is to manually write them down.

Also, in re-reading more about the USTATE command, it does not back up everything in user memry.  It gets almost everything, but does not includes setups saved by the user (and maybe something else I've missed?).  It only captures what's explicitly listed in the programmer manual.

I was able to do a very simple test of clearing memory, setting a variable, dumping via USTATE, clearing memory, and restoring via USTATE.  The variable came back correctly.  So, this verifies with a reasonable amount of confidence that my GPIB scripts are working.  I'm beginning to think that maybe something is just plain broken with USTATE, or maybe the problem is it doesn't work with DLPs or some other structures loaded from a card, perhaps on purpose.
 

Offline MarkL

  • Supporter
  • ****
  • Posts: 2120
  • Country: us
Re: HP8590E Series Option 103 Driver
« Reply #54 on: March 23, 2019, 02:47:52 pm »
I've "cat"  :palm: in one .txt file all the instructions from Mark that helped me transfer the EMC personality into my HP8594E with option 103, using Linux Mint 19.1 Cinnamon and NI PCI-GPIB card. I've also attached the modified scripts that worked for me.

Thanks for the effort Mark!

Enjoy!
Thanks for consolidating all that!

The biggest problem all along was that I didn't realize we were using the wrong shell in Mint.  All those syntax errors would have been accepted by bash since it still recognizes the obsolete syntax.   Cleaned up now the hard way, but live and learn!
 

Offline Bicurico

  • Super Contributor
  • ***
  • Posts: 1707
  • Country: pt
    • VMA's Satellite Blog
Re: HP8590E Series Option 103 Driver
« Reply #55 on: March 23, 2019, 10:05:46 pm »
Woke up and checked the MSB and LSB and they match the exact file size.
One of the errors so far was that I forgot the final ;.

But it still doesn't work. I think there is some final CrLf missing or similar. Transmission always leaves the device waiting for more bytes or gives a wrong checksum error.

Had to leave for the day but I am still believing I might reload my backup to the device.

Regards,
Vitor
The USTATE you posted in the zip file does not appear to match in length.  The length inside ustate.txt is 0x4ac2 == 19138, but the length of the file itself is 19711.

I also get a CRC error when trying to load your file, and it wiped out my user memory.

But looking at the contents of your file, I agree you haven't lost anything of consequence.  It seems to be leftovers from some kind of semi-automated calibration and health checks for the SA itself.  There's lots of unlocking of service level routines (CF-2001HZ), and I see a bunch of undocumented calibration commands.  It's probably a good thing it didn't run.

It's possible that buried in these undocumented commands is a way to automate backup of the calibration constants which, AFAIK, the only official way to back them up is to manually write them down.

Also, in re-reading more about the USTATE command, it does not back up everything in user memry.  It gets almost everything, but does not includes setups saved by the user (and maybe something else I've missed?).  It only captures what's explicitly listed in the programmer manual.

I was able to do a very simple test of clearing memory, setting a variable, dumping via USTATE, clearing memory, and restoring via USTATE.  The variable came back correctly.  So, this verifies with a reasonable amount of confidence that my GPIB scripts are working.  I'm beginning to think that maybe something is just plain broken with USTATE, or maybe the problem is it doesn't work with DLPs or some other structures loaded from a card, perhaps on purpose.

Oh dear! I hope you did not lose anything important...

I have been playing further with the USTATE command and I am not able to make it work, even after downloading the current state with just 3 DLP and 3 KEYDEF.

It seems to me that the 8590 is doing some control character transformations that are inconsistent with Keysight. Like CrLf to \n or "%" to ",".

Also, it is strange that FUNCDEF sends a DLP with a certain syntax, but doing DLPNAME? returns that DLP with a slightly different header and footer (first 5 bytes need to be ignored and the closing ";" is missing).

I decided to abandon the use of USTATE. I find it to be too dangerous: you wipe out the whole RAM in a split second and I am not even sure what could happen if you manage to upload a corrupt dump. I don't want to risk ending up corrupting the CAL data...

So I implemented so far the CAT function that lists the catalog into a list box. Here you can select DLP or KEYDEF and download them into the built-in editor. The software restores the correct headers. You can then upload the file again or save it locally.

I need to do the routines to download KEYMAP and variables (not sure what other filetypes I need to contemplate).

Once that is done, there will be a button to download all supported filetypes into a local folder and another button to upload all files in the selected local folder.

I think this is what you are doing with Python under Linux.

Anyway, no more USTATE for me...

Regards,
Vitor

Offline Bicurico

  • Super Contributor
  • ***
  • Posts: 1707
  • Country: pt
    • VMA's Satellite Blog
Re: HP8590E Series Option 103 Driver
« Reply #56 on: March 23, 2019, 10:22:42 pm »
Here is the "S_CAP" program, which I restored manually.

Code: [Select]
FUNCDEF S_CAP,@
$;ANNOT OFF;GRAT OFF;BLANK TRA;CLRDSP;MN0;CSIZE 1,1;PU;PA; 200, 50;PD;PR;110,70;90,0;0,-70;-25,0;0,-15;25,0;0,-40;-200,0;0;55;PU;10,-50;TEXT%o%;PU;150,100;TEXT%o%;DRAWBOX  250, 35, 265, 25,5,5;CSIZE;PU;PA; 125, 135;PD;PR;55,0;70,-100;4,10;-4,-10;-15,5;PU;PA;120,200;TEXT%Verify Super-Cap Voltage%;PU;PA;120,190;TEXT%========================%;PU;PA;-10,170;TEXT%- Lift the edge of the shield on%;
PU;PA;-10,160;TEXT%  the memory board.%;
PU;PA;-10,150;TEXT%- Touch the test fixture probe to%;
PU;PA;-10,140;TEXT%  the square pad of C1 on the%;
PU;PA;-10,130;TEXT%  memory board.%;
PU;PA;-10,120;TEXT%- The LED in the%;
PU;PA;-10,110;TEXT%  test fixture must%;
PU;PA;-10,100;TEXT%  light for the board%;PU;PA;-10,90;TEXT%  to PASS.%;PU;PA;-10,80;TEXT%- Press ENTER when done.%;HD;EP;MPRST;MN1;
@;

In only draws the pic of the memory board and shows where the testpoint is.

The interesting part of the code are the non-documented commands on the end, which wait for the ENTER key to be pressed and return to regular spectrum mode.

I am honestly fascinated by the fact that you have a whole script-language inside the 8590 Series. It even features a built-in editor and this is why there is a keyboard port!

I am now realizing I should be posting this in the hacking old HP spectrum analyzer thread...

Anyway, my conclusions so far are:

1) Do NOT use the USTATE command to upload a dump! It will mess up user memory
2) Do USE the USTATE? command, as you get an almost complete dump and you can use Notepad++ to extract the individual DLP files and restore them

Regards,
Vitor

Offline MarkL

  • Supporter
  • ****
  • Posts: 2120
  • Country: us
Re: HP8590E Series Option 103 Driver
« Reply #57 on: March 23, 2019, 11:19:08 pm »
I agree with your conclusion not to use USTATE.  It's losing situation.  I was not aware that if it failed it wiped out everything.  That's pretty bad.

I didn't lose anything important.  The analyzer only had the EMC/QPD drivers loaded and I reloaded them in about a minute.  I should probably verify my calibration constants with the paper backup after trying to load your USTATE.

Quote
I think this is what you are doing with Python under Linux.

More or less.  I did it with Perl, but the implementation is not generalized enough to grab *everything* in memory.  I had a very specific goal in mind, so things I could see that were not used in the EMC/QPD driver, like ONEVENTS, were not handled.  The scripts are fairly well documented as to all the oddities I found in parsing and playing back the various definitions.  You'll need to do the same.

Yeah, let's take further discussion over to the hacking thread...

  https://www.eevblog.com/forum/testgear/hacking-old-hp-spectrum-analyzers/msg421596/#msg421596
 

Offline Bicurico

  • Super Contributor
  • ***
  • Posts: 1707
  • Country: pt
    • VMA's Satellite Blog
Re: HP8590E Series Option 103 Driver
« Reply #58 on: March 24, 2019, 06:34:20 pm »
@Miti: Would you mind running my software to download your internal memory? This should generate one single text file with the whole EMC Personality...

PM me if interested.

Regards,
Vitor


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf