Author Topic: Open source lxi-tools and liblxi v1.0 released for GNU/Linux  (Read 9106 times)

lundmar and 2 Guests are viewing this topic.

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #175 on: January 13, 2018, 06:14:57 AM »
Great!  :-+ I now managed to snap refresh lxi-tools, and can confirm that the Keysight screenshot works as intended. :-+

Good - I've added it to the list of tested instruments. Thanks for testing  :-+

The UI looks good too. Will it be possible to have multiple windows open, so you can send commands to more than one device at once? E.g. you might want to send frequency commands to an AWG, and measurement commands to a scope...

Well, yes and no. You can open multiple instances of the application and this way control multiple instruments through different windows.

However, the tab views you see will only support one instrument at a time - namely the one selected.

The feature you are describing is something that I hope to eventually support in a script feature which might become part of lxi-gui.

Meaning, you will be able to use lxi-gui to build a script which contains various action items such as SCPI commands managing one or more instruments.

Each action item will be written in Lua which is a simple, fast, and powerful scripting language.

Lua will make it possible to create scripts looking like this (example):

Code: [Select]
inst0 = connect("vxi11://10.0.0.42")
inst1 = connect("vxi11://192.168.0.21")

scpi(inst0, ":source:frequency 10000")

sleep(1000)

voltage = scpi(inst1, ":measure:voltage:dc?")
if (voltage < 10.5) then fail() end

disconnect(inst1)
disconnect(inst0)

Or, a slightly different but object oriented variation of the same:

Code: [Select]
inst0 = connect("vxi11://10.0.0.42")
inst1 = connect("vxi11://192.168.0.21")

inst0.scpi(":source:frequency 10000")

sleep(1000)

voltage = inst1.scpi(":measure:voltage:dc?")
if (voltage < 10.5) then fail() end

disconnect(inst1)
disconnect(inst0)

Each section in this script can be a separate item in a graphical representation of the script.

The script can be saved/loaded from the application and there will be "play", "pause", "stop" buttons. When you press play it will run the script and each action item will be marked red or green depending on if they fail or succeed.

I think it will work quite nicely. Even though I don't have any plans to add an elaborate GUI for handling graphical scripting blocks I'm making it so it will be possible to add in the future. Ultimately, having Lua scripting support will make it possible to do some of the graphical programming that application such as BenchVue supports.
« Last Edit: January 14, 2018, 10:31:39 PM by lundmar »
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple TTY terminal I/O application
http://dc-power-supply.github.io - OSHW DC power supply project
 
The following users thanked this post: ralphrmartin

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 13291
  • Country: nl
    • NCT Developments
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #176 on: January 14, 2018, 02:27:09 AM »
Lua support would be a great feature!  :-+
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #177 on: January 14, 2018, 03:16:34 AM »
Lua support would be a great feature!  :-+

I think so too. Of all the scripting languages Lua is quite beautiful/straightforward and it has all the basic language features that are required for logic control. It helps keep the script syntax simple.
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple TTY terminal I/O application
http://dc-power-supply.github.io - OSHW DC power supply project
 

Offline alm

  • Super Contributor
  • ***
  • Posts: 1127
  • Country: 00
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #178 on: January 14, 2018, 08:54:13 PM »
If you develop this into an instrument control GUI and scripting language, would it not make sense to use an abstraction like VISA rather than interfacing with LXI directly? Otherwise developing a script while having an instrument without LXI in the mix (USBTMC/GPIB/RS-232) becomes a pain, while in VISA you would only change the connection string.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #179 on: January 14, 2018, 10:09:25 PM »
If you develop this into an instrument control GUI and scripting language, would it not make sense to use an abstraction like VISA rather than interfacing with LXI directly? Otherwise developing a script while having an instrument without LXI in the mix (USBTMC/GPIB/RS-232) becomes a pain, while in VISA you would only change the connection string.

I understand what you are saying but I'm afraid adding a VISA abstraction is beyond the scope and resources of this project.

As you said, VISA abstracts various interfaces such as VXI11/USBTMC/GPIB/RS-232. However, since this is lxi-tools the focus is exclusively on the interfaces supported by the LXI standard (VXI11/HiSLIP etc.) so for this project there are no plans to support other interfaces nor add a full blown VISA API in e.g. Lua.

What you are suggesting is something which would be an excellent feature for a future open source visa-tools project ;)
« Last Edit: January 14, 2018, 10:22:52 PM by lundmar »
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple TTY terminal I/O application
http://dc-power-supply.github.io - OSHW DC power supply project
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 13291
  • Country: nl
    • NCT Developments
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #180 on: January 14, 2018, 10:29:50 PM »
If you develop this into an instrument control GUI and scripting language, would it not make sense to use an abstraction like VISA rather than interfacing with LXI directly? Otherwise developing a script while having an instrument without LXI in the mix (USBTMC/GPIB/RS-232) becomes a pain, while in VISA you would only change the connection string.
A better approach would be to add support to send commands to USBTMC or a COM port (both are pretty similar). VISA is way too bloated.
« Last Edit: January 14, 2018, 11:03:46 PM by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #181 on: January 14, 2018, 10:39:43 PM »
If you develop this into an instrument control GUI and scripting language, would it not make sense to use an abstraction like VISA rather than interfacing with LXI directly? Otherwise developing a script while having an instrument without LXI in the mix (USBTMC/GPIB/RS-232) becomes a pain, while in VISA you would only change the connection string.
A better approach would be to add support to send commands to USBTMC or a COM port (both are pretty similar). VISA is way to bloated.

I agree, if you look at the general syntax and features of VISA you either love it or hate it.

The interface that I plan to support in Lua will be much simpler - just a basic interface for sending SCPI commands, handling responses, and reporting failed test cases.

If this Lua interface proves itself to be useful/efficient/successful , one could consider expanding and adding support for non-LXI interfaces but I think that is something which should be reserved for another project.
« Last Edit: January 14, 2018, 11:17:10 PM by lundmar »
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple TTY terminal I/O application
http://dc-power-supply.github.io - OSHW DC power supply project
 

Offline alm

  • Super Contributor
  • ***
  • Posts: 1127
  • Country: 00
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #182 on: January 14, 2018, 11:05:53 PM »
A better approach would be to add support to send commands to USBTMC or a COM port (both are pretty similar). VISA is way to bloated.
I was not suggesting to use the NI-VISA implementation, but abstracting the protocol used to access an instrument. For example, there is a Python implementation that is pretty light weight. When I was controlling a DSO that could either controlled through RS-232 or GPIB, I made my own abstraction that would call either ibconfig(), ibwrt() etc for GPIB, or tcsetattr(), write() etc for RS-232, so I did not have to sprinkle conditionals all through my code.

But obviously in a volunteer project the decision on what direction to go is entirely on the developers doing the work.
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #183 on: January 14, 2018, 11:55:30 PM »
A better approach would be to add support to send commands to USBTMC or a COM port (both are pretty similar). VISA is way to bloated.
I was not suggesting to use the NI-VISA implementation, but abstracting the protocol used to access an instrument. For example, there is a Python implementation that is pretty light weight. When I was controlling a DSO that could either controlled through RS-232 or GPIB, I made my own abstraction that would call either ibconfig(), ibwrt() etc for GPIB, or tcsetattr(), write() etc for RS-232, so I did not have to sprinkle conditionals all through my code.

But obviously in a volunteer project the decision on what direction to go is entirely on the developers doing the work.

I think supporting non-LXI interfaces is out of scope for lxi-tools, VISA abstracted or not.

However, I do plan to support instruments with GPIB/RS-232 etc. but do so via a LXI bridge adapter.

Once lxi-tools is in a good shape I hope to maybe design such a thing and support it with open source firmware :)

After all, the future is about everything being network connected :)
« Last Edit: January 14, 2018, 11:57:52 PM by lundmar »
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple TTY terminal I/O application
http://dc-power-supply.github.io - OSHW DC power supply project
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #184 on: January 17, 2018, 10:52:46 AM »
I've added the benchmark feature to the new lxi-gui application:

« Last Edit: January 17, 2018, 11:02:55 AM by lundmar »
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple TTY terminal I/O application
http://dc-power-supply.github.io - OSHW DC power supply project
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #185 on: January 18, 2018, 07:47:58 AM »
Basic screenshot feature added:





Still a lot to be done. Needs some sort of (full screen) image viewer feature and perhaps a screenshot live view feature (continuously take screenshots - in case of the SDS1204X-E it can perform about 3 frames/second which is pretty good).
« Last Edit: January 20, 2018, 01:06:11 AM by lundmar »
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple TTY terminal I/O application
http://dc-power-supply.github.io - OSHW DC power supply project
 
The following users thanked this post: tautech

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #186 on: January 19, 2018, 05:01:09 AM »
FYI - for those who want to try out the new lxi-gui application you should now be able to install and start it using the following commands:

Code: [Select]
$ snap install lxi-tools --edge
$ lxi-tools.lxi-gui

It should also be possible to simply start the application by searching for it in whatever desktop environment you have installed.

lxi-gui is still work in progress and I consider it BETA quality but the basic features are working (discover, SCPI, Screenshot, Benchmark).

If there is anyone out there who would like to help refine the GUI application please feel free to join the project.

I'm not an expert QT5 programmer so it takes time to figure out how to do QT stuff so any help would be appreciated, even if you have no experience in QT programming.

Also, if anyone have some good ideas on features or in which direction lxi-gui should go let yourself be heard :)

Some have suggested to add GUI frontends for various instruments. It is certainly a possibility but I don't have the bandwidth to create nor test such instrument specific interfaces myself. These are things which would be excellent to engage in by contributors who find such things useful. Imagine one of the tab views in lxi-gui automatically showing the instrument UI for the selected and supported instrument...
« Last Edit: January 20, 2018, 10:01:43 AM by lundmar »
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple TTY terminal I/O application
http://dc-power-supply.github.io - OSHW DC power supply project
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #187 on: January 20, 2018, 02:34:11 AM »
I've added the IEEE 488.2 Common Commands in the SCPI tab:



Each of the common command buttons displays a tool tip when hovering the mouse over the button.
« Last Edit: January 20, 2018, 09:51:59 AM by lundmar »
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple TTY terminal I/O application
http://dc-power-supply.github.io - OSHW DC power supply project
 

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #188 on: January 20, 2018, 07:46:33 PM »
The GUI is now fully responsive, meaning it supports resizing the application window to any size and the contents will adjust accordingly.

I consider the widget layout done. It's available via snap. I expect to include lxi-gui in an upcoming lxi-tools release.

This is what the final result looks like:











« Last Edit: January 21, 2018, 04:27:39 AM by lundmar »
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple TTY terminal I/O application
http://dc-power-supply.github.io - OSHW DC power supply project
 
The following users thanked this post: tautech, ralphrmartin

Online lundmar

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: dk
Re: Open source lxi-tools and liblxi v1.0 released for GNU/Linux
« Reply #189 on: Today at 04:48:48 AM »
First attempt at adding a simple data recorder feature:

https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple TTY terminal I/O application
http://dc-power-supply.github.io - OSHW DC power supply project
 
The following users thanked this post: ralphrmartin, HoracioDos


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf