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