Author Topic: Software for Remote Measurements from Rigol Scopes (and Test for Screen Flicker)  (Read 17930 times)

0 Members and 1 Guest are viewing this topic.

Offline marmadTopic starter

  • Super Contributor
  • ***
  • Posts: 2979
  • Country: aq
    • DaysAlive
As I mentioned in this other thread (https://www.eevblog.com/forum/index.php?topic=3964.0), I found another bug in the Rigol 02.05.02 FW related to the LCD display - and it appears, when running this software, that it might be related to the screen flickering bug.  Read Edit2 below for screen-flicker test.

Anyway, about the software - the first of a few modules I hope to write - it's a simple viewer for seeing any of the scope's built-in voltage and timing measurements on your PC screen - in big type for those of us with poor eyesight :) - instead of wasting space on the tiny LCD of the scope. It should work with any Rigol scope that uses the same commands for taking measurements as the DS1000E/D series. You can connect to the PC via any valid VISA resource (USB or RS232 for the DS1000s), and you can use the scope (changing settings and twiddling knobs) while simultaneously having the PC displaying the measurements.

I've tested quite a bit and it feels fairly bug-free, but please let me know if you discover any - or have suggestions for improvements. No help files yet - first version - but it's fairly easy to understand, and I'll give a quick run down here.

Basically you select whichever of the 22 possible measurements (per channel) that you want displayed on the PC via the checkboxes. There are 4 small buttons above each channel's checkboxes:

SelectAll (except the Phase measurements - see below)
UnselectAll
CS: Clear last data from Selected measurements.
CU: Clear last data from Unselected measurements.

The Run/Stop button will turn on and off the polling of the scope and updating of the measurements. The trackerbar (slider) at the upper left controls the speed of the polling - from 50 to 1050ms - although be advised, the speed is related to just a few measurements at once - when you start polling many of them at a time - the software will get noticeably slower - and the speed will not be close to being accurate.  Also, you'll notice the little RMT light blinking on the scope each time the software polls - this is the inevitable locking of the controls on the scope when it's getting remote commands.  What this means is that even though you can use the controls on the scope and alter settings while the PC is reading data, the faster you set the polling speed, the more sluggish the controls on the scope might feel. Anyway, just test it - you can't hurt anything by polling fast - and you may end up seeing (like I do) the flickering bug of 02.05.02 rear it's ugly head.

Other controls:

Clicking the Wait Trigger only has an effect when the scope is either stopped or waiting for a trigger. If the scope is waiting, the software will also enter a waiting state until the scope has been triggered - and then it will do one reading of selected measurements and stop. If the scope is stopped, the software will first start it, and then proceed to either wait (if the scope is waiting) or otherwise do one reading and stop. The polling during the waiting and before the read is set via the polling speed slider (best to have it set fast while waiting for quick detection of trigger).

Clicking the Force Trigger will force the scope, in whatever state it's in, into triggering a sweep. After the force command, the software will wait the polling time period and then do one reading of selected measurements and stop.

As mentioned above, the Phase measurements are not selected automatically - you must do it manually - since they cause a (non-lethal) screen redraw bug (although the measurements appear fine) in FW 02.05.02. It's also possible that they will throw an exception in the software when running earlier versions of the FW (pre-02.04), but I think the software should catch them gracefully. If it happens just deselect them before re-running.

Next version should have re-sizing capabilities and datalogging for graphing, as well as other stuff. Enjoy.

Edit1: Just to clarify, when using this software and your scope simultaneously, you will notice that occasionally (very often with fast polling) the scope will miss button presses or knob turns from you. This is not a bug but an inevitable side-effect of the scope not being able to multitask local and remote commands at the same time.  The way Rigol gets around this is to automatically lock the buttons on the scope when receiving remote data, and the software that comes with the scope basically just blocks you from using it's buttons when you are connected via PC.  I decided to try to get around this by unlocking the buttons explicitly when I'm not directly talking to the scope.  This allows the slight illusion that you can control the scope from two different places at once.

Edit2: To test for screen-flickering, click Check(All) for both channels 1 and 2, click Run/Stop, then slide the polling speed slider maximum left.  On my HW58 FW 02.05.SP2, that causes a huge amount of flickering, proving once and for all I think, that the problem is a FW timing issue.  If you then want to up the bugginess a major notch, stop the polling, select the checkboxes for the 4 Phase measurements, then turn on DisplayAll measurements on the Rigol (either channel - doesn't matter). Then click Run/Stop on my software again..... wow  :o



Edit3: Attached screen capture showing redraw bug of Phase measurement.

Edit4: Changed software slightly (latest version 1.0.2) - added an extra button for each channel - as noted above - which makes it easier for testing and Force Triggering, etc.
« Last Edit: July 16, 2011, 05:22:12 pm by marmad »
 

Offline saturation

  • Super Contributor
  • ***
  • Posts: 4787
  • Country: us
  • Doveryai, no proveryai
    • NIST
Re: Software for remote display of measurements from Rigol scopes
« Reply #1 on: July 16, 2011, 11:05:06 am »
Thanks for making this available.  Will feedback once I completed testing it. 
Best Wishes,

 Saturation
 

Online Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11640
  • Country: my
  • reassessing directives...
random test and click, got this message "incorrect string format"? while running ch1 or 2 and click Vamplitude. refer to txt in zip for more detail. keep up the good work. if you need my mbmp*.dll documentation on bitmap rendering, just PM me. i'll try my best to edit my "broken" documentation.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline marmadTopic starter

  • Super Contributor
  • ***
  • Posts: 2979
  • Country: aq
    • DaysAlive
Thanks Shafri  :)   I think I found the bug and have uploaded newer version (1.0.2), but it may be related to another problem which may arise with different firmware than mine.  I'm not sure how the Rigol represents numbers out of range in your FW (02.02).  In 02.05, the scope sends 99e36 for out-of-range (which you can locate in the firmware), but I don't see that number in 02.02 FW.  Since I screen for that string before converting to double, it might throw an exception if Rigol uses another out-of-range indicator than that. Does anyone know what it does in 02.02?

Quote
if you need my mbmp*.dll documentation on bitmap rendering, just PM me. i'll try my best to edit my "broken" documentation.

That sounds great. It would be useful to combine the fast realtime display that you've already written, with one that uses large sample depth which is slower, but allows zooming in horizontally on the waveform.  As I mentioned in another thread, you can get 16K samples from the Rigol into the PC in ~70ms.  Considering overhead from processing, it might be possible to get frame rates of 4 - 5 fps.  Run one sweep on the scope, read data, transform data, display data, repeat  :D
« Last Edit: July 16, 2011, 02:57:21 pm by marmad »
 

Online Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11640
  • Country: my
  • reassessing directives...
That sounds great. It would be useful to combine the fast realtime display that you've already written, with one that uses large sample depth which is slower, but allows zooming in horizontally on the waveform.  As I mentioned in another thread, you can get 16K samples from the Rigol into the PC in ~70ms.  Considering overhead from processing, it might be possible to get frame rates of 4 - 5 fps.  Run one sweep on the scope, read data, transform data, display data, repeat  :D
here it is (link below). you can study, its simple, even without my "broken" note. i also provided my soajpg.dll if you want to save jpeg file from vb, its the old format (no EXIF etc), but a simple basic jpeg saving capability without hassle to dig the jpeg algorithm. and also fastgraph.ctl the control i used to draw the rigol data in my app. its specifically developed from my old "slower" graph.ctl for this app. its the simplest jellybean one can have, draw lines only, i wish i can put labelling on it but never got a time for it :( . all of them used my "proprietary" MBITMAP structure that was developed 8 years ago for my "school" multimedia project but was busted, never realized, only the core structure i keep using over and over for my own simple purposes.

as we've discussed, my finding is that its the raw data download from rigol that took most of the processing time, the actual data processing and drawing in CPU are almost negligible for the most of simple purposes. 20-30 fps should be easily achievable if you struggle for it. and you can continue make your own library much more efficient than mine if you want since i'm already lacking enthusiasm in doing so and this type of app is not that demanding. cheers.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline marmadTopic starter

  • Super Contributor
  • ***
  • Posts: 2979
  • Country: aq
    • DaysAlive
Quote
you can study, its simple, even without my "broken" note.

Thanks!  :)  I will study it when I get some more time and see how I might incorporate it.
« Last Edit: July 16, 2011, 05:25:30 pm by marmad »
 

Offline big t

  • Contributor
  • Posts: 11
Hello marmad,

I did all the steps with your tool to check my Rigol DS1052E (hacked to DS1102E, FW 00.02.05.02.00, HW 58). And I got flickering screen approx. every 30 seconds or less. Without connection to PC it flickers approx. few times an hour.
 

Offline marmadTopic starter

  • Super Contributor
  • ***
  • Posts: 2979
  • Country: aq
    • DaysAlive
@big t

Thanks for the feedback.  Yes, mine was that bad as well - since then, I have been in contact with Batronix (authorized dealer) and they have been in contact with Rigol, who admitted it was a bus/screen refresh bug in that version of the firmware.  From Rigol:

>> I just discussed this problem with R&D, this is resulted from the BUS
>> conflict, and can not be avoid.
>>But we will release a new firmware recently, which can improve it.

Since I find the bug extremely problematic (I want to take measurements from the scope without flickering) - and there is no indication when Rigol will fix it - and I don't want to void my warranty right away with a hacked downgrade - and since I had a 30 day trial period - I'm returning the scope and switching to another brand.
 

Offline marmadTopic starter

  • Super Contributor
  • ***
  • Posts: 2979
  • Country: aq
    • DaysAlive
Quote
so no more i love you? with rigol?

Ha, ha.... well, I was never in love with the USB 1.1 speed of the interface - or the bus/screen refresh bug in FW 02.05 (or the noisy fan and the tiny screen).  I paid extra money to buy the scope in Europe with reliable service, so it seems silly to have to downgrade myself (and void the warranty) just to make it stop doing something it shouldn't be doing.  So I'm sending it back (it came with 30 day trial period - one of the perks of buying through an authorized dealer).

So then I had to decide whether to just buy it again through a Chinese seller for less money - and do the FW change myself - or change scopes.  Then I stumbled on a really good price in Europe (better than the Chinese eBay sellers!) for the new Owon scope - SDS7102 (http://www.owon.com.cn/eng/smartDS.asp) -- and have decided to become an early adopter and tester of this  ;)

Since I have been using the Rigol for almost a month, I can do a good comparison between the two once I get it.

Anyway, I will continue software development for the Hantek DDS3X25 - I have the first version of FG controller for it almost ready - hopefully will post it later today.
« Last Edit: July 29, 2011, 11:04:35 am by marmad »
 

Offline dreschel

  • Contributor
  • Posts: 11
Hello Marmad,
Would you be willing to post some or all of your source for this program as an illustration on how to communicate with the Rigol scope? I know you no longer have the scope but your code would certainly be a help to those who still have them and would like to use them for data logging or test set ups. Thanks for considering! Bill
 

Offline marmadTopic starter

  • Super Contributor
  • ***
  • Posts: 2979
  • Country: aq
    • DaysAlive
I'll try to find the source code and post it later this week.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf