Author Topic: Prema 6048 / GPIB comms?... Or maybe general thread on GPIB readings harvesting  (Read 7953 times)

0 Members and 1 Guest are viewing this topic.

Offline RaxTopic starter

  • Super Contributor
  • ***
  • Posts: 1068
  • Country: us
And here it is in all its glory. Thanks goes to ch_scr (the actual coder in all this) and dieter1 (who helped with input based upon his intimate knowledge of the Prema). I have been the muscle in all this!!  ;D

Some details on how it works:
  • This essentially saves the reading from the Prema to a file every 20s (this is because I always use 20s integration to get all 8.5 digits).
  • It'll query the resources available over GPIB and list them first when ran (I use IDLE Shell to see it running). I found this to be helpful particularly with a meter that's I think relatively parsimonious with comms/replies over GPIB. A simple "IDN" ask over GPIB would throw the Prema into mA mode and a few other similarly distasteful things ;).
  • "GPIB_XY" is the Prema's GPIB port. The script first lists GPIB resources, but you can also do this separately (pyvisa-shell, for instance), and insert in there any piece of the name that will help the script know who to talk to.
  • This creates a "log.txt" and places it in the same folder to where Python is. It's then easy to import this data in the spreadsheet of choice for tabulating, graphing, etc.
  • It sets the Prema for VDC (which can obviously be anything the Prema can measure), Autorange, short format reading (otherwise it adds a ton of useless info to the string), and 20s integration as per above

I hope others will find this useful! It's blown my mind and I can get enough readings at my bench now.

EDIT: v1.1 adds:
  • user input file name at the beginning of each run
  • date/time stamp for each reading collected


Log: v0 = 54 downloads
« Last Edit: December 01, 2023, 02:37:28 pm by Rax »
 
The following users thanked this post: coromonadalix

Offline SanderMTI

  • Newbie
  • Posts: 8
  • Country: ca
Whatever a Prema 6048 is, if it can produce a reading, It will work with the universal GPIB/RS232 tool I wrote
to read meters.
No coding or scripting, just tell the software what the read command is and it will throw timed data into a .csv file.
See my post on it, email me if you want a copy.

Sander


 

Offline RaxTopic starter

  • Super Contributor
  • ***
  • Posts: 1068
  • Country: us
I'm increasingly stunned not one thanked the post with the software. 27 downloads!....
Possible explanations:
  • No one has a Prema 6048. Nope, can't be this. I think they made a few.
  • No one is aware there's a "thank you" button. Seriously?
 

Offline branadic

  • Super Contributor
  • ***
  • Posts: 2444
  • Country: de
  • Sounds like noise
If you are fishing for compliments I guess this board is the wrong place to look for it ;)
I have different scripts running for many years, so to me it's nothing new and I assume that is true for a lot of other participants.

-branadic-
Computers exist to solve problems that we wouldn't have without them. AI exists to answer questions, we wouldn't ask without it.
 
The following users thanked this post: Rax, TUMEMBER

Offline TUMEMBER

  • Contributor
  • Posts: 41
  • Country: pl
    I'm increasingly stunned not one thanked the post with the software. 27 downloads!....

    • No one is aware there's a "thank you" button. Seriously?
    Does it really bother you that much?
    Realize that people on this globe also live "at different times" and, for this reason alone, they may be "a little distracted" and "not give a thumbs up". Nobody seriously forces you to share the results of your work (software) on this forum - it's voluntary. If someone does it, it's great, but don't expect that every other user has to "bow down" to him. IT DOES NOT WORK LIKE THAT. If you want to act on the basis of the "common good" (volunteering), that's OK. Your emotional attitude is so aggressively American that it can be easily recognized even without the national flag.
    You can be offended at me, but I'm fed up with the forced "association" first with the "Russians" and now with the "Yankees".
     

    Offline RaxTopic starter

    • Super Contributor
    • ***
    • Posts: 1068
    • Country: us
    Nope, it doesn't bother me too much. I'm very happy to share the results on my work, as I've done for many years here and elsewhere.

    As most of you know, I'm very appreciative of all the help I get and I personally thank effusively for it. But that's me, and to simply expect the same from others is indeed nearsighted.
     

    Offline RaxTopic starter

    • Super Contributor
    • ***
    • Posts: 1068
    • Country: us
    If you are fishing for compliments I guess this board is the wrong place to look for it ;)
    -branadic-

    Obviously not, if you read my post. Any compliments should go to ch_scr and dietert1. Besides, there's no second "add compliments" button to the barebone "Say Thanks" button ;)
     

    Offline RaxTopic starter

    • Super Contributor
    • ***
    • Posts: 1068
    • Country: us
    Thank you to those that thanked me offline. Also, those reporting this provides visibility, so without it they wouldn't have known the script is available.

    I guess without visibility, the contribution to this community (which is my reason for doing this) doesn't... exist.
     

    Online dietert1

    • Super Contributor
    • ***
    • Posts: 2372
    • Country: br
      • CADT Homepage
    Aside from some macho competition this forum also works as a library and you may receive thanks for the code you posted after a year or two when somebody else begins using a Prema 6048. eevblog posts have a good ranking with Google, if someone searches for specialties like Prema 6048.
    Are you working on your setup? Include time stamps into the log? Logging temperature to estimate residual temperature coefficient? Did you try the linearity mods to improve nulling?
    I always wanted to look at the temperature compensation of the Prema 6048. I mean it is one of very few instruments that claim to implement residual TC compensation in firmware using the internal temperature sensor reading. I checked that one can pull the BK7 ADC from the temperature measurement circuit and the instrument will then run but of course without that compensation. Remains to determine the difference with and without the temperature ADC.

    Regards, Dieter
     
    The following users thanked this post: Rax

    Offline RaxTopic starter

    • Super Contributor
    • ***
    • Posts: 1068
    • Country: us
    Include time stamps into the log?

    Yes - ch_scr (I mention him again, though he may start sternly admonishing me if I put him too much in the limelight ;)), he helped with that too. So, yes.

    Did you try the linearity mods to improve nulling?

    Not yet, though I have all parts I need. Possibly this weekend, if my 60hrs+ "actual job" week load gives me a breather.

    Part of the reason is I became a bit too frustrated with the F5440A... Though, of course, this part doesn't rely on the F5440A at all.

    I always wanted to look at the temperature compensation of the Prema 6048. I mean it is one of very few instruments that claim to implement residual TC compensation in firmware using the internal temperature sensor reading. I checked that one can pull the BK7 ADC from the temperature measurement circuit and the instrument will then run but of course without that compensation. Remains to determine the difference with and without the temperature ADC.

    I'll be happy to start looking into it.
    « Last Edit: December 01, 2023, 01:52:37 am by Rax »
     

    Offline RaxTopic starter

    • Super Contributor
    • ***
    • Posts: 1068
    • Country: us
    Aside from some macho competition

    I don't know if macho, or just some sort of nationalistic (beats me). TUMEMBER may be surprised to learn I was born far, far closer to him than he imagines, and I learned to thank those that genuinely help during my youth there (his neck of the woods). Plainly put, my mother's responsible for that. The idea that I needed to move here to do that is preposterous.

    In fact, I probably moved to the US at an age that is older than he/she is (judging by their demeanor, and their 23 posts on this community this far), but that's for their growth trajectory to consider.
    « Last Edit: December 01, 2023, 03:13:41 am by Rax »
     

    Offline RaxTopic starter

    • Super Contributor
    • ***
    • Posts: 1068
    • Country: us
    Please see updated v1.1 script with added and revised functionality. The date/time stamps will drop themselves in consecutive columns in a spreadsheet and complement the value readings.
     

    Offline Xyphro

    • Regular Contributor
    • *
    • Posts: 116
    • Country: de
    Hey guys,

    Just see you talk about my gpib adapter.
    The auto id can be indeed turned off to avoid the *idn? Query affecting instuments that don't support it. It is described in the readme.md.
    Having autoid default wise on was not the best decision to be frank - old instruments don't like it.

    Busy making a combined usb high speed/ethernet vxi-11 variant. In case there are special wishes let me know. There is a thread in the issues section where I post updates on this device.
    Having a bigger mcu and ethernet means that I might also consider making an device mode where the adapter could emulate a plotter or so in parallel to device functionality...

    Btw: it is possible to run ar488 firmware on the same HW. One guy did this to track down an issue.

    Best regards,

    Kai

    Looking for a unique, cheap versatile USB to GPIB adapter with standard USBTMC interface?
    Build it yourself :-) https://github.com/xyphro/UsbGpib
     
    The following users thanked this post: Rax

    Offline RaxTopic starter

    • Super Contributor
    • ***
    • Posts: 1068
    • Country: us
    The auto id can be indeed turned off to avoid the *idn? Query affecting instuments that don't support it. It is described in the readme.md.

    I'll have to look into it, but good to know. I assume it's applied in the firmware?

    Busy making a combined usb high speed/ethernet vxi-11 variant. In case there are special wishes let me know.

    Best regards,

    Kai

    That's very interesting news, I think many prefer to communicate with the instruments over the network. In my case, not so much, but it's just how my bench is setup (desktop workstation connected to the rest of my network over wifi). That said, I also generally prefer all my devices be direct clients to my home network.
     


    Share me

    Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
    Smf