I’ve finished a driver for an old but capable series of power supplies that possesses no measurement output capabilities via remote control, it just receives commands and allows for reading a status register.
Now, common wisdom has been to put any power supply into SMU category. But this unit won’t return a measured voltage and current. How should this be handled? It can probably reside in the SMU category anyway, as its users should be well aware of this shortcoming (which will still be mentioned in the driver’s description). But what to do within the driver programming regarding returned values?
The SMU module seems to demand two return values. For now, I set both just to Voltage, unit V, set both to False for plotting and saving and I am returning a fixed “0” for both return values.
yes, we have used the SMU module to implement several power supply units (PSU) as both are very similar regarding set/get voltages/currents.
In case an instrument can only read voltages/currents, such as a multimeter, we typically use the Logger module. In your case where the instrument is a voltage or current source with no readback of measured values, the Switch module is a good choice here.
To change the driver, you just need to replace the module name in the folder of the driver from “SMU” to “Switch” and restart SweepMe! (to reload all drivers). Now, your driver will be shown in the list of Switch drivers and all GUI paramters that you used will automatically be shown in the Parameter box of the Switch module.
Hope this helps and let us know if there is another question.
This was a good suggestion. I modified the driver accordingly and it now works flawless. I just opened a pull request for it:
The Rohde & Schwarz NGPV series of power supply is a strange beast. They are 19" rack power supplies which were available also with an additional shell as standalone devices and both versions were available without any controls for pure remote operation as well. The NGPV series is mentioned in their 1984 catalog without any “new” lables and still listed in their 2004/2005 catalogue without any discontinuation notice, so it was in production for over 20 years. It seems that it has its roots in the end of the 70s or beginning of the 80s and that it was a kind of first-contact to GPIB for R&S.
To better understand how the driver works, one needs to have a look at the frontplate of the instrument and understand how it operates:
You use the levers on the rotating numerical counter within the red box to set a voltage and current compliance limit. After pressing the ENTER key, the value gets transmitted to the LED display in the green box. This is the setting that the PSU will use for its output. The actual output voltage and current gets measured/read-back via the analogue needle displays in the blue box.
It is now apparent how the unit can process input from a mechanical counter as well as digital values via GPIB: because both get transmitted to the LED display as the only source for the output values. The mechanical counter setting (red box) is not processed at any point but just when the ENTER key is pressed. After that, it remaines where it is without being reconsidered by the insturment again.
But because the instrument has two dirrefent current modes that offer different maximum values and resolutions, there is no fixed decimal point position on the mechanical counter. This gets apperent when reading the GPIB programming section of the manual: the instrument expects just a 4 digit number for voltage and a 3 digit number for current and will ignore any decimal points or commas or milliampere "m"s. Operating the instrument, you have to watch out where the decimal point is “virtually” depending on the chosen current mode.
Within the driver, the solution is to convert the given values to a numerical full-value while respecting the expected input format. For this, I implemented a nested dictionary that requires the operator to first choose which NGPV model he wants to control. When, he is offered with the choice of the available current modes per NGPV model, which link to a formating rule that is applied to the compliance input. In the same way but in a simple dictionary, the given NGPV model version is used to hand over the right formating rule for the input voltage.
There is a quirk in so far as that all models (with one exception) will stop operating if the voltage entered resembles their model ID, e.g. 300V for the NGPV. Because they could not make the mechanical counter allow 299.9V and 300.0V but not 399.9V, they just maxed out each instrument at minus one last digit, e.g. 299.9V instead of 300V. I though about creating a dictionary for the maximum values as well and to a model depended check before each applied value. But in the end, I think this would slow down the code unnesessarily as it is an easy thing to remember. Also, the instrument will set the output to 0V natively and start blinking with its display if the maximum votlage requested is above is maximum limit so no harm done here.
thanks a lot for opening another pull request! I is really nice to see that we can also give such older equipment a second life.
I really love your detailed explanations to the instruments. Did you already stumble across our new description feature? It is now possible to add description to each driver that can be edited via markdown or html in a separate file, e.g. to add also images.
If you are fine, we will copy your forum text into the description including the image and bundle it with the driver. You can then see in the PR how it is done and we can use it as a good example for an upcoming post in the forum about the new description feature.
Thanks for your contribution! The driver is now available for download to all SweepMe! users.
I have added your forum post and the image to the drivers description. You can open it by clicking the blue “?” Icon next to the driver name in SweepMe!.