EEVblog Electronics Community Forum
Products => Test Equipment => Topic started by: luudee on May 02, 2023, 10:41:52 am
-
Hi Guys and Gals,
I would like to write a tool to control my SCPI capable instruments.
I would prefer to use java as it has the most sophisticated GUI tools,
and is cross-platform usable.
Yes, yes, I have seen the "TestController" and have tried to use it,
but it is not very well documented and doesn't seem to work for me.
It would be nice to find a Java library that can interface with
various VISA implementations.
Any pointers appreciated!
Cheers,
luudee
-
Tha Java path is not so well travelled. You’ll find python most of the time. I found python for SCPI is robust, reproducible, if you add Jupyter notebooks, pandas and pychart to the mix the productivity skyrockets over Java tinkering. I say this after 25 years Java experience.
-
Thank you Dobsonr for your feedback.
My main reason for looking at java, was building GUIs. Something I find draconian when using tkinter.
Would you have perhaps better suggestions for GUIs and python ?
Again, thank you for the feedback, much appreciated !!!
luudee
-
It depends what level of GUI you want. You can have a real time updating digram or histogram, a few action buttons with practically no coding effort, as long as you are fine with a Jupiter notebook. It runs in a browser window. Can iterate fast and stick to the measurements, not spend time on UI code development. And dataset handling with pandas and advanced math is also coming free.
So my suggestion is try Jupyter - lots of tutorials exist. Here is one: https://notebook.community/seewhydee/ntuphys_nb/jupyter_tutorial/jupyter_tutorial_02
-
Thank you again Dobsonr, I will try out Jupyter !
-
I believe there are some Java wrappers for VISA libraries, and of course you could wrap it yourself using JNI. But in both cases you'll likely be compromising cross-platform abilities. I agree with dobsonr741 that this is not a well traveled path, so I'd only take it if you're heavily invested in it.
In Python there are pure-Python implementations of some of the common VISA transports like VXI-11 (https://github.com/python-ivi/python-vxi11) (SCPI over the network), which I'd say are the most portable solutions. There are also wrappers around for example USB-GPIB drivers (https://github.com/pyvisa/pyvisa-py) or the commercial VISA implementations (https://github.com/pyvisa/pyvisa), but I personally prefer not to bother and talk VXI-11 in pure Python. That's the least hassle for me.