Python Screen Capture of RIGOL 1054Z on macOS Catalina Using NI-VISA


 
Thread Tools Search this Thread
Top Forums Programming Python Screen Capture of RIGOL 1054Z on macOS Catalina Using NI-VISA
# 1  
Old 01-16-2020
Python Screen Capture of RIGOL 1054Z on macOS Catalina Using NI-VISA

On the NI-VISA boards there has been some frustration where folks cannot get NI-VISA to work on macOS Catalina because Catalina (macOS 10.15.x) is "not supported" by NI-VISA (for many months, it seems). Currently, the README shows:

Code:
NI-VISA 19.0 for macOS supports the following platforms:

macOS 10.14.x
macOS 10.13.x

macOS Catalina, of course, is 10.15.x.

After digging around, I found this post regarding Isaac:

Download Isaac for Mac version 5.1, works with Catalina! - Tue Nov 26, 2019 10:16 am

So, made a FULL BACKUP of my Mac Pro before attempting this, and it worked. From the post above, I performed 5 of the 6 steps, just like the PDF instructed. Step 6 is not required to connect to the RIGOL DS1054Z (and I think I could have skipped step 4 and 5 as well, but I thought "why not?"), no harm, no foul:

Code:
There are six files to download from this page. YOU WILL NEED TO DOWNLOAD ALL SIX FILES!!

1) Instructions
2) NI 488 driver
3) NI VISA driver
4) LabView driver
5) SiLabs Driver
6) Isaac for Mac

ALWAYS MAKE A FULL BACKUP OF YOUR SYSTEM BEFORE DOING THESE KINDS OF "MAYBE IT WILL WORK" INSTALLS

These instructions (from the PDF) worked flawlessly, and I could see my RIGOL 1054Z in the NI-VISA utility console:

Python Screen Capture of RIGOL 1054Z on macOS Catalina Using NI-VISA-screen-shot-2020-01-16-50203-pmjpeg


After that I knew I was "home free" and it was just a matter of time to get things started with macOS Catalina and the RIGOL.

I searched around for some "nice LabView-like" program which works on top of VISA, but everything I downloaded looked "not to my standards", so I decided to nix the idea of a nice GUI, and go for, as a starter, the python rigol-grab

Code:
https://github.com/rdpoor/rigol-grab

My MacOS running Catalina is running both python2 and python3, and we need PyVISA to continue this caper:

Quote:
PyVISA is a Python package that enables you to control all kinds of measurement devices independently of the interface (e.g. GPIB, RS232, USB, Ethernet). As an example, reading self-identification from a Keithley Multimeter with GPIB number 12 is as easy as three lines of Python code:
At first, I could not get this sample test program, from the GIT repo, to work:

Code:
>>> import pyvisa
>>> rm = pyvisa.ResourceManager()
>>> rm.list_resources()
('ASRL1::INSTR', 'ASRL2::INSTR', 'GPIB0::12::INSTR')
>>> inst = rm.open_resource('GPIB0::12::INSTR')
>>> print(inst.query("*IDN?"))

Could not get past the >>> import pyvisa line, because my python could not find the module.

So, I went to the interactive python gizmo, and typed in help("modules")

and pyvisa was missing, as expected.

However, when I tried the same routine using python3, there is was... yea... so I simply forced python to install pyvisa for python (python 2) as well as python3..... and of course, it worked.

So, with all of that behind me, and a few hours of quantum time passed, I closed the issue I opened on this matter at rigol-grab repo, and here is my first RIGOL 1054Z screen grab using python on macOS Catalina Smilie

Python Screen Capture of RIGOL 1054Z on macOS Catalina Using NI-VISA-test1jpg


Life is good... I have a brand new RIGOL 1054Z, which just arrived yesterday, and today I've managed to use a python program running on top of the NI-VISA python wrapper, PyVISA to capture the screen.

Now I need to put the probes on some cool waveforms, which I should create with Arduino, but who knows Smilie Today got a mail bag of 18 more electronic goodies from China, so it's easy to get distracted around here, especially since I can be easily bored and have a lot attention span from time to time, LOL

Python Screen Capture of RIGOL 1054Z on macOS Catalina Using NI-VISA-img_8937jpg
# 2  
Old 01-16-2020
Update:

I find this works best if we enter the pip environment:

Code:
pipenv shell
(rigol-grab) bash-3.2$ python --version
Python 3.7.5

and we get better screen grabs if we edit the rigol_grab.py script and change the image format to JPG instead of PNG. However, so far, I cannot get 100% perfect images each time without disconnecting and reconnecting the USB cable.

This is a known bug with this script, and I'm not sure how much time I will spend debugging this at this time.

FYI (seems buggy):

Code:
(rigol-grab) bash-3.2$ pyvisa-info
Machine Details:
   Platform ID:    Darwin-19.2.0-x86_64-i386-64bit
   Processor:      i386

Python:
   Implementation: CPython
   Executable:     /Users/Tim/.local/share/virtualenvs/rigol-grab-UTG9DSmW/bin/python3.7
   Version:        3.7.5
   Compiler:       Clang 11.0.0 (clang-1100.0.33.8)
   Bits:           64bit
   Build:          Nov  1 2019 02:16:23 (#default)
   Unicode:        UCS4

PyVISA Version: 1.10.1

Backends:
   ni:
      Version: 1.10.1 (bundled with PyVISA)
      #1: /Library/Frameworks/visa.framework/visa:
         found by: auto
         bitness: 64
         Vendor: National Instruments
         Impl. Version: 19922944
         Spec. Version: 5244928
   py:
      Version: 0.3.1
      ASRL INSTR:
         Please install PySerial (>=3.0) to use this resource type.
         No module named 'serial'
      USB INSTR: Available via PyUSB (1.0.2). Backend: libusb1
      USB RAW: Available via PyUSB (1.0.2). Backend: libusb1
      TCPIP INSTR: Available 
      TCPIP SOCKET: Available 
      GPIB INSTR:
         Please install linux-gpib to use this resource type.
         No module named 'gpib'

(rigol-grab) bash-3.2$

Python Screen Capture of RIGOL 1054Z on macOS Catalina Using NI-VISA-hello_invertedjpg
# 3  
Old 01-17-2020
Some 15 - 20 MHz RF Noise on the Arduino UNO - Screen Capture with rigol-grab.py

Note: Just a pretty picture, not for analysis Smilie

Code:
macos$ pipenv shell
Launching subshell in virtual environment...

bash-3.2$  . /Users/Tim/.local/share/virtualenvs/rigol-grab-UTG9DSmW/bin/activate
(rigol-grab) bash-3.2$ python rigol_grab_jpg.py -f noise.jpg --auto
(rigol-grab) bash-3.2$

Python Screen Capture of RIGOL 1054Z on macOS Catalina Using NI-VISA-noisejpg
# 4  
Old 01-17-2020
Still playing with noise until I get some circuits cooking..... for testing the python_grab.py utility for the RIGOL DS1054Z

Noise is beautiful .... (a least until my function generator arrives ...)

Note: Having trouble getting the RIGOL to generate anything but PNG and BMP image formats. Still working on this, converting BMP to JPG manually for loading.

Python Screen Capture of RIGOL 1054Z on macOS Catalina Using NI-VISA-noise10mhzjpg


Also, the image is still a bit corrupted (known bug) - in this case on the bottom where the channel indicators are.
# 5  
Old 01-17-2020
A few minutes later... the corruption is gone... seems like the "corruption clears" when I do a hard reboot.

Python Screen Capture of RIGOL 1054Z on macOS Catalina Using NI-VISA-test_noisejpg


These grabs are all over USB.

I can ping the ethernet port on the RIGOL and can even open the web page on the scope, but I cannot get an LAN (LXI) based tool to work over the LAN (ethernet), so far.

Only USB.....
# 6  
Old 01-17-2020
More beautiful noise..... I really like noise Smilie This is A/C hum from the 240v (plus or minus) standard line voltage here (using an "unplugged Arduino UNO" as my "antenna"):

Python Screen Capture of RIGOL 1054Z on macOS Catalina Using NI-VISA-more_noisejpg


I've always liked noise on scopes and analyzers.... it's kinda hypnotic ....

Have you noticed how much more beautiful noise is, compared to a "clean" 1 KHz reference signal?
# 7  
Old 01-17-2020
Fully loaded with all RIGOL options, effectively making this a DS1104Z versus the DS1054Z:

Python Screen Capture of RIGOL 1054Z on macOS Catalina Using NI-VISA-installed_optionsjpg


This is a great scope for the money.... really.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. OS X (Apple)

MacOS 10.15.2 Catalina display crash and system panic

MacPro (2013) 12-Core, 64GB RAM (today's crash): panic(cpu 2 caller 0xffffff7f8b333ad5): userspace watchdog timeout: no successful checkins from com.apple.WindowServer in 120 seconds service: com.apple.logd, total successful checkins since load (318824 seconds ago): 31883, last successful... (3 Replies)
Discussion started by: Neo
3 Replies

2. Programming

A Slightly Better NTP Client for the ESP32 (ESPWROOM32) on macOS Catalina

Currently have two ESP8266 modules testing some Blynk apps, whereI'm not so happy with the Blynk business model for developers, but that's another story. So, with two of my ESP8266s currently "busy", I decided to work on the ESP32, and in particular the ESPWROOM32. I installed the... (0 Replies)
Discussion started by: Neo
0 Replies

3. Windows & DOS: Issues & Discussions

Poor Windows 10 Performance of Parallels Desktop 15 on macOS Catalina

Just a quick note for macOS users. I just installed (and removed) Parallels Desktop 15 Edition on my MacPro (2013) with 64GB memory and 12-cores, which is running the latest version of macOS Catalina as of this post. The reason for this install was to test some RIGOL test gear software which... (6 Replies)
Discussion started by: Neo
6 Replies

4. OS X (Apple)

MacOS 10.15 Catalina Crashes and Freezes on Boot

Sadly, I have turned off my access to the Apple Developers Beta program after installing macOS 10.15 Catalina a few days ago. After the install, I rebooted by MacBook Air and it "hard froze" and we were heading out of town so I grabbed a backup MBA running Mojave. Then, after getting back at... (10 Replies)
Discussion started by: Neo
10 Replies

5. OS X (Apple)

MacOS 10.15 (Catalina) switches from bash to zsh

Interestingly Apple has decided to switch the default shell for new users from bash to zsh in MacOS Catalina (10.15) Use zsh as the default shell on your Mac - Apple Support Another interesting fact is that Catalina also comes with /bin/dash (5 Replies)
Discussion started by: Scrutinizer
5 Replies

6. UNIX for Beginners Questions & Answers

Capture power button press on MacOs High Sierra?

Hello everyone! I'm developing a MacOs Application in python and I'm having some issues trying to find information related to the power button pressed event. I know that in Ubuntu 14.04 you can find information about it on the acpi folders, but I realized that here in Mac that process is... (0 Replies)
Discussion started by: xedge
0 Replies

7. OS X (Apple)

Python script to do simple audio capture...

This site is the first to get this snippet. It will capture an audio recording of any time length within the limits of OSX's QuickTime Player's capablility... A shell script derivative of this will be used as a further capture for CygWin's AudioScope.sh. Thoroughly read ALL the comments in... (0 Replies)
Discussion started by: wisecracker
0 Replies

8. Solaris

Solaris 10 screen capture

We are using Solaris 10 for our Radiation Treatment Planning and need to create a simulation for our service engineers. I need a screen capture tool that can not only capture screens, but create movies of mouse movements (similar to Captivate). I have contacted Oracle and talked to several people... (2 Replies)
Discussion started by: TomH
2 Replies

9. UNIX for Dummies Questions & Answers

screen capture

I was wondering is there something out there for Solaris 7 for screen capture? Also it would really help if there was some software out there that can record whats happens on the screen for like 10 seconds or how ever long I need it to. I did a search but doesn't seem to be alot out there. (10 Replies)
Discussion started by: merlin
10 Replies
Login or Register to Ask a Question