Author Topic: Rigol C# .NET NI-VISA Example  (Read 14743 times)

0 Members and 1 Guest are viewing this topic.

Offline Rogla

  • Newbie
  • Posts: 1
Rigol C# .NET NI-VISA Example
« on: October 16, 2012, 11:35:10 AM »
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


« Last Edit: October 16, 2012, 11:56:47 AM by Rogla »
 

Offline leafi

  • Regular Contributor
  • *
  • Posts: 67
Re: Rigol C# .NET NI-VISA Example
« Reply #1 on: January 27, 2017, 02:56:35 AM »
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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

http://opalkelly.com/