Archive ·
old wiki · last edited January 2012
Building Example Capture App
An example capture app controls an attached scope, which I needed to modify to add support for another type. Here are some hints on building the app…
- Install Visual Studio 2008 - the example project is in this format, and NI VISA supports it. The project is in C-Sharp
- Install NI VISA Version 4.6.2 from http://joule.ni.com/nidu/cds/view/p/id/1605/lang/en
- Download example project from http://staff.aist.go.jp/akashi.satoh/SASEBO/en/DPAcontest/index.html under “Waveform Acquisition Software (for Windows)”
- Now open the project in VS2008, try to build it. I got a bunch of errors:
------ Build started: Project: SASEBO_waveform_acquisition, Configuration: Debug Any CPU ------
c:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets : warning MSB3245: Could not resolve this reference. Could not locate the assembly "FTD2XX_NET". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
c:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets : warning MSB3245: Could not resolve this reference. Could not locate the assembly "NationalInstruments.Common, Version=9.0.35.362, Culture=neutral, PublicKeyToken=18cbae0f9955702a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
c:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets : warning MSB3245: Could not resolve this reference. Could not locate the assembly "NationalInstruments.VisaNS, Version=9.0.35.156, Culture=neutral, PublicKeyToken=18cbae0f9955702a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
C:\WINDOWS\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /platform:x86 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.DataSetExtensions.dll" /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Deployment.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\SASEBO_waveform_acquisition.exe /resource:obj\Debug\SASEBO_waveform_acquisition.About.resources /resource:obj\Debug\SASEBO_waveform_acquisition.Form_Controller.resources /resource:obj\Debug\SASEBO_waveform_acquisition.Properties.Resources.resources /resource:obj\Debug\SASEBO_waveform_acquisition.PropertySettingDialog.resources /target:winexe About.cs About.Designer.cs CipherTool\IBlockCipher.cs CipherTool\PlainTextFile.cs Oscilloscope\DSO1012A.cs Properties\AssemblyInfo.cs SASEBO\GII_AES_rev1.cs SASEBO\ISASEBO.cs SASEBO\Platform.cs SASEBO\Port.cs SASEBO\Core.cs SASEBO\Product.cs SASEBO\SASEBO.cs SASEBO\SASEBOParam.cs CipherTool\PhraseGenerator.cs Controller.cs Form_Controller.cs Form_Controller.designer.cs Oscilloscope\DSO1024A.cs Oscilloscope\DSO8104A.cs Oscilloscope\None.cs Oscilloscope\Oscilloscope.cs Oscilloscope\VisaOscilloscope.cs Oscilloscope\DSO6104A.cs Program.cs Properties\Resources.Designer.cs Properties\Settings.Designer.cs PropertySettingDialog.cs PropertySettingDialog.Designer.cs SASEBOException.cs MenuSetting.cs Tracer.cs Util\BlockingQueue.cs WaveDraw.cs WaveStore.cs
E:\Documents\academic\sidechannel\SASEBO\SASEBO_waveform_acquisition-limited.Rev891\SASEBO_waveform_acquisition\Oscilloscope\VisaOscilloscope.cs(38,7): error CS0246: The type or namespace name 'NationalInstruments' could not be found (are you missing a using directive or an assembly reference?)
E:\Documents\academic\sidechannel\SASEBO\SASEBO_waveform_acquisition-limited.Rev891\SASEBO_waveform_acquisition\SASEBO\Port.cs(32,7): error CS0246: The type or namespace name 'FTD2XX_NET' could not be found (are you missing a using directive or an assembly reference?)
E:\Documents\academic\sidechannel\SASEBO\SASEBO_waveform_acquisition-limited.Rev891\SASEBO_waveform_acquisition\Oscilloscope\VisaOscilloscope.cs(313,15): error CS0246: The type or namespace name 'MessageBasedSession' could not be found (are you missing a using directive or an assembly reference?)
E:\Documents\academic\sidechannel\SASEBO\SASEBO_waveform_acquisition-limited.Rev891\SASEBO_waveform_acquisition\SASEBO\Port.cs(120,13): error CS0246: The type or namespace name 'FTDI' could not be found (are you missing a using directive or an assembly reference?)
The solution is pretty simple.
- Open the Solution Explorer, look in the ‘References’ for ones with an error symbol:
- Delete for example the two NI References
- Re-add them:
- Confirm they now show up OK, try building:
For the FTDI driver, download the .net Class Wrapper from FTDI, and dump the .dll and .xml file in ‘\SASEBO_waveform_acquisition-limited.Rev891\SASEBO_waveform_acquisition\bin\debug32’ (or wherever else it will be found), and build.