Rigol C# .NET NI-VISA Example - Page 1
Forum section: electronics / beginners

author: Rogla
author_rank: Newbie
timestamp: October 16, 2012, 12:35:10 am
content: Hi all,I would like to share some of my experiences about writing an simple application to be able to fetch data from my Rigol boxes. Primary a logger for a DM3064. I used C#.NET 2010 on Windows 7 64-bit, application compiled as x86.- First mistake I made, I installed NI-VISA Runtime instead of NI-VISA Full Driver.All needed development assemblies are in the NI-VISA Full Driver package.Download NI-VISA 5.2 Full Driver from here:http://joule.ni.com/nidu/cds/view/p/id/3337/- On creation of the C# Windows application, select .NET Framework 4.(The .NET Framework 4 Client Profile didn't work with NI-VISA 5.2).- Adding reference to NationalInstruments.VisaNS automatically also adds reference to NationalInstruments.Common, no need to search for NationalInstruments.Common...- There was a version problem on the NationalInstruments.Common assembly version referenced by the NationalInstruments.VisaNS assembly. I had to remap the old missing NationalInstruments.Common version to a newer version. See App.config in attached source code example.- After connecting the USB device, from National Instruments Program menu, start the VISA\VISA Interactive Control program and copy the VISA resource ID for the USB device. Add that to the ComboList in the example code.- The attached example is based on a PDF from Rigol USA that can be found here:http://www.rigolna.com/products/digital-multimeters/dm3000/dm3068/Tab Software, file "C#.NET basic instrument communication example"- Documentation about SCPI commands to send to the device is on the Rigol product page.To check the device ID information, write command *IDN? and then read the answer back.This is i very simple and basic example, but it took me some time to figure this out, so I hope someone else will find it useful./Roger

author: leafi
author_rank: Regular Contributor
timestamp: January 26, 2017, 03:56:35 pm
content: Thank you for posting this. I am having to go back and update a program that I made a year ago and have reformatted my pc since then and was having problems finding and re-downloading the right files.

author: Elmue
author_rank: Newbie
timestamp: March 05, 2025, 11:52:51 am
content: HelloWhat you are showing here requires to install theHUGEVISA runtime.Alone the installer has the size of 1 Gigabyte.After installing NI-VISA you will have 12 (twelve!) servicespermanentlyrunning in the background.So you recommend to install 1 Gigabyte just to do a simple communication with a Rigol multimeter?This is like throwing an atomic bomb to kill a bug.For me it was never an option to install this VISA monster.Therefore I wrote my own softwareOszi Waveform Analyzerin C# which communicates over USB or over ethernet using the VXI-11 protocol or plain TCP.I publish my software open source so you can use the code for any SCPI capable device in the world.The only thing you have to install is the tiny USB driver of 24 kilobyte.Yes! You have read correctly: 24 Kilobytes instead of 1 Gigabyte!My code communicates directly with my oscilloscope needing nothing more than .NET functionality.Here you see the window that communicates with my Rigol oscilloscope:Download and detailed description here:https://netcult.ch/elmue/oszi-Waveform-Analyzer