Products > Test Equipment

Open source lxi-tools and liblxi v1.0 released for GNU/Linux

<< < (3/67) > >>

lundmar:
I've added screenshot support for more instruments:


--- Code: ---$ lxi screenshot --list
            Name   Description
keysight-iv2000x   Keysight InfiniVision 2000 X series oscilloscopes (experimental)
           rigol   Rigol 1000z/2000/4000 series oscilloscopes
      rs-hmo1000   Rohde & Schwarz HMO 1000 series oscilloscopes (experimental)
  tektronix-2000   Tektronix MSO/DPO 2000 series oscilloscopes (experimental)

--- End code ---

It's experimental since I don't have the instruments to test on. But in theory it should work assuming the instrument documentation is accurate :)

Example:

--- Code: ---lxi screenshot --adress 192.168.0.40 --model rigol screenhot.png
Saved PNG screenshot image to screenhot.png

--- End code ---

RoGeorge:
Great, thank you!  :-+

Questions and comments:

- AFAIK all Rigol oscilloscopes use the same SCPI command for a screenshot. Why it was necessary in the code to separate them by 1000/2000/4000 models?
- Also, since lxi-tools allows running a SCPI text file, why not just defining a text SCPI file for each instrument, so the user can add its own instrument any time?
- A thing that I noticed when capturing screenshots with my software was that I was lazy enough to write a small script to increment the file name, so I made the code to put a timestamp in the filename. That was useful because once a command it's typed in the terminal, it's very easy to repeat it by simply "up arrow" and "enter", and the previous screenshot files will not be overwritten.
- I can add screnshots for the Rigol DG4000 DDS signal generators if you want, and for the Rigol DP832 power source. Should I make a pull request, or just tell you here the SCPI commands after manually testing them on my instruments?

lundmar:

--- Quote from: RoGeorge on October 30, 2017, 07:27:58 pm ---- AFAIK all Rigol oscilloscopes use the same SCPI command for a screenshot. Why it was necessary in the code to separate them by 1000/2000/4000 models?

--- End quote ---
I know. It is the exact same plugin code being run for all the rigol model names but I though it looked better in the list but I think I will end up collapsing it back into one model name "rigol".


--- Quote from: RoGeorge on October 30, 2017, 07:27:58 pm ---- Also, since lxi-tools allows running a SCPI text file, why not just defining a text SCPI file for each instrument, so the user can add its own instrument any time?

--- End quote ---
The point of the screenshot command is to make it extremely simple to quickly grab a screenshot from a supported model. The best thing for users to do is to simply push a plugin upstream or use liblxi to solve their screenshot needs. Also, you cant easily define in a text file how to strip headers/footers of various complexity - it would quickly become a messy solution. However, I have been pondering to add support for maybe sending/receiving binary data via files using the "lxi scpi" command, in which case users can do whatever they want, even implement screenshot capturing for unsupported models even though I would prefer them to push plugins so everyone can benefit.


--- Quote from: RoGeorge on October 30, 2017, 07:27:58 pm ---- A thing that I noticed when capturing screenshots with my software was that I was lazy enough to write a small script to increment the file name, so I made the code to put a timestamp in the filename. That was useful because once a command it's typed in the terminal, it's very easy to repeat it by simply "up arrow" and "enter", and the previous screenshot files will not be overwritten.

--- End quote ---
I want the user to be able to explicitly define the resulting filename regardless of image format. This way you can do exactly what you just have done via scripting. But maybe I could make the filename optional so that if no filename is provided it will automatically save to screenshot001.png, screenshot002.png, etc.. Timestamp is not necessary as it would be redundant information since files include a time stamp. **DONE**


--- Quote from: RoGeorge on October 30, 2017, 07:27:58 pm ---- I can add screnshots for the Rigol DG4000 DDS signal generators if you want, and for the Rigol DP832 power source. Should I make a pull request, or just tell you here the SCPI commands after manually testing them on my instruments?

--- End quote ---

Sure, do a pull request if you want to take a shot at the code. Actually, I was looking a bit quickly through the DP832 docs but didn't find the scpi command for capturing screenshots. I assume it is the same as other rigols but I'm not sure. If not, we can quickly create plugins for specific Rigol models.

lundmar:
FYI - I've added raw/TCP support for sending commands:


--- Code: ---lxi scpi --raw --address 192.168.0.42 "*IDN?"
RIGOL TECHNOLOGIES,DS1104Z,DS1ZA1234567890,00.04.04.SP3

--- End code ---

It is faster than VXI-11 but does not provide the same advantages that VXI-11 brings, in particular there is no timeout/control handling in case your SCPI command somehow stalls/crashes.

A configurable communications backend has also been added to liblxi in the effort to support raw/TCP and also in preparation for adding support for HiSlip/TCP in the future.

These changes will be included in the upcoming releases.

lundmar:

--- Quote from: RoGeorge on October 30, 2017, 07:27:58 pm ---- I can add screnshots for the Rigol DG4000 DDS signal generators if you want, and for the Rigol DP832 power source. Should I make a pull request, or just tell you here the SCPI commands after manually testing them on my instruments?

--- End quote ---

Please, if you can don't hesitate to test the lxi tool with any LXI/LAN enabled instrument you have :)


I'm looking to hear from anyone who would like to test lxi-tools with their LXI/LAN instruments so that we can improve it steadily. The more instruments that the tools are tested against the better. I'm going to add a list of tested instruments in the README.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod