Author Topic: Free DS1052E/DS1102E Software for Linux  (Read 38279 times)

0 Members and 1 Guest are viewing this topic.

Offline Bigman

  • Regular Contributor
  • *
  • Posts: 80
Re: Free DS1052E/DS1102E Software for Linux
« Reply #25 on: June 07, 2015, 02:59:43 pm »
I'll look at it. Is it both channels or just one?

This issue is on both channels.
BTW: after connecting, in the Rigol's display the letters "Rmt" are popping up on the top-right corner (very fast and short, almost hard to see).
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #26 on: June 07, 2015, 03:05:26 pm »
The Rmt is normal. There is an unlock button on the front tab. If you uncheck it, the scope keyboard will STAY locked until you shutdown qrigol. I didn't like that, so if you click unlock, qrigol unlocks the keyboard as soon as it is done using it so you can still push the knobs.

I can't reproduce the X10 issue -- I suspect it is some locale formatting of floating point numbers (do you use "," for a decimal point?) I am going to try to send you a test copy that may or may not fix it.
 

Offline Bigman

  • Regular Contributor
  • *
  • Posts: 80
Re: Free DS1052E/DS1102E Software for Linux
« Reply #27 on: June 07, 2015, 03:09:36 pm »
The Rmt is normal. There is an unlock button on the front tab. If you uncheck it, the scope keyboard will STAY locked until you shutdown qrigol. I didn't like that, so if you click unlock, qrigol unlocks the keyboard as soon as it is done using it so you can still push the knobs.

I can't reproduce the X10 issue -- I suspect it is some locale formatting of floating point numbers (do you use "," for a decimal point?) I am going to try to send you a test copy that may or may not fix it.

I am living in Germany, and yes, you are right. Here we use the use the comma instead of the dot. E.g. 1/2 is in Germany 0,5 and NOT 0.5.
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #28 on: June 07, 2015, 03:14:28 pm »
The test version I provided may help. What I think is happening is the scope is returning something using a "." separator and the Qt libraries are sensitive to your locale and are thus using a "," separator and that's confusing things. The bad news is that's going to confuse a lot of things. The good news is I have all the floating point pieces in one place, so maybe if my theory is right it won't be that hard to fix. Let me know if that test case fixes it.

And yes, I have been to beautiful Germany before as a side trip from the Netherlands. Last time I drove to Koln to see the big church there. So impressive.
« Last Edit: June 07, 2015, 03:16:00 pm by wd5gnr »
 

Offline Bigman

  • Regular Contributor
  • *
  • Posts: 80
Re: Free DS1052E/DS1102E Software for Linux
« Reply #29 on: June 07, 2015, 03:23:16 pm »
The test version I provided may help. [...]

And yes, I have been to beautiful Germany before as a side trip from the Netherlands. Last time I drove to Koln to see the big church there. So impressive.

I checked out the test-version. Unfortunately, it doesn't fix the problem (still the same issue).
Nice you have been in Germany (and the Netherlands, which I like also).  :-+
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #30 on: June 07, 2015, 03:25:35 pm »
That is a poser then. I may post another test version that would output some data on your terminal (you'd have to start it from the terminal) if you don't mind.

Just to be sure. You need to run the new version directly (e.g., click it in your file manager or specify a whole path like ./qrigol on the terminal). Otherwise the one in /usr/bin installed by the package manager will run.

I'm about to post another debugging version. If you have it in, say, ~/Downloads you could open a terminal and say

~/Downloads/qrigol 

to execute it.

The terminal should have messages like:

DEBUG: cmd=:CHAN1:PROB?
DEBUG: 10.000000 10
DEBUG: 10X
DEBUG: cmd=:CHAN2:PROB?
DEBUG: 10.000000 10
DEBUG: 10X

Once you connect. Also when you press the read scope button. I would like to see those DEBUG: statements if you have time to do that. Thanks!

« Last Edit: June 07, 2015, 03:33:21 pm by wd5gnr »
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #31 on: June 07, 2015, 03:46:32 pm »
Ok it is the , separator and I guess Qt isn't as locale sensitive as I thought it would be.

I am about to be on the motorcycle for a few hours, but when I get back I'll devise a fix. My guess is lots of floating point conversions are going to be a problem so you will probably find other places where this is the case.

Thank you for taking the time to troubleshoot this.
 

Offline Bigman

  • Regular Contributor
  • *
  • Posts: 80
Re: Free DS1052E/DS1102E Software for Linux
« Reply #32 on: June 07, 2015, 03:51:41 pm »
Ok it is the , separator and I guess Qt isn't as locale sensitive as I thought it would be.

I am about to be on the motorcycle for a few hours, but when I get back I'll devise a fix. My guess is lots of floating point conversions are going to be a problem so you will probably find other places where this is the case.

Thank you for taking the time to troubleshoot this.

hey take your time ... and ... it's up to us, who are using your software, to say "thank you".
Enjoy riding your motorcycle (but ride safe  :) )
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #33 on: June 07, 2015, 08:27:54 pm »
OK if Bigman says the new test version solves the problem I will update github and release 0.2 which has a few other minor fixes.
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #34 on: June 07, 2015, 09:50:05 pm »
Well no joy with the last version.

I set my scope up to use German, just to see, but it still outputs 10X as 1.000e+01

On my machine, converting that to a float with sscanf gives me 10.0 (as it should). But with the locale set to somewhere where , is the decimal point, it gives 1. That makes sense.

My test code tried to get the current idea of the decimal point and (unless it is '.') replaces floating point output '.' -> whatever the dp character is.  Then it does the conversion. The only thing that might upset that is if Qt is using a correct locale and C++ is using the "C" locale. Maybe that's the problem.

Due to the time difference, I think it will be tomorrow before we test anymore.
 

Offline dom0

  • Super Contributor
  • ***
  • Posts: 1483
  • Country: 00
Re: Free DS1052E/DS1102E Software for Linux
« Reply #35 on: June 07, 2015, 10:03:38 pm »
How do you convert? QString::toFloat always uses the C locale (i.e. '.' is the decimal point).

edit: https://github.com/wd5gnr/qrigol/blob/27de1b8221b150a499dd0cbff92a5614af878af8/rigolcomm.cpp#L111

Well yes, that will always give you trouble, sscanf always operates on the set locale. If you don't want to use QString, it's possible with C++ stdlib, too. About like this:

std::stringstream ss;
float f;
ss.imbue(std::locale("C"));
ss << "12.345"; // string in
ss >> f; // float out
« Last Edit: June 07, 2015, 10:07:01 pm by dom0 »
,
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #36 on: June 07, 2015, 10:14:02 pm »
I was trying to keep the low-level code Qt agnostic, so I avoided QString. I had attempted... oh wait... I got the money punct instead of the number punct. I wonder if that's why? You'd think they were the same, but maybe not. Don't know why I did that though. One more try...
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #37 on: June 07, 2015, 10:35:43 pm »
I set up a new branch (dp-test) should anyone want to try it.

https://github.com/wd5gnr/qrigol/tree/dptest/packages/binary-debug -- executable is here.
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #38 on: June 09, 2015, 09:32:07 pm »
I went ahead and posted v0.2 in both deb,rpm, and binary formats. This attempts to fix the locale issue (reports to confirm or the contrary are welcome) and adds a nice help system. Minor bug fixes etc.
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: Free DS1052E/DS1102E Software for Linux
« Reply #39 on: June 09, 2015, 11:55:20 pm »
Thank you for all your work on this! If there's a DS1054Z version coming, and 32 bit .deb, I'd like to try it out.
« Last Edit: June 09, 2015, 11:57:05 pm by alsetalokin4017 »
The easiest person to fool is yourself. -- Richard Feynman
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #40 on: June 10, 2015, 12:07:28 am »
I was just playing with the 1054Z... going over the network is essentially the same, so this isn't very far fetched. Would just have to adjust for the difference in commands and channels. As for 32 bit deb, that's a little work, but not too much. However, if you don't care to wait try this:

1) Download the ZIP file from Github (right hand side of the screen).
2) sudo apt-get install qtcreator
3) Unzip zip file
4) Open up .pro file. Select qt kit of your choice
5) Build or run from qtcreator at your option

 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Free DS1052E/DS1102E Software for Linux
« Reply #41 on: June 10, 2015, 02:11:51 am »
Thank you for all your work on this! If there's a DS1054Z version coming, and 32 bit .deb, I'd like to try it out.

You always have marmad's RUU, I believe v 3.00.a05 supports the DS1000z:

https://www.eevblog.com/forum/projects/software-tips-and-tricks-for-rigol-ds200040006000-ultravision-dsos/


Edit: this one and mine only does screen captures btw.
Also there is a version found by bingo that doesn't require VISA and it's pure Python:

https://www.eevblog.com/forum/testgear/new-rigol-ds1054z-oscilloscope/msg675845/#msg675845

That uses telnet, I did modify it to work on my DS2000 that doesn't support telnet using forum member alex.forencich vxi11, note that mine captures the screen in 4 seconds over ethernet, but you need to modify it to get support back for the DS1000z

https://www.eevblog.com/forum/testgear/python-based-instrument-control/msg676772/#msg676772

Also there is this, edit: looks promising but have not played with it, BTW it comes with full source:
https://www.eevblog.com/forum/testgear/free-ds6000ds1000z-software/

Plenty of options :)

One more (screen capture only):
https://www.eevblog.com/forum/testgear/ds1000z-series-display-on-android/msg636183/#msg636183


« Last Edit: June 10, 2015, 02:30:38 am by miguelvp »
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #42 on: June 10, 2015, 02:51:30 pm »
I threw my version of a 1000z screencapture into the mix this morning: https://www.eevblog.com/forum/testgear/shell-script-to-take-screen-caps-from-ds1000z/
 

Offline briselec

  • Regular Contributor
  • *
  • Posts: 94
  • Country: au
Re: Free DS1052E/DS1102E Software for Linux
« Reply #43 on: October 02, 2015, 04:45:45 am »
..
2) sudo apt-get install qtcreator
..

When I read you need to install qtcreator I'm thinking "has the developers of QT gone completely nuts"? No they haven't , do the following -

$ qmake qrigol.pro
$ make

Done!
Will try it tonight as I don't have a rigol at work.
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #44 on: October 02, 2015, 04:56:23 am »
Yeah, I figure if you have the Qt tools you probably know that. If not, you might as well get the package.

I just let go my 1052E (too many scopes) so probably how it is is how it is going to stay unless someone wants to adopt it ;)
 

Offline gojimmypi

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: Free DS1052E/DS1102E Software for Linux
« Reply #45 on: October 26, 2015, 01:35:31 am »
First comment: GREAT!
I own a Rigol DS1102E and on my PCs I am running Arch-Linux. Downloaded the files from https://github.com/wd5gnr/qrigol, opend it with QtCreator and compiled it succussfully. I used the USB-port at the back of the DS1102E and checked on the Linux-PC the available USBs in the /dev/ folder with "ls -alh | grep usb". Indeed there was now "usbtmc2", hence in wd5gnr, I typed for the device "/dev/usbtmc2". Well, but after pressing "connect" I am getting the message "Can't open device".
Any ideas, where to look for the problem (e.g. do I have to consider some settings at the Rigol)?

Thanks in advance & cheers

I agree: GREAT! Thanks for posting the source on github. I'm very interested in getting this to work.

I've compiled qrigol for the Raspberry Pi (raspbian)... and I was hoping to get it talking to my DS1054z.... however I don't see any usbtmc ports. I've rebooted, and still no joy. Does the usb driver get installed automatically?

Code: [Select]
pi@raspberrypi ~ $ sudo ls /dev -alh | grep usb
drwxr-xr-x  2 root root          60 Dec 31  1969 usb

and tips on getting the RPi to see the Rigol USB device?

thanks!
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
 

Offline gojimmypi

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: Free DS1052E/DS1102E Software for Linux
« Reply #47 on: October 26, 2015, 02:13:22 am »
See if this helps you: http://scruss.com/blog/2013/12/15/my-raspberry-pi-talks-to-my-oscilloscope/
some good suggestions on that link, thanks... but the RPi does not even see a Rigol device:
Code: [Select]
pi@raspberrypi ~ $ lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 04f2:0833 Chicony Electronics Co., Ltd
Bus 001 Device 005: ID 04f2:0939 Chicony Electronics Co., Ltd
pi@raspberrypi ~ $ sudo apt-get install libusb-1.0-0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libusb-1.0-0 is already the newest version.
libusb-1.0-0 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
 

Offline wd5gnrTopic starter

  • Regular Contributor
  • *
  • Posts: 179
Re: Free DS1052E/DS1102E Software for Linux
« Reply #48 on: October 26, 2015, 02:25:17 am »
It would appear you will have to rebuild the kernel: http://ziemann.web.cern.ch/ziemann/gadget/usbtmc/raspi-usbtmc.html
 

Offline gojimmypi

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: Free DS1052E/DS1102E Software for Linux
« Reply #49 on: October 26, 2015, 11:09:10 am »
It would appear you will have to rebuild the kernel: http://ziemann.web.cern.ch/ziemann/gadget/usbtmc/raspi-usbtmc.html
yes, it appears the RPi does not natively support usbtmc. bummer.

I did find this python driver, as building my own kernel can be quite an undertaking (fortunately I do have a cross-compiler on a VM, but still...) anyhow, I installed this, still no joy:

http://alexforencich.com/wiki/en/python-usbtmc/start

any chance you have an Ethernet interface in the works? ;)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf