From ebbc16ee6a2f78294558770bed560468d862c212 Mon Sep 17 00:00:00 2001 From: Mike Phares Date: Fri, 1 Nov 2024 11:47:29 -0700 Subject: [PATCH] usb-6009 --- .gitignore | 345 +++++++++++ .vscode/mklink.md | 5 + .vscode/settings.json | 5 + .vscode/tasks.json | 95 +++ NI-VISA/Documentation/Readme.html | 553 +++++++++++++++++ NI-VISA/Examples/.NET/FindResources/App.ico | Bin 0 -> 10614 bytes .../.NET/FindResources/AssemblyInfo.cs | 58 ++ .../.NET/FindResources/CustomFilter.cs | 120 ++++ .../.NET/FindResources/CustomFilter.resx | 338 +++++++++++ .../FindResources/FindResources.2010.csproj | 123 ++++ .../.NET/FindResources/FindResources.2010.sln | 19 + .../FindResources/FindResources.2012.csproj | 125 ++++ .../.NET/FindResources/FindResources.2012.sln | 19 + .../Examples/.NET/FindResources/MainForm.cs | 342 +++++++++++ .../Examples/.NET/FindResources/MainForm.resx | 305 ++++++++++ .../Examples/.NET/FindResources/ReadMe.txt | 13 + .../.NET/RegisterBasedOperations/App.ico | Bin 0 -> 10614 bytes .../RegisterBasedOperations/AssemblyInfo.cs | 58 ++ .../.NET/RegisterBasedOperations/MainForm.cs | 573 ++++++++++++++++++ .../RegisterBasedOperations/MainForm.resx | 302 +++++++++ .../.NET/RegisterBasedOperations/ReadMe.txt | 11 + .../RegisterBasedOperations.2010.csproj | 117 ++++ .../RegisterBasedOperations.2010.sln | 19 + .../RegisterBasedOperations.2012.csproj | 119 ++++ .../RegisterBasedOperations.2012.sln | 19 + NI-VISA/Examples/.NET/ServiceRequest/App.ico | Bin 0 -> 10614 bytes .../.NET/ServiceRequest/AssemblyInfo.cs | 58 ++ .../Examples/.NET/ServiceRequest/MainForm.cs | 457 ++++++++++++++ .../.NET/ServiceRequest/MainForm.resx | 353 +++++++++++ .../Examples/.NET/ServiceRequest/ReadMe.txt | 13 + .../ServiceRequest/ServiceRequest.2010.csproj | 117 ++++ .../ServiceRequest/ServiceRequest.2010.sln | 19 + .../ServiceRequest/ServiceRequest.2012.csproj | 119 ++++ .../ServiceRequest/ServiceRequest.2012.sln | 19 + .../.NET/SimpleAsynchronousReadWrite/App.ico | Bin 0 -> 10614 bytes .../AssemblyInfo.cs | 58 ++ .../SimpleAsynchronousReadWrite/MainForm.cs | 430 +++++++++++++ .../SimpleAsynchronousReadWrite/MainForm.resx | 317 ++++++++++ .../SimpleAsynchronousReadWrite/ReadMe.txt | 15 + .../SelectResource.cs | 189 ++++++ .../SelectResource.resx | 365 +++++++++++ .../SimpleAsynchronousReadWrite.2010.csproj | 123 ++++ .../SimpleAsynchronousReadWrite.2010.sln | 19 + .../SimpleAsynchronousReadWrite.2012.csproj | 125 ++++ .../SimpleAsynchronousReadWrite.2012.sln | 19 + NI-VISA/Examples/.NET/SimpleReadWrite/App.ico | Bin 0 -> 10614 bytes .../.NET/SimpleReadWrite/AssemblyInfo.cs | 58 ++ .../Examples/.NET/SimpleReadWrite/MainForm.cs | 333 ++++++++++ .../.NET/SimpleReadWrite/MainForm.resx | 311 ++++++++++ .../Examples/.NET/SimpleReadWrite/ReadMe.txt | 13 + .../.NET/SimpleReadWrite/SelectResource.cs | 190 ++++++ .../.NET/SimpleReadWrite/SelectResource.resx | 365 +++++++++++ .../SimpleReadWrite.2010.csproj | 123 ++++ .../SimpleReadWrite/SimpleReadWrite.2010.sln | 19 + .../SimpleReadWrite.2012.csproj | 125 ++++ .../SimpleReadWrite/SimpleReadWrite.2012.sln | 19 + NI-VISA/Examples/C/Examples_MSVC.dsw | 243 ++++++++ NI-VISA/Examples/C/Examples_MSVC_VS2005.sln | 240 ++++++++ NI-VISA/Examples/C/General/FindRsrc.c | 120 ++++ NI-VISA/Examples/C/General/FindRsrc_MSVC.dsp | 115 ++++ .../C/General/FindRsrc_MSVC_VS2005.vcproj | 501 +++++++++++++++ NI-VISA/Examples/C/General/Locking.c | 211 +++++++ NI-VISA/Examples/C/General/Locking_MSVC.dsp | 115 ++++ .../C/General/Locking_MSVC_VS2005.vcproj | 501 +++++++++++++++ NI-VISA/Examples/C/General/RdWrt.c | 136 +++++ NI-VISA/Examples/C/General/RdWrt_MSVC.dsp | 115 ++++ .../C/General/RdWrt_MSVC_VS2005.vcproj | 501 +++++++++++++++ NI-VISA/Examples/C/Gpib/AsyncIO.c | 177 ++++++ NI-VISA/Examples/C/Gpib/AsyncIO_MSVC.dsp | 115 ++++ .../C/Gpib/AsyncIO_MSVC_VS2005.vcproj | 501 +++++++++++++++ NI-VISA/Examples/C/Gpib/AsyncSRQ.c | 202 ++++++ NI-VISA/Examples/C/Gpib/AsyncSRQ_MSVC.dsp | 115 ++++ .../C/Gpib/AsyncSRQ_MSVC_VS2005.vcproj | 501 +++++++++++++++ NI-VISA/Examples/C/Gpib/WaitSRQ.c | 166 +++++ NI-VISA/Examples/C/Gpib/WaitSRQ_MSVC.dsp | 115 ++++ .../C/Gpib/WaitSRQ_MSVC_VS2005.vcproj | 501 +++++++++++++++ NI-VISA/Examples/C/PXI/ReserveTrig.c | 78 +++ NI-VISA/Examples/C/PXI/ReserveTrig_MSVC.dsp | 115 ++++ .../C/PXI/ReserveTrig_MSVC_VS2005.vcproj | 501 +++++++++++++++ NI-VISA/Examples/C/PXI/RouteTrig.c | 80 +++ NI-VISA/Examples/C/PXI/RouteTrig_MSVC.dsp | 115 ++++ .../C/PXI/RouteTrig_MSVC_VS2005.vcproj | 501 +++++++++++++++ NI-VISA/Examples/C/Serial/RdWrtSrl.c | 159 +++++ NI-VISA/Examples/C/Serial/RdWrtSrl_MSVC.dsp | 115 ++++ .../C/Serial/RdWrtSrl_MSVC_VS2005.vcproj | 501 +++++++++++++++ NI-VISA/Examples/C/TCPIP/TCPIP_MSVC.dsp | 112 ++++ .../Examples/C/TCPIP/TCPIP_MSVC_VS2005.vcproj | 493 +++++++++++++++ NI-VISA/Examples/C/TCPIP/tcpip.c | 73 +++ NI-VISA/Examples/C/USB/RdWrtUSBTMC.c | 143 +++++ NI-VISA/Examples/C/USB/RdWrtUSBTMC_MSVC.dsp | 115 ++++ .../C/USB/RdWrtUSBTMC_MSVC_VS2005.vcproj | 501 +++++++++++++++ NI-VISA/Examples/C/USB/USBDescriptors.c | 410 +++++++++++++ .../Examples/C/USB/USBDescriptors_MSVC.dsp | 115 ++++ .../C/USB/USBDescriptors_MSVC_VS2005.vcproj | 493 +++++++++++++++ NI-VISA/Examples/C/Vxi-vme/AsyncIntr.c | 159 +++++ NI-VISA/Examples/C/Vxi-vme/AsyncIntr_MSVC.dsp | 115 ++++ .../C/Vxi-vme/AsyncIntr_MSVC_VS2005.vcproj | 501 +++++++++++++++ NI-VISA/Examples/C/Vxi-vme/HighReg.c | 153 +++++ NI-VISA/Examples/C/Vxi-vme/HighReg_MSVC.dsp | 115 ++++ .../C/Vxi-vme/HighReg_MSVC_VS2005.vcproj | 501 +++++++++++++++ NI-VISA/Examples/C/Vxi-vme/LowReg.c | 158 +++++ NI-VISA/Examples/C/Vxi-vme/LowReg_MSVC.dsp | 115 ++++ .../C/Vxi-vme/LowReg_MSVC_VS2005.vcproj | 501 +++++++++++++++ NI-VISA/Examples/C/Vxi-vme/ShareSys.c | 260 ++++++++ NI-VISA/Examples/C/Vxi-vme/ShareSys_MSVC.dsp | 115 ++++ .../C/Vxi-vme/ShareSys_MSVC_VS2005.vcproj | 501 +++++++++++++++ NI-VISA/Examples/C/Vxi-vme/WaitIntr.c | 144 +++++ NI-VISA/Examples/C/Vxi-vme/WaitIntr_MSVC.dsp | 115 ++++ .../C/Vxi-vme/WaitIntr_MSVC_VS2005.vcproj | 501 +++++++++++++++ NI-VISA/Examples/C/Vxi-vme/WaitTrig.c | 158 +++++ NI-VISA/Examples/C/Vxi-vme/WaitTrig_MSVC.dsp | 115 ++++ .../C/Vxi-vme/WaitTrig_MSVC_VS2005.vcproj | 501 +++++++++++++++ NI-VISA/Examples/VB6/General/FindRsrc.frm | 105 ++++ NI-VISA/Examples/VB6/General/FindRsrc.vbp | 34 ++ NI-VISA/Examples/VB6/Vxi-vme/visahigh.frm | 135 +++++ NI-VISA/Examples/VB6/Vxi-vme/visahigh.vbp | 43 ++ TC01App/TC01App.sln | 25 + TC01App/TC01App/App.config | 6 + TC01App/TC01App/Form1.Designer.cs | 128 ++++ TC01App/TC01App/Form1.cs | 81 +++ TC01App/TC01App/Form1.resx | 120 ++++ TC01App/TC01App/Program.cs | 22 + TC01App/TC01App/Properties/AssemblyInfo.cs | 36 ++ .../TC01App/Properties/Resources.Designer.cs | 71 +++ TC01App/TC01App/Properties/Resources.resx | 117 ++++ .../TC01App/Properties/Settings.Designer.cs | 30 + TC01App/TC01App/Properties/Settings.settings | 7 + TC01App/TC01App/TC01App.csproj | 92 +++ 128 files changed, 23645 insertions(+) create mode 100644 .gitignore create mode 100644 .vscode/mklink.md create mode 100644 .vscode/settings.json create mode 100644 .vscode/tasks.json create mode 100644 NI-VISA/Documentation/Readme.html create mode 100644 NI-VISA/Examples/.NET/FindResources/App.ico create mode 100644 NI-VISA/Examples/.NET/FindResources/AssemblyInfo.cs create mode 100644 NI-VISA/Examples/.NET/FindResources/CustomFilter.cs create mode 100644 NI-VISA/Examples/.NET/FindResources/CustomFilter.resx create mode 100644 NI-VISA/Examples/.NET/FindResources/FindResources.2010.csproj create mode 100644 NI-VISA/Examples/.NET/FindResources/FindResources.2010.sln create mode 100644 NI-VISA/Examples/.NET/FindResources/FindResources.2012.csproj create mode 100644 NI-VISA/Examples/.NET/FindResources/FindResources.2012.sln create mode 100644 NI-VISA/Examples/.NET/FindResources/MainForm.cs create mode 100644 NI-VISA/Examples/.NET/FindResources/MainForm.resx create mode 100644 NI-VISA/Examples/.NET/FindResources/ReadMe.txt create mode 100644 NI-VISA/Examples/.NET/RegisterBasedOperations/App.ico create mode 100644 NI-VISA/Examples/.NET/RegisterBasedOperations/AssemblyInfo.cs create mode 100644 NI-VISA/Examples/.NET/RegisterBasedOperations/MainForm.cs create mode 100644 NI-VISA/Examples/.NET/RegisterBasedOperations/MainForm.resx create mode 100644 NI-VISA/Examples/.NET/RegisterBasedOperations/ReadMe.txt create mode 100644 NI-VISA/Examples/.NET/RegisterBasedOperations/RegisterBasedOperations.2010.csproj create mode 100644 NI-VISA/Examples/.NET/RegisterBasedOperations/RegisterBasedOperations.2010.sln create mode 100644 NI-VISA/Examples/.NET/RegisterBasedOperations/RegisterBasedOperations.2012.csproj create mode 100644 NI-VISA/Examples/.NET/RegisterBasedOperations/RegisterBasedOperations.2012.sln create mode 100644 NI-VISA/Examples/.NET/ServiceRequest/App.ico create mode 100644 NI-VISA/Examples/.NET/ServiceRequest/AssemblyInfo.cs create mode 100644 NI-VISA/Examples/.NET/ServiceRequest/MainForm.cs create mode 100644 NI-VISA/Examples/.NET/ServiceRequest/MainForm.resx create mode 100644 NI-VISA/Examples/.NET/ServiceRequest/ReadMe.txt create mode 100644 NI-VISA/Examples/.NET/ServiceRequest/ServiceRequest.2010.csproj create mode 100644 NI-VISA/Examples/.NET/ServiceRequest/ServiceRequest.2010.sln create mode 100644 NI-VISA/Examples/.NET/ServiceRequest/ServiceRequest.2012.csproj create mode 100644 NI-VISA/Examples/.NET/ServiceRequest/ServiceRequest.2012.sln create mode 100644 NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/App.ico create mode 100644 NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/AssemblyInfo.cs create mode 100644 NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/MainForm.cs create mode 100644 NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/MainForm.resx create mode 100644 NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/ReadMe.txt create mode 100644 NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/SelectResource.cs create mode 100644 NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/SelectResource.resx create mode 100644 NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/SimpleAsynchronousReadWrite.2010.csproj create mode 100644 NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/SimpleAsynchronousReadWrite.2010.sln create mode 100644 NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/SimpleAsynchronousReadWrite.2012.csproj create mode 100644 NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/SimpleAsynchronousReadWrite.2012.sln create mode 100644 NI-VISA/Examples/.NET/SimpleReadWrite/App.ico create mode 100644 NI-VISA/Examples/.NET/SimpleReadWrite/AssemblyInfo.cs create mode 100644 NI-VISA/Examples/.NET/SimpleReadWrite/MainForm.cs create mode 100644 NI-VISA/Examples/.NET/SimpleReadWrite/MainForm.resx create mode 100644 NI-VISA/Examples/.NET/SimpleReadWrite/ReadMe.txt create mode 100644 NI-VISA/Examples/.NET/SimpleReadWrite/SelectResource.cs create mode 100644 NI-VISA/Examples/.NET/SimpleReadWrite/SelectResource.resx create mode 100644 NI-VISA/Examples/.NET/SimpleReadWrite/SimpleReadWrite.2010.csproj create mode 100644 NI-VISA/Examples/.NET/SimpleReadWrite/SimpleReadWrite.2010.sln create mode 100644 NI-VISA/Examples/.NET/SimpleReadWrite/SimpleReadWrite.2012.csproj create mode 100644 NI-VISA/Examples/.NET/SimpleReadWrite/SimpleReadWrite.2012.sln create mode 100644 NI-VISA/Examples/C/Examples_MSVC.dsw create mode 100644 NI-VISA/Examples/C/Examples_MSVC_VS2005.sln create mode 100644 NI-VISA/Examples/C/General/FindRsrc.c create mode 100644 NI-VISA/Examples/C/General/FindRsrc_MSVC.dsp create mode 100644 NI-VISA/Examples/C/General/FindRsrc_MSVC_VS2005.vcproj create mode 100644 NI-VISA/Examples/C/General/Locking.c create mode 100644 NI-VISA/Examples/C/General/Locking_MSVC.dsp create mode 100644 NI-VISA/Examples/C/General/Locking_MSVC_VS2005.vcproj create mode 100644 NI-VISA/Examples/C/General/RdWrt.c create mode 100644 NI-VISA/Examples/C/General/RdWrt_MSVC.dsp create mode 100644 NI-VISA/Examples/C/General/RdWrt_MSVC_VS2005.vcproj create mode 100644 NI-VISA/Examples/C/Gpib/AsyncIO.c create mode 100644 NI-VISA/Examples/C/Gpib/AsyncIO_MSVC.dsp create mode 100644 NI-VISA/Examples/C/Gpib/AsyncIO_MSVC_VS2005.vcproj create mode 100644 NI-VISA/Examples/C/Gpib/AsyncSRQ.c create mode 100644 NI-VISA/Examples/C/Gpib/AsyncSRQ_MSVC.dsp create mode 100644 NI-VISA/Examples/C/Gpib/AsyncSRQ_MSVC_VS2005.vcproj create mode 100644 NI-VISA/Examples/C/Gpib/WaitSRQ.c create mode 100644 NI-VISA/Examples/C/Gpib/WaitSRQ_MSVC.dsp create mode 100644 NI-VISA/Examples/C/Gpib/WaitSRQ_MSVC_VS2005.vcproj create mode 100644 NI-VISA/Examples/C/PXI/ReserveTrig.c create mode 100644 NI-VISA/Examples/C/PXI/ReserveTrig_MSVC.dsp create mode 100644 NI-VISA/Examples/C/PXI/ReserveTrig_MSVC_VS2005.vcproj create mode 100644 NI-VISA/Examples/C/PXI/RouteTrig.c create mode 100644 NI-VISA/Examples/C/PXI/RouteTrig_MSVC.dsp create mode 100644 NI-VISA/Examples/C/PXI/RouteTrig_MSVC_VS2005.vcproj create mode 100644 NI-VISA/Examples/C/Serial/RdWrtSrl.c create mode 100644 NI-VISA/Examples/C/Serial/RdWrtSrl_MSVC.dsp create mode 100644 NI-VISA/Examples/C/Serial/RdWrtSrl_MSVC_VS2005.vcproj create mode 100644 NI-VISA/Examples/C/TCPIP/TCPIP_MSVC.dsp create mode 100644 NI-VISA/Examples/C/TCPIP/TCPIP_MSVC_VS2005.vcproj create mode 100644 NI-VISA/Examples/C/TCPIP/tcpip.c create mode 100644 NI-VISA/Examples/C/USB/RdWrtUSBTMC.c create mode 100644 NI-VISA/Examples/C/USB/RdWrtUSBTMC_MSVC.dsp create mode 100644 NI-VISA/Examples/C/USB/RdWrtUSBTMC_MSVC_VS2005.vcproj create mode 100644 NI-VISA/Examples/C/USB/USBDescriptors.c create mode 100644 NI-VISA/Examples/C/USB/USBDescriptors_MSVC.dsp create mode 100644 NI-VISA/Examples/C/USB/USBDescriptors_MSVC_VS2005.vcproj create mode 100644 NI-VISA/Examples/C/Vxi-vme/AsyncIntr.c create mode 100644 NI-VISA/Examples/C/Vxi-vme/AsyncIntr_MSVC.dsp create mode 100644 NI-VISA/Examples/C/Vxi-vme/AsyncIntr_MSVC_VS2005.vcproj create mode 100644 NI-VISA/Examples/C/Vxi-vme/HighReg.c create mode 100644 NI-VISA/Examples/C/Vxi-vme/HighReg_MSVC.dsp create mode 100644 NI-VISA/Examples/C/Vxi-vme/HighReg_MSVC_VS2005.vcproj create mode 100644 NI-VISA/Examples/C/Vxi-vme/LowReg.c create mode 100644 NI-VISA/Examples/C/Vxi-vme/LowReg_MSVC.dsp create mode 100644 NI-VISA/Examples/C/Vxi-vme/LowReg_MSVC_VS2005.vcproj create mode 100644 NI-VISA/Examples/C/Vxi-vme/ShareSys.c create mode 100644 NI-VISA/Examples/C/Vxi-vme/ShareSys_MSVC.dsp create mode 100644 NI-VISA/Examples/C/Vxi-vme/ShareSys_MSVC_VS2005.vcproj create mode 100644 NI-VISA/Examples/C/Vxi-vme/WaitIntr.c create mode 100644 NI-VISA/Examples/C/Vxi-vme/WaitIntr_MSVC.dsp create mode 100644 NI-VISA/Examples/C/Vxi-vme/WaitIntr_MSVC_VS2005.vcproj create mode 100644 NI-VISA/Examples/C/Vxi-vme/WaitTrig.c create mode 100644 NI-VISA/Examples/C/Vxi-vme/WaitTrig_MSVC.dsp create mode 100644 NI-VISA/Examples/C/Vxi-vme/WaitTrig_MSVC_VS2005.vcproj create mode 100644 NI-VISA/Examples/VB6/General/FindRsrc.frm create mode 100644 NI-VISA/Examples/VB6/General/FindRsrc.vbp create mode 100644 NI-VISA/Examples/VB6/Vxi-vme/visahigh.frm create mode 100644 NI-VISA/Examples/VB6/Vxi-vme/visahigh.vbp create mode 100644 TC01App/TC01App.sln create mode 100644 TC01App/TC01App/App.config create mode 100644 TC01App/TC01App/Form1.Designer.cs create mode 100644 TC01App/TC01App/Form1.cs create mode 100644 TC01App/TC01App/Form1.resx create mode 100644 TC01App/TC01App/Program.cs create mode 100644 TC01App/TC01App/Properties/AssemblyInfo.cs create mode 100644 TC01App/TC01App/Properties/Resources.Designer.cs create mode 100644 TC01App/TC01App/Properties/Resources.resx create mode 100644 TC01App/TC01App/Properties/Settings.Designer.cs create mode 100644 TC01App/TC01App/Properties/Settings.settings create mode 100644 TC01App/TC01App/TC01App.csproj diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..56d8c06 --- /dev/null +++ b/.gitignore @@ -0,0 +1,345 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ +**/Properties/launchSettings.json + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +## +## Visual Studio Code +## +**/.vscode/* +!**/.vscode/extensions.json +!**/.vscode/format-report.json +!**/.vscode/launch.json +!**/.vscode/settings.json +!**/.vscode/tasks.json +!**/.vscode/mklink.md + +*.lnk + +.kanbn +Adaptation/.kanbn diff --git a/.vscode/mklink.md b/.vscode/mklink.md new file mode 100644 index 0000000..cab493e --- /dev/null +++ b/.vscode/mklink.md @@ -0,0 +1,5 @@ +# mklink + +```bash +mklink /J "T:\MET08RESIMAPCDE\06_SourceCode\MET08RESIMAPCDE\Adaptation\.kanbn" "D:\5-Other-Small\Kanban\MET08RESIMAPCDE" +``` diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..3599b51 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "[markdown]": { + "editor.wordWrap": "off" + } +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..1bdc434 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,95 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "MSBuild for FindResources", + "command": "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe", + "type": "process", + "args": [ + "/target:Build", + "/restore:True", + "/p:RestoreSources=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF%40Local/nuget/v3/index.json%3Bhttps://api.nuget.org/v3/index.json", + "/detailedsummary", + "/consoleloggerparameters:PerformanceSummary;ErrorsOnly;", + "/property:Configuration=Debug;TargetFrameworkVersion=v4.8", + "NI-VISA/Examples/.NET/FindResources/FindResources.2012.csproj" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "MSBuild for RegisterBasedOperations", + "command": "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe", + "type": "process", + "args": [ + "/target:Build", + "/restore:True", + "/p:RestoreSources=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF%40Local/nuget/v3/index.json%3Bhttps://api.nuget.org/v3/index.json", + "/detailedsummary", + "/consoleloggerparameters:PerformanceSummary;ErrorsOnly;", + "/property:Configuration=Debug;TargetFrameworkVersion=v4.8", + "NI-VISA/Examples/.NET/RegisterBasedOperations/RegisterBasedOperations.2012.csproj" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "MSBuild for ServiceRequest", + "command": "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe", + "type": "process", + "args": [ + "/target:Build", + "/restore:True", + "/p:RestoreSources=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF%40Local/nuget/v3/index.json%3Bhttps://api.nuget.org/v3/index.json", + "/detailedsummary", + "/consoleloggerparameters:PerformanceSummary;ErrorsOnly;", + "/property:Configuration=Debug;TargetFrameworkVersion=v4.8", + "NI-VISA/Examples/.NET/ServiceRequest/ServiceRequest.2012.csproj" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "MSBuild for SimpleAsynchronousReadWrite", + "command": "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe", + "type": "process", + "args": [ + "/target:Build", + "/restore:True", + "/p:RestoreSources=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF%40Local/nuget/v3/index.json%3Bhttps://api.nuget.org/v3/index.json", + "/detailedsummary", + "/consoleloggerparameters:PerformanceSummary;ErrorsOnly;", + "/property:Configuration=Debug;TargetFrameworkVersion=v4.8", + "NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/SimpleAsynchronousReadWrite.2012.csproj" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "MSBuild for SimpleReadWrite", + "command": "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe", + "type": "process", + "args": [ + "/target:Build", + "/restore:True", + "/p:RestoreSources=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF%40Local/nuget/v3/index.json%3Bhttps://api.nuget.org/v3/index.json", + "/detailedsummary", + "/consoleloggerparameters:PerformanceSummary;ErrorsOnly;", + "/property:Configuration=Debug;TargetFrameworkVersion=v4.8", + "NI-VISA/Examples/.NET/SimpleReadWrite/SimpleReadWrite.2012.csproj" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "MSBuild for TC01App", + "command": "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe", + "type": "process", + "args": [ + "/target:Build", + "/restore:True", + "/p:RestoreSources=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF%40Local/nuget/v3/index.json%3Bhttps://api.nuget.org/v3/index.json", + "/detailedsummary", + "/consoleloggerparameters:PerformanceSummary;ErrorsOnly;", + "/property:Configuration=Debug;TargetFrameworkVersion=v4.8", + "NI-VISA/Examples/.NET/TC01App/TC01App/TC01App.csproj" + ], + "problemMatcher": "$msCompile" + } + ] +} \ No newline at end of file diff --git a/NI-VISA/Documentation/Readme.html b/NI-VISA/Documentation/Readme.html new file mode 100644 index 0000000..f3afead --- /dev/null +++ b/NI-VISA/Documentation/Readme.html @@ -0,0 +1,553 @@ + + + + + + +NI-VISA 15.0 for Windows Readme + + + + + + + + + +

NI-VISA 15.0 for Windows Readme

+

June 2015

+

This file contains important information about NI-VISA, including supported platforms, new features, and information about bugs fixes and known issues for NI-VISA 15.0. +

Overview

+

Supported Platforms

+

NI Application Software Support

+

Installing and Uninstalling NI-VISA

+

Known Issues and Bug Fixes

+

Product Security and Critical Updates

+

New Features and Improvements

+

Driver Version Naming Changes

+

How to Use NI Software with Microsoft Windows 8.x

+

NI Software Support for Microsoft Windows Vista, Windows XP, and Windows Server 2003

+

Legal Information

+ + +
+ +

Overview

+

NI-VISA is the NI implementation of the Virtual Instrument Software Architecture (VISA), a standard for configuring, programming, and troubleshooting instrumentation systems comprising GPIB, VXI, PXI, Serial, Ethernet, and/or USB interfaces.

+ +

Supported Platforms

+ +

NI-VISA for Windows supports the following platforms:

+ + + +

While this distribution targets all of these platforms, you can run setup.exe only on the Windows variants.

+ +

1 NI-VISA does not support the Windows Server non-R2 editions.

+ +

2 Support for Windows Server 2003 R2 may require disabling physical address extensions (PAE). To learn how this might affect your use of Windows Server 2003 and what actions you might need to take, visit ni.com/info and enter the info code PAESupport.

+ +

NI Application Software Support

+ +

NI-VISA for Windows supports the following development environments. If you are not using NI application software, refer to Microsoft Visual Studio Support.

+ + + + + + + + + + + + + + + + + + +
NI Application SoftwareVersions Supported by NI-VISA
LabVIEW2015/2014/2013/2012
LabWindows/CVI2015/2013/2012/2010
Measurement Studio2013/2012/2010/2009
+

Measurement Studio Examples

+

The directories that the Measurement Studio examples install to depends on which component is installed, the version of Visual Studio or the .NET Framework the example supports, the version of Measurement Studio installed, and the operating system. For detailed information on examples for Measurement Studio, refer to Where to Find Examples in the NI Measurement Studio Help.

+ +

Microsoft Visual Studio Support

+

The following table lists the programming languages and Microsoft Visual Studio versions supported by this version of NI-VISA. Earlier versions of NI-VISA support other application software and language versions. For more information on Visual Studio compatibility with earlier versions of VISA, refer to ni.com/info and enter the info code NETlegacydrivers. To find and download an earlier version of a driver, refer to ni.com/downloads.

+ + + + + + + + + + + + + + + + + + + + + + + + +
Programming LanguageVisual Studio Versions Support by NI-VISA
Visual C++ MFC120082
.NET Framework 3.5 Languages
+(Visual C# and Visual Basic .NET) +
2008
.NET Framework 4.0 Languages
+(Visual C# and Visual Basic .NET) +
20103
.NET Framework 4.5 Languages
+(Visual C# and Visual Basic .NET) +
20124
1 NI-VISA includes limited support for Visual Studio C++ MFC. For more information, visit ni.com/info and enter the info code visamvs03.
+ +2 Requires Measurement Studio 8.6 — Measurement Studio 2009.
+ +3 With Windows XP, Service Pack 3 or later is required.
+ +4 Windows 8, Windows 7, Windows Vista SP2, or Windows Server 2008 R2 is required.
+
+

If you are using the NI-VISA .NET Library, the .NET 3.5 Framework, .NET 4.0 Framework, or .NET 4.5 Framework is required.

+ +

Support for 64-bit applications is available in NI-VISA 4.5.1 and later for Visual Studio 2008 support, NI-VISA 5.0.3 and later for Visual Studio 2010 support, and NI-VISA 5.4 and later for Visual Studio 2012 support. +

+ +

Installing and Uninstalling NI-VISA

+ +

Before you install NI-VISA 15.0, NI recommends that you uninstall any versions of VISA prior to NI-VISA 2.0.1.

+ +

After uninstalling NI-VISA, some DLLs and executables may remain in the NI-VISA directories. To complete the uninstall process, you must restart your machine.

+ +

Note: The uninstaller application does not notify you when rebooting is necessary. If you plan to reinstall NI-VISA, you always should reboot the machine after running the uninstaller.

+

Agilent/HP Controller Support

+ +

NI-VISA now works with Agilent/HP GPIB and VXI controller cards. To use this feature, go into MAX, select Tools»NI-VISA»VISA Options, choose the Passports tab, and enable the NiVisaTulip.dll Passport. NI-VISA automatically finds and accesses any GPIB or VXI devices. However, NI-VISA does not configure the Agilent/HP hardware; you still must do that with the Agilent/HP I/O Config utility.

+ +

If you have both NI and Agilent/HP controllers in the same system, you must configure the cards at different system addresses, such as GPIB0 and GPIB1. If both vendors try to use the same interface address, NI-VISA reports an error from viFindRsrc or VISA Find Resources.

+ + + +

WHQL Signing USB Hardware

+ +

To WHQL (Windows Hardware Quality Labs) sign your USB hardware using the NI-VISA driver for Windows XP/2000, as part of this process you need a PDB (Program Database) file for the underlying driver (NiViUsbK.sys).

+ +

NiViUsbK.pdb is provided for this purpose. It is in <NI-VISA Installation Directory>\WinNT\NIvisa\USB.

+ +

Creating and Digitally Signing Catalog Files

+ +

(Windows Vista, Windows 7) If you generate an INF file using the NI-VISA Driver Wizard, the INF file installs correctly by itself. However, a warning dialog notifies you that Windows cannot verify the publisher of this driver software. To avoid this dialog, you must create and digitally sign a Windows Catalog (.cat) file.

+

(Windows 8.x) If you generate an INF file using the NI-VISA Driver Wizard, you must create and digitally sign a Windows Catalog (.cat) file before you can install the INF file on a Windows 8.x machine. For more information about digitally signing a .cat file for Windows 8.x, visit ni.com/info and enter the Info Code INFWin8.

+

For more information about creating and signing catalog files, Microsoft has a Kernel-Mode Code Signing Walkthrough whitepaper that describes the details of this process. The generated catalog file should reference only the INF file.

+ +

Known Issues and Bug Fixes

+

For a list of Known Issues of NI-VISA 15.0, visit ni.com/info and enter the Info Code NIVISA150KnownIssues.

+

For a list of Bug Fixes for NI-VISA, visit ni.com/info and enter the Info Code NIVISAFixList.

+ + +

Product Security and Critical Updates

+ +

Visit ni.com/security to view and subscribe to receive security notifications about NI products. Visit ni.com/critical-updates for information about critical updates from NI.

+ +

New Features and Improvements

+

NI-VISA 15.0

+

Added support for the industry standard API for VISA .NET as specified by the IVI Foundation in VPP 4.3.6. NI recommends this API for developing new .NET applications using NI-VISA. Support for the legacy VisaNS API will be removed in a future release. For more information about upgrading from VisaNS to the new VISA .NET API, visit ni.com/info and enter the Info Code VISANETUpgrade.

+

NI-VISA 14.0

+

Added support for NI Linux Real-Time x64.

+

Added support for viMapTrigger and viAssertTrigger on PXI resources to use PXI-9 compliant trigger managers if available.

+

Added support for viGpibControlREN on TCPIP resources that use the VXI-11 protocol.

+

NI-VISA 5.4

+

Added support for NI Linux Real-Time.

+

NI-VISA 5.3

+

Improved performance of viRead for a HiSLIP resource.

+

NI-VISA 5.2

+

Added support for IVI VISA Plug-in specification. NI-VISA 5.2 can enumerate and communicate with third-party PCI/PXI devices with specification-compliant plug-ins that are installed on the system.

+

Improved performance of viWrite for a HiSLIP resource.

+

NI-VISA 5.1

+

Added support for HiSLIP.

+

Added support for USB resources on PharLap-based LabVIEW RT targets.

+

Updated the VISA Interactive Control stand-alone application. Refer to the NI-VISA Help for more information on the updates to VISAIC.

+

NI-VISA 5.0.3

+

Added support for .NET Framework 4.0

+

NI-VISA 5.0.1

+ +

Added support for IPxi interface in VISA-COM layer.

+ +

NI-VISA 5.0

+ +

Added the ability to launch Instrument Driver Finder from MAX.

+ +

Added a page in the Driver Development Wizard to auto-detect USB devices and auto-populate device info.

+ +

Added the ability to custom install VISA passports on Real-Time targets.

+ +

Added support for 64-bit formatted I/O.

+ +

Added the ability to configure IEEE 1588-2008 clocks on networks.

+ +

NI-VISA 4.6.2

+ +

Added support for Windows 7 (32-bit version), Windows 7 x64 Edition (64-bit version), Windows Server 2003 R2 (32-bit version only), and Windows Server 2008 R2 (64-bit version only).

+ +

NI-VISA 4.5.1

+ +

Added support for 64-bit user mode in .NET 3.5 Framework. You can now create 64-bit applications with .NET Framework 3.5. For additional information, refer to Working with 64-bit .NET Support for NI-VISA in the NI-VISA .NET Framework 3.5 Help. This help file is installed by default at Start»All Programs»National Instruments»VISA»Documentation»NI-VISA .NET Framework 3.5 Help.

+ +

NI-VISA 4.5

+ +

Added a page in MAX to allow viewing and changing the Conflict Resolution Manager settings.

+ +

NI-VISA 4.4

+ +

Added support for using NI-VISA with 64-bit applications on Windows Vista x64 Edition. VXI, GPIB-VXI, and FireWire resources are not currently supported for 64-bit applications.

+ +

Added automatic detection of LXI (TCP/IP) devices that support the mDNS and DNS-SD technologies.

+ +

Added support for USB and TCP/IP resources on VxWorks-based LabVIEW RT targets.

+ + +

NI-VISA 4.3

+ +

When using the MAX Copy Configuration API, you can now specify "ni-visa" as the product. All documented modes are supported.

+ + +

NI-VISA 4.2

+ +

The default installation directory has changed from "C:\VXIPNP" to "C:\Program Files\IVI Foundation\VISA". Upgrades over previous versions of NI-VISA use the previous installation directory.

+ +

The default path to the configuration file visaconf.ini has changed to "C:\Documents and Settings\All Users\Application Data\National Instruments\NIvisa" on Windows XP/2000 and to "C:\ProgramData\National Instruments\NIvisa" on Windows Vista.

+ +

Added support for Windows Mobile 5.0 on x86 processors.

+ +

NI-VISA 4.1

+ +

The NI-VISA Driver Wizard generates new INF files that work on Vista. If you want to run your VISA based drivers on Vista that previously required an INF file, you will need to regenerate a new INF file using the new Driver Wizard.

+ +

On Pocket PC 2003/Windows Mobile 5.0 devices, the NI-VISA configuration file visaconf.ini was installed as read-only. This caused problems with serial port detection. Now it is writable.

+ +

In MAX, the IP address of TCPIP INSTR and SOCKET resources was not shown when the resource was configuring using a hostname. This IP address is now shown.

+ +

NI-VISA Server now warns if it is launched and there are no permissions set to allow clients to connect.

+ +

The NI-VISA Driver Wizard now has an option for PXI Express devices that provide a way to read the slot number using a sequence of register-level accesses.

+ +

The enabled/disabled state of Passports is preserved across upgrades of NI-VISA.

+ + + +

NI-VISA 4.0

+ +

Added support for 64-bit data transfers in register-based operations, to support the VISA 4.0 specification.

+ +

Driver Version Naming Changes

+ + +

NI-VISA versions are now aligned with the versions of major NI application software products. This alignment gives you information about the year the driver was released and the most recent software version the driver was designed to work with. Driver versions now start with a two-digit year indicator: <ProductName><Year-BasedVersion>. For example, NI-VISA 15.0.0 is the version released with LabVIEW 2015. The last version released under the old numbering scheme is NI-VISA 5.4. The first version released under the new numbering scheme is NI-VISA 14.0.0.

+ +

Automating the Installation of NI Products

+

You can automate the installation of most NI products using command-line arguments to suppress some or all of the installer user interface and dialog boxes. However, starting with the August 2012 releases (products using NI Installers version 3.1 or later), you may need to perform additional steps before or during a silent installation of NI software.

+ +

If the NI product you are installing uses Microsoft .NET 4.0, the .NET installer may run before any NI software installs and may require a reboot before the installation of NI software begins. To avoid a .NET reboot, install .NET 4.0 separately before you install NI software.

+ +

For more information about automating the installation of NI products, refer to the following KnowledgeBase articles:

+ + + +

How to Use NI Software with Microsoft Windows 8.x

+ +

When you install NI software on Microsoft Windows 8.x, you will notice a few additional tiles in the Apps view, including shortcuts to NI application software products such as LabVIEW, Measurement & Automation Explorer (NI MAX), and NI Launcher.

+ +

Using NI Launcher

+

NI Launcher helps you find and launch installed NI products. It provides you with a method of finding NI products similar to the Start menu in previous versions of Microsoft Windows. To use NI Launcher, click the NI Launcher tile in the Apps view. NI Launcher launches the desktop and opens a menu containing a list of NI products. Click any NI product to launch it.

+ + + + + +
Note  NI MAX does not appear as a desktop shortcut when installed on Microsoft Windows 8.x. You can launch NI MAX either from the Apps view or from within NI Launcher.
+

Pinning Frequently Used Applications

+

For convenience, you can pin your most-used NI applications, such as MAX, to either the Start screen or the Taskbar on the desktop, as necessary:

+ + + + + + + + + +
Current ApplicationIcon LocationPin to Action
Windows 8.x DesktopDesktop TaskbarRight-click application and select Pin to Taskbar
Windows 8.x DesktopStart screenRight-click application and select Pin to Start
Windows 8.x Start screenDesktop TaskbarRight-click application and select Pin to taskbar from the menu bar on the bottom of the screen
+ +

Finding All Programs

+

If you want to find a particular application or related files, such as documentation files, from the Start screen, you can access all installed files from the Apps view. To get to the Apps view, right-click anywhere on the Start screen and select All apps (Windows 8) or click the down arrow on the bottom left of the screen (Windows 8.1).

+ +

For more information about NI support for Windows 8.x, visit ni.com/windows8.

+ + + + + +

NI-VISA Drops Support for Microsoft Windows Vista, Windows XP, and Windows Server 2003 in 2016

+

NI-VISA will drop support for Microsoft Windows Vista, Windows XP, and Windows Server 2003 as of July 1, 2016. Versions of NI-VISA that ship after July 1, 2016 will not install or run on Windows Vista, Windows XP, or Windows Server 2003. For detailed information about NI application software product life cycles, visit ni.com/info and enter one of the following Info Codes:

+ + + + + + + + + + +
ProductInfo Code
LabVIEWlifecycle
LabWindows™/CVI™cvi_lifecycle
Measurement Studiomstudiolifecycle
TestStandtslcp
DIAdemddlcp
SignalExpressselcp
VeriStandnivslifecycle
+ + + +
+ +

Legal Information

+ +

Copyright

+

© 1995–2015 National Instruments. All rights reserved.

+ +

Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic or mechanical, including photocopying, recording, storing in an information retrieval system, or translating, in whole or in part, without the prior written consent of National Instruments Corporation.

+ +

National Instruments respects the intellectual property of others, and we ask our users to do the same. NI software is protected by copyright and other intellectual property laws. Where NI software may be used to reproduce software or other materials belonging to others, you may use NI software only to reproduce materials that you may reproduce in accordance with the terms of any applicable license or other legal restriction.

+ +

End-User License Agreements and Third-Party Legal Notices

+

You can find end-user license agreements (EULAs) and third-party legal notices in the following locations after installation:

+ +

U.S. Government Restricted Rights

+

If you are an agency, department, or other entity of the United States Government ("Government"), the use, duplication, reproduction, release, modification, disclosure or transfer of the technical data included in this manual is governed by the Restricted Rights provisions under Federal Acquisition Regulation 52.227-14 for civilian agencies and Defense Federal Acquisition Regulation Supplement Section 252.227-7014 and 252.227-7015 for military agencies.

+ +

IVI Foundation Copyright Notice

+ +

Content from the IVI specifications reproduced with permission from the IVI Foundation.

+ +

The IVI Foundation and its member companies make no warranty of any kind with regard to this material, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The IVI Foundation and its member companies shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this material.

+ + + +

Trademarks

+ +

Refer to the NI Trademarks and Logo Guidelines at ni.com/trademarks for information on National Instruments trademarks. Other product and company names mentioned herein are trademarks or trade names of their respective companies.

+ + +

Patents

+

For patents covering the National Instruments products/technology, refer to the appropriate location: Help»Patents in your software, the patents.txt file on your media, or the National Instruments Patent Notice at ni.com/patents.

+ +

374899B-01

+ + diff --git a/NI-VISA/Examples/.NET/FindResources/App.ico b/NI-VISA/Examples/.NET/FindResources/App.ico new file mode 100644 index 0000000000000000000000000000000000000000..403417b99a7dd62aa99bc6f189e7fce84ebff1fd GIT binary patch literal 10614 zcmeHM2T)sCmQ`<8P48~cOizz(GKic(NC*@NA|oUaIS7%H$Vo&Ygdze25-P1ig-Lt#3-Mce2UNP?Rb~*P-H@W|P`~Q>y9 zi;4*}&xrxi(_zdkXhEVWG1wrHV8vx;{w*tMsjmpeYBuCz4u&WLRhUOx4ZGqZS!eQZ zkDI%>p2N+-!iwM!w4R`f@>j6rrg)OWfnDX$)AgeDG2&$*c5^J}#w`74y!d3AHc=P6 z&=v9IfICp-lM!i2jCTJ?6mj8p6}g6eRIkb$VqSVmPK57-ApYuP=51-o!AQnGiqQ9hm?eS7Ybq^WVGC$;1UJ_azGauRu@XlG|Ke# z{4>M+zP>TPHC}dYuKah`MUu|E&kwujdlF^szVr2{feMGbc$>GzCx+X0SGbAFQXI95 zLCU4tiXO3;BvW;UwN;T781eXU?D}QisZ4lhyW>P!``csD%0S*yPs(DO-(`VgJ;gpT z@GV)&jD{=-{duHhm=X=DU19}to$u+h(xKWRxdx_=bK=I&Hb-u5Pwa1Y9j~-V&#!9X0CO=L&A z;KAvYTi2zxP9|?|3?4~^n+rVYM4?0!FKZ2$thVnigXCofypAF^0Nl@WoZ$NsoYTxz z7!ZqaW+P{H#M+4LODd)n!G5Fp}az9-mC!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=s%$R-|XBz=l?OD>pQpqg6F!I<@WhH j&hdO*=Xk!(`*6A3bEG`W!?#aq=LOE6kjL|c0|5UGOq~>W literal 0 HcmV?d00001 diff --git a/NI-VISA/Examples/.NET/FindResources/AssemblyInfo.cs b/NI-VISA/Examples/.NET/FindResources/AssemblyInfo.cs new file mode 100644 index 0000000..9f89a32 --- /dev/null +++ b/NI-VISA/Examples/.NET/FindResources/AssemblyInfo.cs @@ -0,0 +1,58 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly: AssemblyTitle("")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly: AssemblyVersion("1.0.*")] + +// +// In order to sign your assembly you must specify a key to use. Refer to the +// Microsoft .NET Framework documentation for more information on assembly signing. +// +// Use the attributes below to control which key is used for signing. +// +// Notes: +// (*) If no key is specified, the assembly is not signed. +// (*) KeyName refers to a key that has been installed in the Crypto Service +// Provider (CSP) on your machine. KeyFile refers to a file which contains +// a key. +// (*) If the KeyFile and the KeyName values are both specified, the +// following processing occurs: +// (1) If the KeyName can be found in the CSP, that key is used. +// (2) If the KeyName does not exist and the KeyFile does exist, the key +// in the KeyFile is installed into the CSP and used. +// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. +// When specifying the KeyFile, the location of the KeyFile should be +// relative to the project output directory which is +// %Project Directory%\obj\. For example, if your KeyFile is +// located in the project directory, you would specify the AssemblyKeyFile +// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] +// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework +// documentation for more information on this. +// +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] +[assembly: AssemblyKeyName("")] diff --git a/NI-VISA/Examples/.NET/FindResources/CustomFilter.cs b/NI-VISA/Examples/.NET/FindResources/CustomFilter.cs new file mode 100644 index 0000000..9892be9 --- /dev/null +++ b/NI-VISA/Examples/.NET/FindResources/CustomFilter.cs @@ -0,0 +1,120 @@ +using System; +using System.Drawing; +using System.Collections; +using System.ComponentModel; +using System.Windows.Forms; + +namespace NationalInstruments.Examples.FindResources +{ + ///

+ /// CustomFilterForm lets the user enter the custom filter string to + /// find the available resources with. Public property CustomFilter + /// returns the custom filter string. + /// + public class CustomFilterForm : System.Windows.Forms.Form + { + private System.Windows.Forms.Label customFilterLabel; + private System.Windows.Forms.TextBox customFilterTextBox; + private System.Windows.Forms.Button okButton; + /// + /// Required designer variable. + /// + private System.ComponentModel.Container components = null; + + public CustomFilterForm() + { + // + // Required for Windows Form Designer support + // + InitializeComponent(); + } + + /// + /// Clean up any resources being used. + /// + protected override void Dispose( bool disposing ) + { + if( disposing ) + { + if(components != null) + { + components.Dispose(); + } + } + base.Dispose( disposing ); + } + + #region Windows Form Designer generated code + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(CustomFilterForm)); + this.customFilterTextBox = new System.Windows.Forms.TextBox(); + this.customFilterLabel = new System.Windows.Forms.Label(); + this.okButton = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // customFilterTextBox + // + this.customFilterTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.customFilterTextBox.Location = new System.Drawing.Point(16, 24); + this.customFilterTextBox.Name = "customFilterTextBox"; + this.customFilterTextBox.Size = new System.Drawing.Size(152, 20); + this.customFilterTextBox.TabIndex = 0; + this.customFilterTextBox.Text = "?*"; + // + // customFilterLabel + // + this.customFilterLabel.Location = new System.Drawing.Point(16, 8); + this.customFilterLabel.Name = "customFilterLabel"; + this.customFilterLabel.Size = new System.Drawing.Size(144, 16); + this.customFilterLabel.TabIndex = 1; + this.customFilterLabel.Text = "Enter Custom Filter String:"; + // + // okButton + // + this.okButton.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.okButton.Location = new System.Drawing.Point(56, 56); + this.okButton.Name = "okButton"; + this.okButton.TabIndex = 2; + this.okButton.Text = "OK"; + this.okButton.Click += new System.EventHandler(this.okButton_Click); + // + // CustomFilterForm + // + this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); + this.ClientSize = new System.Drawing.Size(184, 78); + this.Controls.Add(this.okButton); + this.Controls.Add(this.customFilterLabel); + this.Controls.Add(this.customFilterTextBox); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MaximizeBox = false; + this.MaximumSize = new System.Drawing.Size(384, 112); + this.MinimumSize = new System.Drawing.Size(192, 112); + this.Name = "CustomFilterForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Custom Filter"; + this.ResumeLayout(false); + + } + #endregion + + private void okButton_Click(object sender, System.EventArgs e) + { + this.Close(); + } + + public string CustomFilter + { + get + { + return customFilterTextBox.Text; + } + } + + } +} diff --git a/NI-VISA/Examples/.NET/FindResources/CustomFilter.resx b/NI-VISA/Examples/.NET/FindResources/CustomFilter.resx new file mode 100644 index 0000000..69ec639 --- /dev/null +++ b/NI-VISA/Examples/.NET/FindResources/CustomFilter.resx @@ -0,0 +1,338 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////AAD///////8AAP///////wAA//////// + AAD///////8AAP///////wAA//8AB///AAD//AAB//8AAP/wAAB//wAA/+AAAD//AAD/wAAAH/8AAP+A + AAAP/wAA/wAAAAf/AAD+AAAAA/8AAP4AAAAD/wAA/AAAAAH/AAD8AAAAAf8AAPgAAAAA/wAA+AAAAAD/ + AAD4AAAAAP8AAPgAAAAAfwAA+AAAAAB/AADwAAAAAH8AAPAAAAAAfwAA8AAAAAB/AADwAAAAAD8AAPAA + AAAABwAA8AAAAAADAADwAAAAAAEAAIAAAAAAgQAAgAAAAADDAACAAAAAAf8AAIAAAAAB/wAAgAAAAAP/ + AACAAAAAA/8AAIAAAAAH/wAAwAAAAA//AADAAAAAH/8AAMAAAAA//wAA4DgAAP//AADgfAAB//8AAPD/ + gA///wAA////////AAD///////8AAP///////wAA////////AAD///////8AAP///////wAA + + + + Private + + + True + + + 8, 8 + + + (Default) + + + False + + + True + + + CustomFilterForm + + + True + + + 80 + + + False + + + Private + + + False + + + Private + + + Private + + + False + + + Private + + + Private + + + False + + + Private + + \ No newline at end of file diff --git a/NI-VISA/Examples/.NET/FindResources/FindResources.2010.csproj b/NI-VISA/Examples/.NET/FindResources/FindResources.2010.csproj new file mode 100644 index 0000000..20a7499 --- /dev/null +++ b/NI-VISA/Examples/.NET/FindResources/FindResources.2010.csproj @@ -0,0 +1,123 @@ + + + + Local + 10.0.21006.1 + 2.0 + {63793699-6C64-4519-AD56-9178CACFEA8A} + Debug + AnyCPU + App.ico + + + FindResources + + + JScript + Grid + IE50 + false + WinExe + NationalInstruments.Examples.FindResources + OnBuildSuccess + + + + + v4.0 + + + bin\Debug\ + false + 285212672 + false + + + DEBUG;TRACE;NETFX3_5;NETFX2_0;NETFX4_0 + + + true + 4096 + false + + + false + false + false + false + 4 + AnyCPU + + + bin\Release\ + false + 285212672 + false + + + TRACE;NETFX3_5;NETFX2_0;NETFX4_0 + + + false + 4096 + false + + + true + false + false + false + 4 + AnyCPU + + + + + + System + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.dll + + + System.Data + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Data.dll + + + System.Drawing + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Drawing.dll + + + System.Windows.Forms + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll + + + System.XML + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll + + + + + + Code + + + Form + + + Form + + + CustomFilter.cs + + + MainForm.cs + + + + + + + + + + + \ No newline at end of file diff --git a/NI-VISA/Examples/.NET/FindResources/FindResources.2010.sln b/NI-VISA/Examples/.NET/FindResources/FindResources.2010.sln new file mode 100644 index 0000000..8dd6e4b --- /dev/null +++ b/NI-VISA/Examples/.NET/FindResources/FindResources.2010.sln @@ -0,0 +1,19 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FindResources", "FindResources.2010.csproj", "{63793699-6C64-4519-AD56-9178CACFEA8A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {63793699-6C64-4519-AD56-9178CACFEA8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {63793699-6C64-4519-AD56-9178CACFEA8A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {63793699-6C64-4519-AD56-9178CACFEA8A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {63793699-6C64-4519-AD56-9178CACFEA8A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/NI-VISA/Examples/.NET/FindResources/FindResources.2012.csproj b/NI-VISA/Examples/.NET/FindResources/FindResources.2012.csproj new file mode 100644 index 0000000..5240d9b --- /dev/null +++ b/NI-VISA/Examples/.NET/FindResources/FindResources.2012.csproj @@ -0,0 +1,125 @@ + + + + Local + 11.0.50522.1 RCREL + 2.0 + {63793699-6C64-4519-AD56-9178CACFEA8A} + Debug + AnyCPU + App.ico + + + FindResources + + + JScript + Grid + IE50 + false + WinExe + NationalInstruments.Examples.FindResources + OnBuildSuccess + + + + + v4.5 + + + bin\Debug\ + false + 285212672 + false + + + DEBUG;TRACE;NETFX3_5;NETFX2_0;NETFX4_0;NETFX4_5 + + + true + 4096 + false + + + false + false + false + false + 4 + AnyCPU + false + + + bin\Release\ + false + 285212672 + false + + + TRACE;NETFX3_5;NETFX2_0;NETFX4_0;NETFX4_5 + + + false + 4096 + false + + + true + false + false + false + 4 + AnyCPU + false + + + + + + System + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.dll + + + System.Data + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Data.dll + + + System.Drawing + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Drawing.dll + + + System.Windows.Forms + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll + + + System.XML + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll + + + + + + Code + + + Form + + + Form + + + CustomFilter.cs + + + MainForm.cs + + + + + + + + + + + \ No newline at end of file diff --git a/NI-VISA/Examples/.NET/FindResources/FindResources.2012.sln b/NI-VISA/Examples/.NET/FindResources/FindResources.2012.sln new file mode 100644 index 0000000..e0e4998 --- /dev/null +++ b/NI-VISA/Examples/.NET/FindResources/FindResources.2012.sln @@ -0,0 +1,19 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FindResources", "FindResources.2012.csproj", "{63793699-6C64-4519-AD56-9178CACFEA8A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {63793699-6C64-4519-AD56-9178CACFEA8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {63793699-6C64-4519-AD56-9178CACFEA8A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {63793699-6C64-4519-AD56-9178CACFEA8A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {63793699-6C64-4519-AD56-9178CACFEA8A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/NI-VISA/Examples/.NET/FindResources/MainForm.cs b/NI-VISA/Examples/.NET/FindResources/MainForm.cs new file mode 100644 index 0000000..9864f74 --- /dev/null +++ b/NI-VISA/Examples/.NET/FindResources/MainForm.cs @@ -0,0 +1,342 @@ +//================================================================================================== +// +// Title : MainForm.cs +// Purpose : This application shows the user how to use ResourceManager to +// find all of the available resources on their system. In the example, +// they can select between several filters to narrow the list. Public +// property ResourceName contains the resource name selected in tvwResourceTree +// +//================================================================================================== + +using System; +using System.Collections.Generic; +using System.Windows.Forms; +using Ivi.Visa; +using NationalInstruments.Visa; + +namespace NationalInstruments.Examples.FindResources +{ + /// + /// This application shows the user how to use ResourceManager to + /// find all of the available resources on their system. In the + /// example, they can select between several filters to narrow the + /// list. + /// + public class MainForm : System.Windows.Forms.Form + { + + private TreeNode ndGpib; + private TreeNode ndVxi; + private TreeNode ndSerial; + private TreeNode ndPxi; + private TreeNode ndTcpip; + private TreeNode ndUSB; + + /// + /// Required designer variable. + /// + private System.ComponentModel.Container components = null; + + private string filter; + private System.Windows.Forms.Button useCustomStringButton; + private System.Windows.Forms.Label filterStringLabel; + private System.Windows.Forms.Button findResourcesButton; + private System.Windows.Forms.Button clearButton; + private System.Windows.Forms.Label availableResourcesLabel; + private System.Windows.Forms.ListBox filterStringsListBox; + private System.Windows.Forms.TreeView resourceTreeView; + + public MainForm() + { + // + // Required for Windows Form Designer support + // + InitializeComponent(); + + ndGpib = new TreeNode("GPIB"); + ndVxi = new TreeNode("VXI"); + ndSerial = new TreeNode("Serial"); + ndPxi = new TreeNode("PXI"); + ndTcpip = new TreeNode("TCP/IP"); + ndUSB = new TreeNode("USB"); + CleanResourceNodes(); + + PopulateFilterList(); + } + + /// + /// Clean up any resources being used. + /// + protected override void Dispose(bool disposing) + { + if (disposing) + { + if (components != null) + { + components.Dispose(); + } + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); + this.availableResourcesLabel = new System.Windows.Forms.Label(); + this.resourceTreeView = new System.Windows.Forms.TreeView(); + this.findResourcesButton = new System.Windows.Forms.Button(); + this.filterStringsListBox = new System.Windows.Forms.ListBox(); + this.filterStringLabel = new System.Windows.Forms.Label(); + this.clearButton = new System.Windows.Forms.Button(); + this.useCustomStringButton = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // availableResourcesLabel + // + this.availableResourcesLabel.Location = new System.Drawing.Point(16, 213); + this.availableResourcesLabel.Name = "availableResourcesLabel"; + this.availableResourcesLabel.Size = new System.Drawing.Size(152, 16); + this.availableResourcesLabel.TabIndex = 0; + this.availableResourcesLabel.Text = "Available Resources Found:"; + // + // resourceTreeView + // + this.resourceTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.resourceTreeView.Location = new System.Drawing.Point(16, 232); + this.resourceTreeView.Name = "resourceTreeView"; + this.resourceTreeView.Size = new System.Drawing.Size(248, 136); + this.resourceTreeView.TabIndex = 5; + // + // findResourcesButton + // + this.findResourcesButton.Location = new System.Drawing.Point(16, 168); + this.findResourcesButton.Name = "findResourcesButton"; + this.findResourcesButton.Size = new System.Drawing.Size(130, 23); + this.findResourcesButton.TabIndex = 8; + this.findResourcesButton.Text = "Find Resources"; + this.findResourcesButton.Click += new System.EventHandler(this.findResourcesButton_Click); + // + // filterStringsListBox + // + this.filterStringsListBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.filterStringsListBox.Location = new System.Drawing.Point(16, 40); + this.filterStringsListBox.Name = "filterStringsListBox"; + this.filterStringsListBox.Size = new System.Drawing.Size(248, 121); + this.filterStringsListBox.TabIndex = 9; + // + // filterStringLabel + // + this.filterStringLabel.Location = new System.Drawing.Point(16, 24); + this.filterStringLabel.Name = "filterStringLabel"; + this.filterStringLabel.Size = new System.Drawing.Size(72, 16); + this.filterStringLabel.TabIndex = 10; + this.filterStringLabel.Text = "Filter String:"; + // + // clearButton + // + this.clearButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.clearButton.Location = new System.Drawing.Point(152, 168); + this.clearButton.Name = "clearButton"; + this.clearButton.Size = new System.Drawing.Size(112, 24); + this.clearButton.TabIndex = 11; + this.clearButton.Text = "Clear"; + this.clearButton.Click += new System.EventHandler(this.clearButton_Click); + // + // useCustomStringButton + // + this.useCustomStringButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.useCustomStringButton.Location = new System.Drawing.Point(152, 8); + this.useCustomStringButton.Name = "useCustomStringButton"; + this.useCustomStringButton.Size = new System.Drawing.Size(112, 24); + this.useCustomStringButton.TabIndex = 12; + this.useCustomStringButton.Text = "Use Custom String"; + this.useCustomStringButton.Click += new System.EventHandler(this.useCustomStringButton_Click); + // + // MainForm + // + this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); + this.ClientSize = new System.Drawing.Size(280, 373); + this.Controls.Add(this.useCustomStringButton); + this.Controls.Add(this.clearButton); + this.Controls.Add(this.filterStringLabel); + this.Controls.Add(this.filterStringsListBox); + this.Controls.Add(this.findResourcesButton); + this.Controls.Add(this.resourceTreeView); + this.Controls.Add(this.availableResourcesLabel); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MaximizeBox = false; + this.MinimumSize = new System.Drawing.Size(288, 400); + this.Name = "MainForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Available Resouces List"; + this.ResumeLayout(false); + + } + #endregion + + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.Run(new MainForm()); + } + + private void PopulateFilterList() + { + filterStringsListBox.Items.Clear(); + filterStringsListBox.Items.Add("?*"); + filterStringsListBox.Items.Add("ASRL?*INSTR"); + filterStringsListBox.Items.Add("GPIB?*"); + filterStringsListBox.Items.Add("GPIB?*INSTR"); + filterStringsListBox.Items.Add("GPIB?*INTFC"); + filterStringsListBox.Items.Add("PXI?*"); + filterStringsListBox.Items.Add("PXI?*BACKPLANE"); + filterStringsListBox.Items.Add("PXI?*INSTR"); + filterStringsListBox.Items.Add("TCPIP?*"); + filterStringsListBox.Items.Add("TCPIP?*INSTR"); + filterStringsListBox.Items.Add("TCPIP?*SOCKET"); + filterStringsListBox.Items.Add("USB?*"); + filterStringsListBox.Items.Add("USB?*INSTR"); + filterStringsListBox.Items.Add("USB?*RAW"); + filterStringsListBox.Items.Add("VXI?*"); + filterStringsListBox.Items.Add("VXI?*BACKPLANE"); + filterStringsListBox.Items.Add("VXI?*INSTR"); + filterStringsListBox.SelectedIndex = 0; + } + + private void AddToResourceTree() + { + if (ndGpib.Nodes.Count != 0) + resourceTreeView.Nodes.Add(ndGpib); + if (ndVxi.Nodes.Count != 0) + resourceTreeView.Nodes.Add(ndVxi); + if (ndSerial.Nodes.Count != 0) + resourceTreeView.Nodes.Add(ndSerial); + if (ndPxi.Nodes.Count != 0) + resourceTreeView.Nodes.Add(ndPxi); + if (ndTcpip.Nodes.Count != 0) + resourceTreeView.Nodes.Add(ndTcpip); + if (ndUSB.Nodes.Count != 0) + resourceTreeView.Nodes.Add(ndUSB); + } + + private void AddToResourceNode(string resourceName, HardwareInterfaceType intType) + { + switch (intType) + { + case HardwareInterfaceType.Gpib: + ndGpib.Nodes.Add(new TreeNode(resourceName)); + break; + case HardwareInterfaceType.Vxi: + ndVxi.Nodes.Add(new TreeNode(resourceName)); + break; + case HardwareInterfaceType.Serial: + ndSerial.Nodes.Add(new TreeNode(resourceName)); + break; + case HardwareInterfaceType.Pxi: + ndPxi.Nodes.Add(new TreeNode(resourceName)); + break; + case HardwareInterfaceType.Tcp: + ndTcpip.Nodes.Add(new TreeNode(resourceName)); + break; + case HardwareInterfaceType.Usb: + ndUSB.Nodes.Add(new TreeNode(resourceName)); + break; + default: + break; + } + } + + private void FindResources() + { + // This example uses an instance of the NationalInstruments.Visa.ResourceManager class to find resources on the system. + // Alternatively, static methods provided by the Ivi.Visa.ResourceManager class may be used when an application + // requires additional VISA .NET implementations. + using (var rm = new ResourceManager()) + { + try + { + IEnumerable resources = rm.Find(filter); + foreach (string s in resources) + { + ParseResult parseResult = rm.Parse(s); + AddToResourceNode(s, parseResult.InterfaceType); + } + AddToResourceTree(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + } + + private void CleanResourceNodes() + { + ndGpib.Nodes.Clear(); + ndVxi.Nodes.Clear(); + ndSerial.Nodes.Clear(); + ndPxi.Nodes.Clear(); + ndTcpip.Nodes.Clear(); + ndUSB.Nodes.Clear(); + } + + private void findResourcesButton_Click(object sender, System.EventArgs e) + { + filter = filterStringsListBox.Text; + DisplayResources(); + } + + private string getCustomFilter() + { + CustomFilterForm cff = new CustomFilterForm(); + cff.ShowDialog(); + return cff.CustomFilter; + } + + private void clearButton_Click(object sender, System.EventArgs e) + { + resourceTreeView.Nodes.Clear(); + CleanResourceNodes(); + } + + private void useCustomStringButton_Click(object sender, System.EventArgs e) + { + filter = getCustomFilter(); + DisplayResources(); + } + + private void DisplayResources() + { + resourceTreeView.Nodes.Clear(); + CleanResourceNodes(); + FindResources(); + resourceTreeView.ExpandAll(); + } + + public string ResourceName + { + get + { + try + { + return resourceTreeView.SelectedNode.Text; + } + catch (Exception) + { + return ""; + } + } + } + } +} diff --git a/NI-VISA/Examples/.NET/FindResources/MainForm.resx b/NI-VISA/Examples/.NET/FindResources/MainForm.resx new file mode 100644 index 0000000..6d4265d --- /dev/null +++ b/NI-VISA/Examples/.NET/FindResources/MainForm.resx @@ -0,0 +1,305 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + + + AAABAAIAICAAAAEAGACoDAAAJgAAADAwAAABABgAqBwAAM4MAAAoAAAAIAAAAEAAAAABABgAAAAAAAAM + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAA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A8AAAAAADAADwAAAAAAEAAIAAAAAAgQAAgAAAAADDAACAAAAAAf8AAIAAAAAB/wAAgAAAAAP/ + AACAAAAAA/8AAIAAAAAH/wAAwAAAAA//AADAAAAAH/8AAMAAAAA//wAA4DgAAP//AADgfAAB//8AAPD/ + gA///wAA////////AAD///////8AAP///////wAA////////AAD///////8AAP///////wAA + + + \ No newline at end of file diff --git a/NI-VISA/Examples/.NET/FindResources/ReadMe.txt b/NI-VISA/Examples/.NET/FindResources/ReadMe.txt new file mode 100644 index 0000000..3af40fe --- /dev/null +++ b/NI-VISA/Examples/.NET/FindResources/ReadMe.txt @@ -0,0 +1,13 @@ +Example Title: Find Resources + +Category: NI-VISA + +Description: This example demonstrates how to use the NI-VISA .NET + API to find all of the available resources on the system. + In the example, you select between several filters to narrow the list. + +Language: Visual C# + +Required Software: NI-VISA and drivers for resources such as GPIB + +Required Hardware: Any NI-VISA resource such as GPIB, Serial, or PXI diff --git a/NI-VISA/Examples/.NET/RegisterBasedOperations/App.ico b/NI-VISA/Examples/.NET/RegisterBasedOperations/App.ico new file mode 100644 index 0000000000000000000000000000000000000000..403417b99a7dd62aa99bc6f189e7fce84ebff1fd GIT binary patch literal 10614 zcmeHM2T)sCmQ`<8P48~cOizz(GKic(NC*@NA|oUaIS7%H$Vo&Ygdze25-P1ig-Lt#3-Mce2UNP?Rb~*P-H@W|P`~Q>y9 zi;4*}&xrxi(_zdkXhEVWG1wrHV8vx;{w*tMsjmpeYBuCz4u&WLRhUOx4ZGqZS!eQZ zkDI%>p2N+-!iwM!w4R`f@>j6rrg)OWfnDX$)AgeDG2&$*c5^J}#w`74y!d3AHc=P6 z&=v9IfICp-lM!i2jCTJ?6mj8p6}g6eRIkb$VqSVmPK57-ApYuP=51-o!AQnGiqQ9hm?eS7Ybq^WVGC$;1UJ_azGauRu@XlG|Ke# z{4>M+zP>TPHC}dYuKah`MUu|E&kwujdlF^szVr2{feMGbc$>GzCx+X0SGbAFQXI95 zLCU4tiXO3;BvW;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Q=0o)GC-4cDMpDl!nj3WQb}STh~x_CN2EcrU2G zgBB?qIn$Os))2MON&N1f_;ikYZJhCkM^ndBj2;&5(MIK?tK7jl?>Z`il4=_6trX^K z_A=2sdZaUl7va(Sl_2Hue{8%0S>PYt1 zVEPCzaHJ-*GT$L9!Z_Gn5$B*;TT$>rgr92eZ{MwEkJoS}Mnr3GxHl!<2j_0!?yP`z zynwd9M_yfu-h_v(j=s%$R-|XBz=l?OD>pQpqg6F!I<@WhH j&hdO*=Xk!(`*6A3bEG`W!?#aq=LOE6kjL|c0|5UGOq~>W literal 0 HcmV?d00001 diff --git a/NI-VISA/Examples/.NET/RegisterBasedOperations/AssemblyInfo.cs b/NI-VISA/Examples/.NET/RegisterBasedOperations/AssemblyInfo.cs new file mode 100644 index 0000000..9f89a32 --- /dev/null +++ b/NI-VISA/Examples/.NET/RegisterBasedOperations/AssemblyInfo.cs @@ -0,0 +1,58 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly: AssemblyTitle("")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly: AssemblyVersion("1.0.*")] + +// +// In order to sign your assembly you must specify a key to use. Refer to the +// Microsoft .NET Framework documentation for more information on assembly signing. +// +// Use the attributes below to control which key is used for signing. +// +// Notes: +// (*) If no key is specified, the assembly is not signed. +// (*) KeyName refers to a key that has been installed in the Crypto Service +// Provider (CSP) on your machine. KeyFile refers to a file which contains +// a key. +// (*) If the KeyFile and the KeyName values are both specified, the +// following processing occurs: +// (1) If the KeyName can be found in the CSP, that key is used. +// (2) If the KeyName does not exist and the KeyFile does exist, the key +// in the KeyFile is installed into the CSP and used. +// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. +// When specifying the KeyFile, the location of the KeyFile should be +// relative to the project output directory which is +// %Project Directory%\obj\. For example, if your KeyFile is +// located in the project directory, you would specify the AssemblyKeyFile +// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] +// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework +// documentation for more information on this. +// +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] +[assembly: AssemblyKeyName("")] diff --git a/NI-VISA/Examples/.NET/RegisterBasedOperations/MainForm.cs b/NI-VISA/Examples/.NET/RegisterBasedOperations/MainForm.cs new file mode 100644 index 0000000..20824f4 --- /dev/null +++ b/NI-VISA/Examples/.NET/RegisterBasedOperations/MainForm.cs @@ -0,0 +1,573 @@ +//================================================================================================== +// +// Title : MainForm.cs +// Purpose : This application illustrates how to use In/Out/MoveIn/MoveOut on register-based +// sessions. +// +//================================================================================================== + +using System; +using System.Windows.Forms; +using Ivi.Visa; +using NationalInstruments.Visa; + +namespace NationalInstruments.Examples.RegisterBasedOperations +{ + ///

+ /// Summary description for Form1. + /// + public class MainForm : System.Windows.Forms.Form + { + private PxiSession pxiSession; + private System.Windows.Forms.Button closeButton; + private System.Windows.Forms.Button openButton; + private System.Windows.Forms.NumericUpDown[] numOutputArray; + private System.Windows.Forms.Label resourceNameLabel; + private System.Windows.Forms.ComboBox resourceNameComboBox; + private System.Windows.Forms.Label resultLabel; + private System.Windows.Forms.TextBox resultTextBox; + private System.Windows.Forms.Button clearButton; + private System.Windows.Forms.Button moveInButton; + private System.Windows.Forms.Button inButton; + private System.Windows.Forms.Label spaceLabel; + private System.Windows.Forms.Label offsetLabel; + private System.Windows.Forms.Label widthLabel; + private System.Windows.Forms.ComboBox spaceComboBox; + private System.Windows.Forms.NumericUpDown offsetNumericUpDown; + private System.Windows.Forms.ComboBox widthComboBox; + private System.Windows.Forms.NumericUpDown numElementsNumericUpDown; + private System.Windows.Forms.Label numElementsLabel; + /// + /// Required designer variable. + /// + private System.ComponentModel.Container components = null; + + public MainForm() + { + // + // Required for Windows Form Designer support + // + InitializeComponent(); + SetupUI(false); + PopulateComboBoxes(); + } + + /// + /// Clean up any resources being used. + /// + protected override void Dispose( bool disposing ) + { + if( disposing ) + { + if (components != null) + { + components.Dispose(); + } + if (pxiSession != null) + { + pxiSession.Dispose(); + } + } + base.Dispose( disposing ); + } + + #region Windows Form Designer generated code + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); + this.resourceNameLabel = new System.Windows.Forms.Label(); + this.offsetNumericUpDown = new System.Windows.Forms.NumericUpDown(); + this.numElementsNumericUpDown = new System.Windows.Forms.NumericUpDown(); + this.offsetLabel = new System.Windows.Forms.Label(); + this.numElementsLabel = new System.Windows.Forms.Label(); + this.moveInButton = new System.Windows.Forms.Button(); + this.inButton = new System.Windows.Forms.Button(); + this.resultTextBox = new System.Windows.Forms.TextBox(); + this.resultLabel = new System.Windows.Forms.Label(); + this.clearButton = new System.Windows.Forms.Button(); + this.spaceComboBox = new System.Windows.Forms.ComboBox(); + this.spaceLabel = new System.Windows.Forms.Label(); + this.widthLabel = new System.Windows.Forms.Label(); + this.widthComboBox = new System.Windows.Forms.ComboBox(); + this.resourceNameComboBox = new System.Windows.Forms.ComboBox(); + this.closeButton = new System.Windows.Forms.Button(); + this.openButton = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.offsetNumericUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numElementsNumericUpDown)).BeginInit(); + this.SuspendLayout(); + // + // resourceNameLabel + // + this.resourceNameLabel.Location = new System.Drawing.Point(20, 8); + this.resourceNameLabel.Name = "resourceNameLabel"; + this.resourceNameLabel.Size = new System.Drawing.Size(96, 16); + this.resourceNameLabel.TabIndex = 0; + this.resourceNameLabel.Text = "Resource Name:"; + // + // offsetNumericUpDown + // + this.offsetNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.offsetNumericUpDown.Hexadecimal = true; + this.offsetNumericUpDown.Location = new System.Drawing.Point(20, 169); + this.offsetNumericUpDown.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.offsetNumericUpDown.Name = "offsetNumericUpDown"; + this.offsetNumericUpDown.Size = new System.Drawing.Size(137, 20); + this.offsetNumericUpDown.TabIndex = 8; + // + // numElementsNumericUpDown + // + this.numElementsNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.numElementsNumericUpDown.Location = new System.Drawing.Point(174, 169); + this.numElementsNumericUpDown.Name = "numElementsNumericUpDown"; + this.numElementsNumericUpDown.Size = new System.Drawing.Size(137, 20); + this.numElementsNumericUpDown.TabIndex = 8; + this.numElementsNumericUpDown.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // offsetLabel + // + this.offsetLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.offsetLabel.Location = new System.Drawing.Point(21, 150); + this.offsetLabel.Name = "offsetLabel"; + this.offsetLabel.Size = new System.Drawing.Size(72, 16); + this.offsetLabel.TabIndex = 9; + this.offsetLabel.Text = "Offset:"; + // + // numElementsLabel + // + this.numElementsLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.numElementsLabel.Location = new System.Drawing.Point(171, 150); + this.numElementsLabel.Name = "numElementsLabel"; + this.numElementsLabel.Size = new System.Drawing.Size(112, 16); + this.numElementsLabel.TabIndex = 10; + this.numElementsLabel.Text = "Number of Elements:"; + // + // moveInButton + // + this.moveInButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.moveInButton.Location = new System.Drawing.Point(172, 219); + this.moveInButton.Name = "moveInButton"; + this.moveInButton.Size = new System.Drawing.Size(139, 24); + this.moveInButton.TabIndex = 11; + this.moveInButton.Text = "Move In"; + this.moveInButton.Click += new System.EventHandler(this.moveInButton_Click); + // + // inButton + // + this.inButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.inButton.Location = new System.Drawing.Point(20, 219); + this.inButton.Name = "inButton"; + this.inButton.Size = new System.Drawing.Size(128, 24); + this.inButton.TabIndex = 13; + this.inButton.Text = "In"; + this.inButton.Click += new System.EventHandler(this.inButton_Click); + // + // resultTextBox + // + this.resultTextBox.AcceptsReturn = true; + this.resultTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.resultTextBox.Location = new System.Drawing.Point(23, 276); + this.resultTextBox.Multiline = true; + this.resultTextBox.Name = "resultTextBox"; + this.resultTextBox.ReadOnly = true; + this.resultTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.resultTextBox.Size = new System.Drawing.Size(292, 242); + this.resultTextBox.TabIndex = 17; + // + // resultLabel + // + this.resultLabel.Location = new System.Drawing.Point(20, 257); + this.resultLabel.Name = "resultLabel"; + this.resultLabel.Size = new System.Drawing.Size(64, 16); + this.resultLabel.TabIndex = 18; + this.resultLabel.Text = "Result:"; + // + // clearButton + // + this.clearButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.clearButton.Location = new System.Drawing.Point(235, 522); + this.clearButton.Name = "clearButton"; + this.clearButton.Size = new System.Drawing.Size(80, 24); + this.clearButton.TabIndex = 24; + this.clearButton.Text = "Clear"; + this.clearButton.Click += new System.EventHandler(this.clearButton_Click); + // + // spaceComboBox + // + this.spaceComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.spaceComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.spaceComboBox.Location = new System.Drawing.Point(20, 121); + this.spaceComboBox.Name = "spaceComboBox"; + this.spaceComboBox.Size = new System.Drawing.Size(137, 21); + this.spaceComboBox.TabIndex = 25; + // + // spaceLabel + // + this.spaceLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.spaceLabel.Location = new System.Drawing.Point(20, 104); + this.spaceLabel.Name = "spaceLabel"; + this.spaceLabel.Size = new System.Drawing.Size(52, 14); + this.spaceLabel.TabIndex = 26; + this.spaceLabel.Text = "Space:"; + // + // widthLabel + // + this.widthLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.widthLabel.Location = new System.Drawing.Point(171, 104); + this.widthLabel.Name = "widthLabel"; + this.widthLabel.Size = new System.Drawing.Size(40, 16); + this.widthLabel.TabIndex = 27; + this.widthLabel.Text = "Width:"; + // + // widthComboBox + // + this.widthComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.widthComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.widthComboBox.Location = new System.Drawing.Point(174, 121); + this.widthComboBox.Name = "widthComboBox"; + this.widthComboBox.Size = new System.Drawing.Size(137, 21); + this.widthComboBox.TabIndex = 28; + // + // resourceNameComboBox + // + this.resourceNameComboBox.FormattingEnabled = true; + this.resourceNameComboBox.Location = new System.Drawing.Point(20, 24); + this.resourceNameComboBox.Name = "resourceNameComboBox"; + this.resourceNameComboBox.Size = new System.Drawing.Size(291, 21); + this.resourceNameComboBox.TabIndex = 29; + // + // closeButton + // + this.closeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.closeButton.Location = new System.Drawing.Point(173, 55); + this.closeButton.Name = "closeButton"; + this.closeButton.Size = new System.Drawing.Size(137, 24); + this.closeButton.TabIndex = 30; + this.closeButton.Text = "Close Session"; + this.closeButton.Click += new System.EventHandler(this.closeButton_Click); + // + // openButton + // + this.openButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.openButton.Location = new System.Drawing.Point(20, 55); + this.openButton.Name = "openButton"; + this.openButton.Size = new System.Drawing.Size(137, 24); + this.openButton.TabIndex = 30; + this.openButton.Text = "Open Session"; + this.openButton.Click += new System.EventHandler(this.openButton_Click); + // + // MainForm + // + this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); + this.ClientSize = new System.Drawing.Size(327, 558); + this.Controls.Add(this.openButton); + this.Controls.Add(this.closeButton); + this.Controls.Add(this.resourceNameComboBox); + this.Controls.Add(this.widthComboBox); + this.Controls.Add(this.widthLabel); + this.Controls.Add(this.spaceLabel); + this.Controls.Add(this.spaceComboBox); + this.Controls.Add(this.clearButton); + this.Controls.Add(this.resultLabel); + this.Controls.Add(this.resultTextBox); + this.Controls.Add(this.inButton); + this.Controls.Add(this.moveInButton); + this.Controls.Add(this.numElementsLabel); + this.Controls.Add(this.offsetLabel); + this.Controls.Add(this.offsetNumericUpDown); + this.Controls.Add(this.resourceNameLabel); + this.Controls.Add(this.numElementsNumericUpDown); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MaximizeBox = false; + this.MinimumSize = new System.Drawing.Size(300, 440); + this.Name = "MainForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Register-Based Operations"; + ((System.ComponentModel.ISupportInitialize)(this.offsetNumericUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numElementsNumericUpDown)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + #endregion + + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.Run(new MainForm()); + } + + private void openButton_Click(object sender, System.EventArgs e) + { + if(pxiSession != null) + { + pxiSession.Dispose(); + } + + try + { + using (var rmSession = new ResourceManager()) + { + pxiSession = (PxiSession)rmSession.Open(resourceNameComboBox.Text); + SetupUI(true); + } + } + catch(Exception exp) + { + MessageBox.Show(exp.Message); + } + } + + private void closeButton_Click(object sender, System.EventArgs e) + { + try + { + if(pxiSession != null) + { + pxiSession.Dispose(); + SetupUI(false); + } + } + catch(Exception ex) + { + MessageBox.Show(ex.Message); + } + } + + private void clearButton_Click(object sender, System.EventArgs e) + { + resultTextBox.Clear(); + } + + // Performs an "InXX" operation + private void inButton_Click(object sender, System.EventArgs e) + { + try + { + AddressSpace space = (AddressSpace)spaceComboBox.SelectedItem; + int offset = (int)offsetNumericUpDown.Value; + DataWidth width = (DataWidth)widthComboBox.SelectedItem; + + switch (width) + { + case DataWidth.Width8: + resultTextBox.AppendText(GetOperationText("In8")); + byte data8 = pxiSession.In8(space, offset); + resultTextBox.AppendText(GetDataText(data8.ToString("x"))); + break; + + case DataWidth.Width16: + resultTextBox.AppendText(GetOperationText("In16")); + short data16 = pxiSession.In16(space, offset); + resultTextBox.AppendText(GetDataText(data16.ToString("x"))); + break; + + case DataWidth.Width32: + resultTextBox.AppendText(GetOperationText("In32")); + int data32 = pxiSession.In32(space, offset); + resultTextBox.AppendText(GetDataText(data32.ToString("x"))); + break; + + case DataWidth.Width64: + resultTextBox.AppendText(GetOperationText("In64")); + long data64 = pxiSession.In64(space, offset); + resultTextBox.AppendText(GetDataText(data64.ToString("x"))); + break; + } + } + catch (Exception ex) + { + resultTextBox.AppendText(GetOperationText(ex.Message)); + } + ScrollToBottomOfResultTextBox(); + } + + // Perform a "MoveInXX" operation. + private void moveInButton_Click(object sender, System.EventArgs e) + { + try + { + AddressSpace space = (AddressSpace)spaceComboBox.SelectedItem; + int offset = (int)offsetNumericUpDown.Value; + DataWidth width = (DataWidth)widthComboBox.SelectedItem; + int length = (int)numElementsNumericUpDown.Value; + + switch (width) + { + case DataWidth.Width8: + resultTextBox.AppendText(GetOperationText("MoveIn8")); + byte[] data8 = pxiSession.MoveIn8(space, offset, length); + ShowArray(data8); + break; + + case DataWidth.Width16: + resultTextBox.AppendText(GetOperationText("MoveIn16")); + short[] data16 = pxiSession.MoveIn16(space, offset, length); + ShowArray(data16); + break; + + case DataWidth.Width32: + resultTextBox.AppendText(GetOperationText("MoveIn32")); + int[] data32 = pxiSession.MoveIn32(space, offset, length); + ShowArray(data32); + break; + + case DataWidth.Width64: + resultTextBox.AppendText(GetOperationText("MoveIn64")); + long[] data64 = pxiSession.MoveIn64(space, offset, length); + ShowArray(data64); + break; + } + } + catch(Exception ex) + { + resultTextBox.AppendText(GetOperationText(ex.Message)); + } + ScrollToBottomOfResultTextBox(); + } + + private void PopulateComboBoxes() + { + try + { + // This example uses an instance of the NationalInstruments.Visa.ResourceManager class to find resources on the system. + // Alternatively, static methods provided by the Ivi.Visa.ResourceManager class may be used when an application + // requires additional VISA .NET implementations. + using (var rmSession = new ResourceManager()) + { + var pxiResources = rmSession.Find("PXI?*INSTR"); + foreach (var resource in pxiResources) + { + resourceNameComboBox.Items.Add(resource); + } + // Add PXI specific address spaces only + for (AddressSpace space = AddressSpace.PxiConfiguration; space <= AddressSpace.PxiBar5; ++space) + { + spaceComboBox.Items.Add(space); + } + spaceComboBox.SelectedIndex = 0; + + foreach (DataWidth width in Enum.GetValues(typeof(DataWidth))) + { + widthComboBox.Items.Add(width); + } + widthComboBox.SelectedIndex = 0; + } + } + catch (Exception) + { + resourceNameComboBox.Items.Add("No PXI Resource found on the system"); + resourceNameComboBox.Enabled = false; + openButton.Enabled = false; + } + resourceNameComboBox.SelectedIndex = 0; + } + + private void SetupUI(bool sessionActive) + { + resourceNameComboBox.Enabled = !sessionActive; + openButton.Enabled = !sessionActive; + closeButton.Enabled = sessionActive; + moveInButton.Enabled = sessionActive; + inButton.Enabled = sessionActive; + spaceLabel.Enabled = sessionActive; + spaceComboBox.Enabled = sessionActive; + widthLabel.Enabled = sessionActive; + widthComboBox.Enabled = sessionActive; + offsetLabel.Enabled = sessionActive; + offsetNumericUpDown.Enabled = sessionActive; + numElementsLabel.Enabled = sessionActive; + numElementsNumericUpDown.Enabled = sessionActive; + } + + private void ScrollToBottomOfResultTextBox() + { + resultTextBox.SelectAll(); + } + + private string GetOperationText(string operation) + { + return operation + Environment.NewLine; + } + + private string GetDataText(string data) + { + return (string.Format("Data = {0}", data) + Environment.NewLine); + } + + private void ShowArray(Array data) + { + int i=0; + foreach(object o in data) + { + string formattedValue = string.Empty; + if(o is byte) + { + formattedValue = ((byte)o).ToString("x"); + } + else if(o is short) + { + formattedValue = ((short)o).ToString("x"); + } + else if(o is int) + { + formattedValue = ((int)o).ToString("x"); + } + else if (o is long) + { + formattedValue = ((long)o).ToString("x"); + } + resultTextBox.AppendText(string.Format("Data({0} = {1})", i++, formattedValue) + Environment.NewLine); + } + } + + private byte[] BuildByteOutputdata() + { + int numElements = (int)numElementsNumericUpDown.Value; + byte[] od = new byte[numElements]; + for (int i = 0; i + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAIAICAAAAEAGACoDAAAJgAAADAwAAABABgAqBwA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AAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////AAD///////8AAP///////wAA//////// + AAD///////8AAP///////wAA//8AB///AAD//AAB//8AAP/wAAB//wAA/+AAAD//AAD/wAAAH/8AAP+A + AAAP/wAA/wAAAAf/AAD+AAAAA/8AAP4AAAAD/wAA/AAAAAH/AAD8AAAAAf8AAPgAAAAA/wAA+AAAAAD/ + AAD4AAAAAP8AAPgAAAAAfwAA+AAAAAB/AADwAAAAAH8AAPAAAAAAfwAA8AAAAAB/AADwAAAAAD8AAPAA + AAAABwAA8AAAAAADAADwAAAAAAEAAIAAAAAAgQAAgAAAAADDAACAAAAAAf8AAIAAAAAB/wAAgAAAAAP/ + AACAAAAAA/8AAIAAAAAH/wAAwAAAAA//AADAAAAAH/8AAMAAAAA//wAA4DgAAP//AADgfAAB//8AAPD/ + gA///wAA////////AAD///////8AAP///////wAA////////AAD///////8AAP///////wAA + + + \ No newline at end of file diff --git a/NI-VISA/Examples/.NET/RegisterBasedOperations/ReadMe.txt b/NI-VISA/Examples/.NET/RegisterBasedOperations/ReadMe.txt new file mode 100644 index 0000000..d536ab0 --- /dev/null +++ b/NI-VISA/Examples/.NET/RegisterBasedOperations/ReadMe.txt @@ -0,0 +1,11 @@ +Example Title: Register Based Operations + +Category: NI-VISA + +Description: This example demonstrates how to use In/MoveIn on a PXI session. + +Language: Visual C# + +Required Software: NI-VISA + +Required Hardware: A PXI Instrument diff --git a/NI-VISA/Examples/.NET/RegisterBasedOperations/RegisterBasedOperations.2010.csproj b/NI-VISA/Examples/.NET/RegisterBasedOperations/RegisterBasedOperations.2010.csproj new file mode 100644 index 0000000..7a18f3a --- /dev/null +++ b/NI-VISA/Examples/.NET/RegisterBasedOperations/RegisterBasedOperations.2010.csproj @@ -0,0 +1,117 @@ + + + + Local + 10.0.21006.1 + 2.0 + {C1F69FAC-3E15-40A2-8F02-8D64B0DE1488} + Debug + AnyCPU + App.ico + + + RegisterBasedOperations + + + JScript + Grid + IE50 + false + WinExe + NationalInstruments.Examples.RegisterBasedOperations + OnBuildSuccess + + + + + v4.0 + + + bin\Debug\ + false + 285212672 + false + + + DEBUG;TRACE;NETFX3_5;NETFX2_0;NETFX4_0 + + + true + 4096 + false + + + false + false + false + false + 4 + AnyCPU + + + bin\Release\ + false + 285212672 + false + + + TRACE;NETFX3_5;NETFX2_0;NETFX4_0 + + + false + 4096 + false + + + true + false + false + false + 4 + AnyCPU + + + + + + System + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.dll + + + System.Data + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Data.dll + + + System.Drawing + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Drawing.dll + + + System.Windows.Forms + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll + + + System.XML + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll + + + + + + Code + + + Form + + + MainForm.cs + + + + + + + + + + + \ No newline at end of file diff --git a/NI-VISA/Examples/.NET/RegisterBasedOperations/RegisterBasedOperations.2010.sln b/NI-VISA/Examples/.NET/RegisterBasedOperations/RegisterBasedOperations.2010.sln new file mode 100644 index 0000000..8fc8216 --- /dev/null +++ b/NI-VISA/Examples/.NET/RegisterBasedOperations/RegisterBasedOperations.2010.sln @@ -0,0 +1,19 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RegisterBasedOperations", "RegisterBasedOperations.2010.csproj", "{C1F69FAC-3E15-40A2-8F02-8D64B0DE1488}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C1F69FAC-3E15-40A2-8F02-8D64B0DE1488}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C1F69FAC-3E15-40A2-8F02-8D64B0DE1488}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C1F69FAC-3E15-40A2-8F02-8D64B0DE1488}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C1F69FAC-3E15-40A2-8F02-8D64B0DE1488}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/NI-VISA/Examples/.NET/RegisterBasedOperations/RegisterBasedOperations.2012.csproj b/NI-VISA/Examples/.NET/RegisterBasedOperations/RegisterBasedOperations.2012.csproj new file mode 100644 index 0000000..d7f24a9 --- /dev/null +++ b/NI-VISA/Examples/.NET/RegisterBasedOperations/RegisterBasedOperations.2012.csproj @@ -0,0 +1,119 @@ + + + + Local + 11.0.50522.1 RCREL + 2.0 + {C1F69FAC-3E15-40A2-8F02-8D64B0DE1488} + Debug + AnyCPU + App.ico + + + RegisterBasedOperations + + + JScript + Grid + IE50 + false + WinExe + NationalInstruments.Examples.RegisterBasedOperations + OnBuildSuccess + + + + + v4.5 + + + bin\Debug\ + false + 285212672 + false + + + DEBUG;TRACE;NETFX3_5;NETFX2_0;NETFX4_0;NETFX4_5 + + + true + 4096 + false + + + false + false + false + false + 4 + AnyCPU + false + + + bin\Release\ + false + 285212672 + false + + + TRACE;NETFX3_5;NETFX2_0;NETFX4_0;NETFX4_5 + + + false + 4096 + false + + + true + false + false + false + 4 + AnyCPU + false + + + + + + System + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.dll + + + System.Data + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Data.dll + + + System.Drawing + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Drawing.dll + + + System.Windows.Forms + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll + + + System.XML + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll + + + + + + Code + + + Form + + + MainForm.cs + + + + + + + + + + + \ No newline at end of file diff --git a/NI-VISA/Examples/.NET/RegisterBasedOperations/RegisterBasedOperations.2012.sln b/NI-VISA/Examples/.NET/RegisterBasedOperations/RegisterBasedOperations.2012.sln new file mode 100644 index 0000000..d6d5a21 --- /dev/null +++ b/NI-VISA/Examples/.NET/RegisterBasedOperations/RegisterBasedOperations.2012.sln @@ -0,0 +1,19 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RegisterBasedOperations", "RegisterBasedOperations.2012.csproj", "{C1F69FAC-3E15-40A2-8F02-8D64B0DE1488}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C1F69FAC-3E15-40A2-8F02-8D64B0DE1488}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C1F69FAC-3E15-40A2-8F02-8D64B0DE1488}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C1F69FAC-3E15-40A2-8F02-8D64B0DE1488}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C1F69FAC-3E15-40A2-8F02-8D64B0DE1488}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/NI-VISA/Examples/.NET/ServiceRequest/App.ico b/NI-VISA/Examples/.NET/ServiceRequest/App.ico new file mode 100644 index 0000000000000000000000000000000000000000..403417b99a7dd62aa99bc6f189e7fce84ebff1fd GIT binary patch literal 10614 zcmeHM2T)sCmQ`<8P48~cOizz(GKic(NC*@NA|oUaIS7%H$Vo&Ygdze25-P1ig-Lt#3-Mce2UNP?Rb~*P-H@W|P`~Q>y9 zi;4*}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W!1P5I;xWe^LPHFo?HAn8PEMpaxX%kVxd7*|0FmvBJsQL{uA$20oCL{G-;Q9 zW{XEV9V`@&)pzDh#a}iiN&e!;i1xY#9huw&|w@|NIXqUA16qEgD3T z1=fha^m83Yu%5Urak)Qcx*qq`hYl z#p%m!{<22&WUZaJ8rjaWY$!&?dg>4Z9ezyr)^T&C#9o&HxkT6gINkVCJ_5+MR%aL} zdgP{%D`+`bJB4ZrM#K%eKFxe|rCMIczq3qxyjwHV8oxSN@Wnyb*>>AZN7l`i%I_ZZ zEf2)?Rym7m?3zoh>FFSx?FDuL@vQ=0o)GC-4cDMpDl!nj3WQb}STh~x_CN2EcrU2G zgBB?qIn$Os))2MON&N1f_;ikYZJhCkM^ndBj2;&5(MIK?tK7jl?>Z`il4=_6trX^K z_A=2sdZaUl7va(Sl_2Hue{8%0S>PYt1 zVEPCzaHJ-*GT$L9!Z_Gn5$B*;TT$>rgr92eZ{MwEkJoS}Mnr3GxHl!<2j_0!?yP`z zynwd9M_yfu-h_v(j=s%$R-|XBz=l?OD>pQpqg6F!I<@WhH j&hdO*=Xk!(`*6A3bEG`W!?#aq=LOE6kjL|c0|5UGOq~>W literal 0 HcmV?d00001 diff --git a/NI-VISA/Examples/.NET/ServiceRequest/AssemblyInfo.cs b/NI-VISA/Examples/.NET/ServiceRequest/AssemblyInfo.cs new file mode 100644 index 0000000..9f89a32 --- /dev/null +++ b/NI-VISA/Examples/.NET/ServiceRequest/AssemblyInfo.cs @@ -0,0 +1,58 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly: AssemblyTitle("")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly: AssemblyVersion("1.0.*")] + +// +// In order to sign your assembly you must specify a key to use. Refer to the +// Microsoft .NET Framework documentation for more information on assembly signing. +// +// Use the attributes below to control which key is used for signing. +// +// Notes: +// (*) If no key is specified, the assembly is not signed. +// (*) KeyName refers to a key that has been installed in the Crypto Service +// Provider (CSP) on your machine. KeyFile refers to a file which contains +// a key. +// (*) If the KeyFile and the KeyName values are both specified, the +// following processing occurs: +// (1) If the KeyName can be found in the CSP, that key is used. +// (2) If the KeyName does not exist and the KeyFile does exist, the key +// in the KeyFile is installed into the CSP and used. +// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. +// When specifying the KeyFile, the location of the KeyFile should be +// relative to the project output directory which is +// %Project Directory%\obj\. For example, if your KeyFile is +// located in the project directory, you would specify the AssemblyKeyFile +// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] +// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework +// documentation for more information on this. +// +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] +[assembly: AssemblyKeyName("")] diff --git a/NI-VISA/Examples/.NET/ServiceRequest/MainForm.cs b/NI-VISA/Examples/.NET/ServiceRequest/MainForm.cs new file mode 100644 index 0000000..2cb1552 --- /dev/null +++ b/NI-VISA/Examples/.NET/ServiceRequest/MainForm.cs @@ -0,0 +1,457 @@ +//================================================================================================== +// +// Title : MainForm.cs +// Purpose : This application illustrates how to use the service request event and +// the service request status byte to determine when generated data is ready +// and how to read it. +// +//================================================================================================== + +using System; +using System.Windows.Forms; +using Ivi.Visa; +using NationalInstruments.Visa; + +namespace NationalInstruments.Examples.ServiceRequest +{ + ///

+ /// Summary description for Form1. + /// + public class MainForm : System.Windows.Forms.Form + { + private IMessageBasedSession mbSession; + private System.Windows.Forms.ToolTip toolTip; + private System.Windows.Forms.Label selectResourceLabel; + private System.Windows.Forms.GroupBox configuringGroupBox; + private System.Windows.Forms.GroupBox writingGroupBox; + private System.Windows.Forms.GroupBox readingGroupBox; + private System.Windows.Forms.Button clearButton; + private System.Windows.Forms.Label resourceNameLabel; + private System.Windows.Forms.Button openButton; + private System.Windows.Forms.Button closeButton; + private System.Windows.Forms.TextBox commandTextBox; + private System.Windows.Forms.Label commandLabel; + private System.Windows.Forms.Button enableSRQButton; + private System.Windows.Forms.TextBox writeTextBox; + private System.Windows.Forms.Button writeButton; + private System.Windows.Forms.TextBox readTextBox; + private System.Windows.Forms.ComboBox resourceNameComboBox; + private System.ComponentModel.IContainer components; + + public MainForm() + { + // + // Required for Windows Form Designer support + // + InitializeComponent(); + InitializeUI(); + toolTip.SetToolTip(enableSRQButton, "Enable the instrument's SRQ event on MAV by sending the following command (varies by instrument):"); + toolTip.SetToolTip(writeButton, "Send string to device"); + toolTip.SetToolTip(closeButton, "Causes the control to release its handle to the device"); + toolTip.SetToolTip(openButton, "The resource name of the device is set and the control attempts to connect to the device"); + + try + { + // This example uses an instance of the NationalInstruments.Visa.ResourceManager class to find resources on the system. + // Alternatively, static methods provided by the Ivi.Visa.ResourceManager class may be used when an application + // requires additional VISA .NET implementations. + using (var rmSession = new ResourceManager()) + { + var validResources = rmSession.Find("(GPIB|TCPIP|USB)?*INSTR"); + foreach (var resource in validResources) + { + resourceNameComboBox.Items.Add(resource); + } + } + } + catch (Exception) + { + resourceNameComboBox.Items.Add("No 488.2 INSTR resource found on the system"); + updateResourceNameControls(false); + closeButton.Enabled = false; + } + resourceNameComboBox.SelectedIndex = 0; + } + + /// + /// Clean up any resources being used. + /// + protected override void Dispose( bool disposing ) + { + if( disposing ) + { + if (components != null) + { + components.Dispose(); + } + if (mbSession != null) + { + mbSession.Dispose(); + } + } + base.Dispose( disposing ); + } + + #region Windows Form Designer generated code + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); + this.resourceNameLabel = new System.Windows.Forms.Label(); + this.openButton = new System.Windows.Forms.Button(); + this.closeButton = new System.Windows.Forms.Button(); + this.commandLabel = new System.Windows.Forms.Label(); + this.commandTextBox = new System.Windows.Forms.TextBox(); + this.enableSRQButton = new System.Windows.Forms.Button(); + this.configuringGroupBox = new System.Windows.Forms.GroupBox(); + this.resourceNameComboBox = new System.Windows.Forms.ComboBox(); + this.selectResourceLabel = new System.Windows.Forms.Label(); + this.writingGroupBox = new System.Windows.Forms.GroupBox(); + this.writeTextBox = new System.Windows.Forms.TextBox(); + this.writeButton = new System.Windows.Forms.Button(); + this.readingGroupBox = new System.Windows.Forms.GroupBox(); + this.clearButton = new System.Windows.Forms.Button(); + this.readTextBox = new System.Windows.Forms.TextBox(); + this.toolTip = new System.Windows.Forms.ToolTip(this.components); + this.configuringGroupBox.SuspendLayout(); + this.writingGroupBox.SuspendLayout(); + this.readingGroupBox.SuspendLayout(); + this.SuspendLayout(); + // + // resourceNameLabel + // + this.resourceNameLabel.Location = new System.Drawing.Point(16, 80); + this.resourceNameLabel.Name = "resourceNameLabel"; + this.resourceNameLabel.Size = new System.Drawing.Size(112, 16); + this.resourceNameLabel.TabIndex = 1; + this.resourceNameLabel.Text = "Resource Name:"; + // + // openButton + // + this.openButton.Location = new System.Drawing.Point(16, 128); + this.openButton.Name = "openButton"; + this.openButton.Size = new System.Drawing.Size(104, 23); + this.openButton.TabIndex = 2; + this.openButton.Text = "Open Session"; + this.openButton.Click += new System.EventHandler(this.openButton_Click); + // + // closeButton + // + this.closeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.closeButton.Location = new System.Drawing.Point(160, 64); + this.closeButton.Name = "closeButton"; + this.closeButton.Size = new System.Drawing.Size(104, 23); + this.closeButton.TabIndex = 3; + this.closeButton.Text = "Close Session"; + this.closeButton.Click += new System.EventHandler(this.closeButton_Click); + // + // commandLabel + // + this.commandLabel.Location = new System.Drawing.Point(16, 160); + this.commandLabel.Name = "commandLabel"; + this.commandLabel.Size = new System.Drawing.Size(256, 32); + this.commandLabel.TabIndex = 4; + this.commandLabel.Text = "Type the command to enable the instrument\'s SRQ event on MAV:"; + // + // commandTextBox + // + this.commandTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.commandTextBox.Location = new System.Drawing.Point(16, 200); + this.commandTextBox.Name = "commandTextBox"; + this.commandTextBox.Size = new System.Drawing.Size(152, 20); + this.commandTextBox.TabIndex = 5; + this.commandTextBox.Text = "*SRE 16"; + // + // enableSRQButton + // + this.enableSRQButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.enableSRQButton.Location = new System.Drawing.Point(168, 200); + this.enableSRQButton.Name = "enableSRQButton"; + this.enableSRQButton.Size = new System.Drawing.Size(104, 24); + this.enableSRQButton.TabIndex = 6; + this.enableSRQButton.Text = "Enable SRQ"; + this.enableSRQButton.Click += new System.EventHandler(this.enableSRQButton_Click); + // + // configuringGroupBox + // + this.configuringGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.configuringGroupBox.Controls.Add(this.resourceNameComboBox); + this.configuringGroupBox.Controls.Add(this.closeButton); + this.configuringGroupBox.Location = new System.Drawing.Point(8, 64); + this.configuringGroupBox.Name = "configuringGroupBox"; + this.configuringGroupBox.Size = new System.Drawing.Size(272, 168); + this.configuringGroupBox.TabIndex = 7; + this.configuringGroupBox.TabStop = false; + this.configuringGroupBox.Text = "Configuring"; + // + // resourceNameComboBox + // + this.resourceNameComboBox.FormattingEnabled = true; + this.resourceNameComboBox.Location = new System.Drawing.Point(11, 35); + this.resourceNameComboBox.Name = "resourceNameComboBox"; + this.resourceNameComboBox.Size = new System.Drawing.Size(255, 21); + this.resourceNameComboBox.TabIndex = 4; + // + // selectResourceLabel + // + this.selectResourceLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.selectResourceLabel.Location = new System.Drawing.Point(8, 8); + this.selectResourceLabel.Name = "selectResourceLabel"; + this.selectResourceLabel.Size = new System.Drawing.Size(272, 56); + this.selectResourceLabel.TabIndex = 8; + this.selectResourceLabel.Text = "Select the Resource Name associated with your device and press the Configure Devi" + + "ce button. Then enter the command string that enables SRQ and click the Enable S" + + "RQ button."; + // + // writingGroupBox + // + this.writingGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.writingGroupBox.Controls.Add(this.writeTextBox); + this.writingGroupBox.Controls.Add(this.writeButton); + this.writingGroupBox.Location = new System.Drawing.Point(8, 240); + this.writingGroupBox.Name = "writingGroupBox"; + this.writingGroupBox.Size = new System.Drawing.Size(272, 56); + this.writingGroupBox.TabIndex = 9; + this.writingGroupBox.TabStop = false; + this.writingGroupBox.Text = "Writing"; + // + // writeTextBox + // + this.writeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.writeTextBox.Location = new System.Drawing.Point(8, 24); + this.writeTextBox.Name = "writeTextBox"; + this.writeTextBox.Size = new System.Drawing.Size(152, 20); + this.writeTextBox.TabIndex = 2; + this.writeTextBox.Text = "*IDN?\\n"; + // + // writeButton + // + this.writeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.writeButton.Location = new System.Drawing.Point(160, 24); + this.writeButton.Name = "writeButton"; + this.writeButton.Size = new System.Drawing.Size(104, 23); + this.writeButton.TabIndex = 1; + this.writeButton.Text = "Write"; + this.writeButton.Click += new System.EventHandler(this.writeButton_Click); + // + // readingGroupBox + // + this.readingGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.readingGroupBox.Controls.Add(this.clearButton); + this.readingGroupBox.Controls.Add(this.readTextBox); + this.readingGroupBox.Location = new System.Drawing.Point(8, 312); + this.readingGroupBox.Name = "readingGroupBox"; + this.readingGroupBox.Size = new System.Drawing.Size(272, 120); + this.readingGroupBox.TabIndex = 10; + this.readingGroupBox.TabStop = false; + this.readingGroupBox.Text = "Reading"; + // + // clearButton + // + this.clearButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.clearButton.Location = new System.Drawing.Point(8, 88); + this.clearButton.Name = "clearButton"; + this.clearButton.Size = new System.Drawing.Size(104, 23); + this.clearButton.TabIndex = 1; + this.clearButton.Text = "Clear"; + this.clearButton.Click += new System.EventHandler(this.clearButton_Click); + // + // readTextBox + // + this.readTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.readTextBox.Location = new System.Drawing.Point(8, 24); + this.readTextBox.Multiline = true; + this.readTextBox.Name = "readTextBox"; + this.readTextBox.ReadOnly = true; + this.readTextBox.Size = new System.Drawing.Size(256, 56); + this.readTextBox.TabIndex = 0; + // + // MainForm + // + this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); + this.ClientSize = new System.Drawing.Size(288, 448); + this.Controls.Add(this.readingGroupBox); + this.Controls.Add(this.writingGroupBox); + this.Controls.Add(this.selectResourceLabel); + this.Controls.Add(this.enableSRQButton); + this.Controls.Add(this.commandTextBox); + this.Controls.Add(this.commandLabel); + this.Controls.Add(this.openButton); + this.Controls.Add(this.resourceNameLabel); + this.Controls.Add(this.configuringGroupBox); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MaximizeBox = false; + this.MinimumSize = new System.Drawing.Size(296, 482); + this.Name = "MainForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Service Request"; + this.configuringGroupBox.ResumeLayout(false); + this.writingGroupBox.ResumeLayout(false); + this.writingGroupBox.PerformLayout(); + this.readingGroupBox.ResumeLayout(false); + this.readingGroupBox.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + #endregion + + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.Run(new MainForm()); + } + + private void updateResourceNameControls(bool enable) + { + resourceNameComboBox.Enabled = enable; + openButton.Enabled = enable; + closeButton.Enabled = !enable; + if (enable) + openButton.Focus(); + } + + private void updateSRQControls(bool enable) + { + commandTextBox.Enabled = enable; + enableSRQButton.Enabled = enable; + if (enable) + enableSRQButton.Focus(); + } + + private void updateWriteControls(bool enable) + { + writeTextBox.Enabled = enable; + writeButton.Enabled = enable; + if (enable) + writeButton.Focus(); + } + + private void InitializeUI() + { + updateResourceNameControls(true); + updateSRQControls(false); + updateWriteControls(false); + } + + // When the Open Session button is pressed, the resource name of the + // device is set and the control attempts to connect to the device + private void openButton_Click(object sender, System.EventArgs e) + { + try + { + using (var rmSession = new ResourceManager()) + { + mbSession = (MessageBasedSession)rmSession.Open(resourceNameComboBox.Text); + // Use SynchronizeCallbacks to specify that the object marshals callbacks across threads appropriately. + mbSession.SynchronizeCallbacks = true; + updateResourceNameControls(false); + updateSRQControls(true); + } + } + catch (Exception exp) + { + MessageBox.Show(exp.Message); + } + } + + // The Enable SRQ button writes the string that tells the instrument to + // enable the SRQ bit + private void enableSRQButton_Click(object sender, System.EventArgs e) + { + try + { // Registering a handler for an event automatically enables that event. + mbSession.ServiceRequest += OnServiceRequest; + WriteToSession(commandTextBox.Text); + updateSRQControls(false); + updateWriteControls(true); + } + catch(Exception exp) + { + MessageBox.Show(exp.Message); + } + } + + // Pressing Close Session causes the control to release its handle to the device + private void closeButton_Click(object sender, System.EventArgs e) + { + mbSession.ServiceRequest -= OnServiceRequest; + mbSession.Dispose(); + InitializeUI(); + } + + // Clicking the Write Button causes the Send String to be written to the device + private void writeButton_Click(object sender, System.EventArgs e) + { + WriteToSession(writeTextBox.Text); + } + + // Pressing the Clear button clears the read textbox + private void clearButton_Click(object sender, System.EventArgs e) + { + readTextBox.Clear(); + } + + private string ReplaceCommonEscapeSequences(string s) + { + return s.Replace("\\n", "\n").Replace("\\r", "\r"); + } + + private string InsertCommonEscapeSequences(string s) + { + return s.Replace("\n", "\\n").Replace("\r", "\\r"); + } + + private void WriteToSession(string txtWrite) + { + try + { + string textToWrite = ReplaceCommonEscapeSequences(txtWrite); + mbSession.RawIO.Write(textToWrite); + } + catch(Exception exp) + { + MessageBox.Show(exp.Message); + } + } + + private void OnServiceRequest(object sender, VisaEventArgs e) + { + try + { + var mbs = (MessageBasedSession)sender; + StatusByteFlags sb = mbs.ReadStatusByte(); + + if ((sb & StatusByteFlags.MessageAvailable) != 0) + { + string textRead = mbs.RawIO.ReadString(); + readTextBox.Text = InsertCommonEscapeSequences(textRead); + } + else + { + MessageBox.Show("MAV in status register is not set, which means that message is not available. Make sure the command to enable SRQ is correct, and the instrument is 488.2 compatible."); + } + } + catch(Exception exp) + { + MessageBox.Show(exp.Message); + } + } + } +} diff --git a/NI-VISA/Examples/.NET/ServiceRequest/MainForm.resx b/NI-VISA/Examples/.NET/ServiceRequest/MainForm.resx new file mode 100644 index 0000000..9154e7e --- /dev/null +++ b/NI-VISA/Examples/.NET/ServiceRequest/MainForm.resx @@ -0,0 +1,353 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + 17, 17 + + + True + + + 33 + + + + + AAABAAIAICAAAAEAGACoDAAAJgAAADAwAAABABgAqBwAAM4MAAAoAAAAIAAAAEAAAAABABgAAAAAAAAM + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAjn54Xks/YlUudGIvgW43g3E0eGgsZ1cnaFs1i4VwAAAAAAAAAAAAAAAAAAAAAAAA + AAA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AAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////AAD///////8AAP///////wAA//////// + AAD///////8AAP///////wAA//8AB///AAD//AAB//8AAP/wAAB//wAA/+AAAD//AAD/wAAAH/8AAP+A + AAAP/wAA/wAAAAf/AAD+AAAAA/8AAP4AAAAD/wAA/AAAAAH/AAD8AAAAAf8AAPgAAAAA/wAA+AAAAAD/ + AAD4AAAAAP8AAPgAAAAAfwAA+AAAAAB/AADwAAAAAH8AAPAAAAAAfwAA8AAAAAB/AADwAAAAAD8AAPAA + AAAABwAA8AAAAAADAADwAAAAAAEAAIAAAAAAgQAAgAAAAADDAACAAAAAAf8AAIAAAAAB/wAAgAAAAAP/ + AACAAAAAA/8AAIAAAAAH/wAAwAAAAA//AADAAAAAH/8AAMAAAAA//wAA4DgAAP//AADgfAAB//8AAPD/ + gA///wAA////////AAD///////8AAP///////wAA////////AAD///////8AAP///////wAA + + + \ No newline at end of file diff --git a/NI-VISA/Examples/.NET/ServiceRequest/ReadMe.txt b/NI-VISA/Examples/.NET/ServiceRequest/ReadMe.txt new file mode 100644 index 0000000..d737b7e --- /dev/null +++ b/NI-VISA/Examples/.NET/ServiceRequest/ReadMe.txt @@ -0,0 +1,13 @@ +Example Title: Service Request + +Category: NI-VISA + +Description: This example demonstrates how to use the service request event and + the service request status byte to determine when generated data is ready + and how to read it. + +Language: Visual C# + +Required Software: NI-VISA + +Required Hardware: GPIB Instrument diff --git a/NI-VISA/Examples/.NET/ServiceRequest/ServiceRequest.2010.csproj b/NI-VISA/Examples/.NET/ServiceRequest/ServiceRequest.2010.csproj new file mode 100644 index 0000000..6e33582 --- /dev/null +++ b/NI-VISA/Examples/.NET/ServiceRequest/ServiceRequest.2010.csproj @@ -0,0 +1,117 @@ + + + + Local + 10.0.21006.1 + 2.0 + {3E318495-ADD7-4B3C-927B-A8E38E77FCEE} + Debug + AnyCPU + App.ico + + + ServiceRequest + + + JScript + Grid + IE50 + false + WinExe + NationalInstruments.Examples.ServiceRequest + OnBuildSuccess + + + + + v4.0 + + + bin\Debug\ + false + 285212672 + false + + + TRACE;DEBUG;NETFX2_0;NETFX3_5;NETFX4_0 + + + true + 4096 + false + + + false + false + false + false + 4 + AnyCPU + + + bin\Release\ + false + 285212672 + false + + + TRACE;NETFX2_0;NETFX3_5;NETFX4_0 + + + false + 4096 + false + + + true + false + false + false + 4 + AnyCPU + + + + + + System + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.dll + + + System.Data + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Data.dll + + + System.Drawing + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Drawing.dll + + + System.Windows.Forms + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll + + + System.XML + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll + + + + + + Code + + + Form + + + MainForm.cs + + + + + + + + + + + \ No newline at end of file diff --git a/NI-VISA/Examples/.NET/ServiceRequest/ServiceRequest.2010.sln b/NI-VISA/Examples/.NET/ServiceRequest/ServiceRequest.2010.sln new file mode 100644 index 0000000..f8da7e4 --- /dev/null +++ b/NI-VISA/Examples/.NET/ServiceRequest/ServiceRequest.2010.sln @@ -0,0 +1,19 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceRequest", "ServiceRequest.2010.csproj", "{3E318495-ADD7-4B3C-927B-A8E38E77FCEE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3E318495-ADD7-4B3C-927B-A8E38E77FCEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3E318495-ADD7-4B3C-927B-A8E38E77FCEE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3E318495-ADD7-4B3C-927B-A8E38E77FCEE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3E318495-ADD7-4B3C-927B-A8E38E77FCEE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/NI-VISA/Examples/.NET/ServiceRequest/ServiceRequest.2012.csproj b/NI-VISA/Examples/.NET/ServiceRequest/ServiceRequest.2012.csproj new file mode 100644 index 0000000..b8e941e --- /dev/null +++ b/NI-VISA/Examples/.NET/ServiceRequest/ServiceRequest.2012.csproj @@ -0,0 +1,119 @@ + + + + Local + 11.0.50522.1 RCREL + 2.0 + {3E318495-ADD7-4B3C-927B-A8E38E77FCEE} + Debug + AnyCPU + App.ico + + + ServiceRequest + + + JScript + Grid + IE50 + false + WinExe + NationalInstruments.Examples.ServiceRequest + OnBuildSuccess + + + + + v4.5 + + + bin\Debug\ + false + 285212672 + false + + + TRACE;DEBUG;NETFX2_0;NETFX3_5;NETFX4_0;NETFX4_5 + + + true + 4096 + false + + + false + false + false + false + 4 + AnyCPU + false + + + bin\Release\ + false + 285212672 + false + + + TRACE;NETFX2_0;NETFX3_5;NETFX4_0;NETFX4_5 + + + false + 4096 + false + + + true + false + false + false + 4 + AnyCPU + false + + + + + + System + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.dll + + + System.Data + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Data.dll + + + System.Drawing + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Drawing.dll + + + System.Windows.Forms + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll + + + System.XML + ..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll + + + + + + Code + + + Form + + + MainForm.cs + + + + + + + + + + + \ No newline at end of file diff --git a/NI-VISA/Examples/.NET/ServiceRequest/ServiceRequest.2012.sln b/NI-VISA/Examples/.NET/ServiceRequest/ServiceRequest.2012.sln new file mode 100644 index 0000000..4ccefb1 --- /dev/null +++ b/NI-VISA/Examples/.NET/ServiceRequest/ServiceRequest.2012.sln @@ -0,0 +1,19 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceRequest", "ServiceRequest.2012.csproj", "{3E318495-ADD7-4B3C-927B-A8E38E77FCEE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3E318495-ADD7-4B3C-927B-A8E38E77FCEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3E318495-ADD7-4B3C-927B-A8E38E77FCEE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3E318495-ADD7-4B3C-927B-A8E38E77FCEE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3E318495-ADD7-4B3C-927B-A8E38E77FCEE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/App.ico b/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/App.ico new file mode 100644 index 0000000000000000000000000000000000000000..403417b99a7dd62aa99bc6f189e7fce84ebff1fd GIT binary patch literal 10614 zcmeHM2T)sCmQ`<8P48~cOizz(GKic(NC*@NA|oUaIS7%H$Vo&Ygdze25-P1ig-Lt#3-Mce2UNP?Rb~*P-H@W|P`~Q>y9 zi;4*}&xrxi(_zdkXhEVWG1wrHV8vx;{w*tMsjmpeYBuCz4u&WLRhUOx4ZGqZS!eQZ zkDI%>p2N+-!iwM!w4R`f@>j6rrg)OWfnDX$)AgeDG2&$*c5^J}#w`74y!d3AHc=P6 z&=v9IfICp-lM!i2jCTJ?6mj8p6}g6eRIkb$VqSVmPK57-ApYuP=51-o!AQnGiqQ9hm?eS7Ybq^WVGC$;1UJ_azGauRu@XlG|Ke# z{4>M+zP>TPHC}dYuKah`MUu|E&kwujdlF^szVr2{feMGbc$>GzCx+X0SGbAFQXI95 zLCU4tiXO3;BvW;UwN;T781eXU?D}QisZ4lhyW>P!``csD%0S*yPs(DO-(`VgJ;gpT z@GV)&jD{=-{duHhm=X=DU19}to$u+h(xKWRxdx_=bK=I&Hb-u5Pwa1Y9j~-V&#!9X0CO=L&A z;KAvYTi2zxP9|?|3?4~^n+rVYM4?0!FKZ2$thVnigXCofypAF^0Nl@WoZ$NsoYTxz z7!ZqaW+P{H#M+4LODd)n!G5Fp}az9-mC!+Uh)B z8E9oRc^Vhm>E!viru$)$;~kMwA$po;ABHn}b#wqA&PTPs1|}+xbTr9xH&%LZjlMsU_(@R*7{ZM_VI-oE|MOcm}?W|d;VN_ zWsCPakKe(Hw9(Cl8SpRCrkbDQ*4s1))D+7*5%t3A8Y)ltz70Ty{V*BEGJ z7%J6ZZK@HbW)p33-AoL@3-Zd~a%WPo?pUo|ZC(gegJNezg&1x-qbqz{OuULZ;h zK}11ig#;DjCT$@HHXsV~W zS&%I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DaXz%+PnG{9$36w@tpD0@cs2F(ISa$r*HGV``v!1Z9$E04(wkXb6wYE{O3y z-4^UD_mc1xNCh@rr4p>b1S^qk4YLfjY~3(ka_X`Et<2~tf{{#dCE{0dh_NuaiuqTf0R1WOc3(0vHk`;M(!(R zJa_sb_*Pmh1Fe)_{}OqycX0RiDcmRo0;HQL({+DE(ELKVI-&~W>Qi^SKvY_hK5H&tjlZG@S2L+Y{h6HpANZ;%ap2`}I7s|Fr zq8Az+W!1P5I;xWe^LPHFo?HAn8PEMpaxX%kVxd7*|0FmvBJsQL{uA$20oCL{G-;Q9 zW{XEV9V`@&)pzDh#a}iiN&e!;i1xY#9huw&|w@|NIXqUA16qEgD3T z1=fha^m83Yu%5Urak)Qcx*qq`hYl z#p%m!{<22&WUZaJ8rjaWY$!&?dg>4Z9ezyr)^T&C#9o&HxkT6gINkVCJ_5+MR%aL} zdgP{%D`+`bJB4ZrM#K%eKFxe|rCMIczq3qxyjwHV8oxSN@Wnyb*>>AZN7l`i%I_ZZ zEf2)?Rym7m?3zoh>FFSx?FDuL@vQ=0o)GC-4cDMpDl!nj3WQb}STh~x_CN2EcrU2G zgBB?qIn$Os))2MON&N1f_;ikYZJhCkM^ndBj2;&5(MIK?tK7jl?>Z`il4=_6trX^K z_A=2sdZaUl7va(Sl_2Hue{8%0S>PYt1 zVEPCzaHJ-*GT$L9!Z_Gn5$B*;TT$>rgr92eZ{MwEkJoS}Mnr3GxHl!<2j_0!?yP`z zynwd9M_yfu-h_v(j=s%$R-|XBz=l?OD>pQpqg6F!I<@WhH j&hdO*=Xk!(`*6A3bEG`W!?#aq=LOE6kjL|c0|5UGOq~>W literal 0 HcmV?d00001 diff --git a/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/AssemblyInfo.cs b/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/AssemblyInfo.cs new file mode 100644 index 0000000..9f89a32 --- /dev/null +++ b/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/AssemblyInfo.cs @@ -0,0 +1,58 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly: AssemblyTitle("")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly: AssemblyVersion("1.0.*")] + +// +// In order to sign your assembly you must specify a key to use. Refer to the +// Microsoft .NET Framework documentation for more information on assembly signing. +// +// Use the attributes below to control which key is used for signing. +// +// Notes: +// (*) If no key is specified, the assembly is not signed. +// (*) KeyName refers to a key that has been installed in the Crypto Service +// Provider (CSP) on your machine. KeyFile refers to a file which contains +// a key. +// (*) If the KeyFile and the KeyName values are both specified, the +// following processing occurs: +// (1) If the KeyName can be found in the CSP, that key is used. +// (2) If the KeyName does not exist and the KeyFile does exist, the key +// in the KeyFile is installed into the CSP and used. +// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. +// When specifying the KeyFile, the location of the KeyFile should be +// relative to the project output directory which is +// %Project Directory%\obj\. For example, if your KeyFile is +// located in the project directory, you would specify the AssemblyKeyFile +// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] +// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework +// documentation for more information on this. +// +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] +[assembly: AssemblyKeyName("")] diff --git a/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/MainForm.cs b/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/MainForm.cs new file mode 100644 index 0000000..6c05e9c --- /dev/null +++ b/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/MainForm.cs @@ -0,0 +1,430 @@ +using System; +using System.Windows.Forms; +using Ivi.Visa; +using NationalInstruments.Visa; + +namespace NationalInstruments.Examples.SimpleAsynchronousReadWrite +{ + ///

+ /// Summary description for Form1. + /// + public class MainForm : System.Windows.Forms.Form + { + private MessageBasedSession mbSession; + private string lastResourceString = null; + private IVisaAsyncResult asyncHandle = null; + private System.Windows.Forms.TextBox writeTextBox; + private System.Windows.Forms.TextBox readTextBox; + private System.Windows.Forms.Button writeButton; + private System.Windows.Forms.Button readButton; + private System.Windows.Forms.Button openSessionButton; + private System.Windows.Forms.Button clearButton; + private System.Windows.Forms.Button closeSessionButton; + private System.Windows.Forms.Label stringToWriteLabel; + private System.Windows.Forms.Label stringToReadLabel; + private System.Windows.Forms.Button terminateButton; + private System.Windows.Forms.Label elementsTransferredLabel; + private System.Windows.Forms.TextBox elementsTransferredTextBox; + private System.Windows.Forms.TextBox lastIOStatusTextBox; + private System.Windows.Forms.Label lastIOStatusLabel; + /// + /// Required designer variable. + /// + private System.ComponentModel.Container components = null; + + public MainForm() + { + // + // Required for Windows Form Designer support + // + InitializeComponent(); + SetupControlState(false); + } + + /// + /// Clean up any resources being used. + /// + protected override void Dispose( bool disposing ) + { + if( disposing ) + { + if(mbSession != null) + { + mbSession.Dispose(); + } + if (components != null) + { + components.Dispose(); + } + } + base.Dispose( disposing ); + } + + #region Windows Form Designer generated code + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); + this.writeButton = new System.Windows.Forms.Button(); + this.readButton = new System.Windows.Forms.Button(); + this.openSessionButton = new System.Windows.Forms.Button(); + this.writeTextBox = new System.Windows.Forms.TextBox(); + this.readTextBox = new System.Windows.Forms.TextBox(); + this.clearButton = new System.Windows.Forms.Button(); + this.closeSessionButton = new System.Windows.Forms.Button(); + this.stringToWriteLabel = new System.Windows.Forms.Label(); + this.stringToReadLabel = new System.Windows.Forms.Label(); + this.terminateButton = new System.Windows.Forms.Button(); + this.elementsTransferredLabel = new System.Windows.Forms.Label(); + this.elementsTransferredTextBox = new System.Windows.Forms.TextBox(); + this.lastIOStatusTextBox = new System.Windows.Forms.TextBox(); + this.lastIOStatusLabel = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // writeButton + // + this.writeButton.Location = new System.Drawing.Point(5, 83); + this.writeButton.Name = "writeButton"; + this.writeButton.Size = new System.Drawing.Size(74, 23); + this.writeButton.TabIndex = 3; + this.writeButton.Text = "Write"; + this.writeButton.Click += new System.EventHandler(this.write_Click); + // + // readButton + // + this.readButton.Location = new System.Drawing.Point(79, 83); + this.readButton.Name = "readButton"; + this.readButton.Size = new System.Drawing.Size(74, 23); + this.readButton.TabIndex = 4; + this.readButton.Text = "Read"; + this.readButton.Click += new System.EventHandler(this.read_Click); + // + // openSessionButton + // + this.openSessionButton.Location = new System.Drawing.Point(5, 5); + this.openSessionButton.Name = "openSessionButton"; + this.openSessionButton.Size = new System.Drawing.Size(92, 22); + this.openSessionButton.TabIndex = 0; + this.openSessionButton.Text = "Open Session"; + this.openSessionButton.Click += new System.EventHandler(this.openSession_Click); + // + // writeTextBox + // + this.writeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.writeTextBox.Location = new System.Drawing.Point(5, 54); + this.writeTextBox.Name = "writeTextBox"; + this.writeTextBox.Size = new System.Drawing.Size(275, 20); + this.writeTextBox.TabIndex = 2; + this.writeTextBox.Text = "*IDN?\\n"; + // + // readTextBox + // + this.readTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.readTextBox.Location = new System.Drawing.Point(5, 136); + this.readTextBox.Multiline = true; + this.readTextBox.Name = "readTextBox"; + this.readTextBox.ReadOnly = true; + this.readTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.readTextBox.Size = new System.Drawing.Size(275, 158); + this.readTextBox.TabIndex = 6; + this.readTextBox.TabStop = false; + // + // clearButton + // + this.clearButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.clearButton.Location = new System.Drawing.Point(6, 344); + this.clearButton.Name = "clearButton"; + this.clearButton.Size = new System.Drawing.Size(275, 24); + this.clearButton.TabIndex = 6; + this.clearButton.Text = "Clear"; + this.clearButton.Click += new System.EventHandler(this.clear_Click); + // + // closeSessionButton + // + this.closeSessionButton.Location = new System.Drawing.Point(97, 5); + this.closeSessionButton.Name = "closeSessionButton"; + this.closeSessionButton.Size = new System.Drawing.Size(92, 22); + this.closeSessionButton.TabIndex = 1; + this.closeSessionButton.Text = "Close Session"; + this.closeSessionButton.Click += new System.EventHandler(this.closeSession_Click); + // + // stringToWriteLabel + // + this.stringToWriteLabel.Location = new System.Drawing.Point(5, 40); + this.stringToWriteLabel.Name = "stringToWriteLabel"; + this.stringToWriteLabel.Size = new System.Drawing.Size(91, 14); + this.stringToWriteLabel.TabIndex = 8; + this.stringToWriteLabel.Text = "String to Write:"; + // + // stringToReadLabel + // + this.stringToReadLabel.Location = new System.Drawing.Point(5, 122); + this.stringToReadLabel.Name = "stringToReadLabel"; + this.stringToReadLabel.Size = new System.Drawing.Size(101, 14); + this.stringToReadLabel.TabIndex = 9; + this.stringToReadLabel.Text = "String Read:"; + // + // terminateButton + // + this.terminateButton.Enabled = false; + this.terminateButton.Location = new System.Drawing.Point(205, 83); + this.terminateButton.Name = "terminateButton"; + this.terminateButton.Size = new System.Drawing.Size(74, 23); + this.terminateButton.TabIndex = 5; + this.terminateButton.Text = "Terminate"; + this.terminateButton.Click += new System.EventHandler(this.terminate_Click); + // + // elementsTransferredLabel + // + this.elementsTransferredLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.elementsTransferredLabel.Location = new System.Drawing.Point(5, 308); + this.elementsTransferredLabel.Name = "elementsTransferredLabel"; + this.elementsTransferredLabel.Size = new System.Drawing.Size(116, 11); + this.elementsTransferredLabel.TabIndex = 11; + this.elementsTransferredLabel.Text = "Elements Transferred:"; + // + // elementsTransferredTextBox + // + this.elementsTransferredTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.elementsTransferredTextBox.Location = new System.Drawing.Point(5, 321); + this.elementsTransferredTextBox.Name = "elementsTransferredTextBox"; + this.elementsTransferredTextBox.ReadOnly = true; + this.elementsTransferredTextBox.Size = new System.Drawing.Size(104, 20); + this.elementsTransferredTextBox.TabIndex = 12; + this.elementsTransferredTextBox.TabStop = false; + // + // lastIOStatusTextBox + // + this.lastIOStatusTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lastIOStatusTextBox.Location = new System.Drawing.Point(113, 321); + this.lastIOStatusTextBox.Name = "lastIOStatusTextBox"; + this.lastIOStatusTextBox.ReadOnly = true; + this.lastIOStatusTextBox.Size = new System.Drawing.Size(168, 20); + this.lastIOStatusTextBox.TabIndex = 14; + this.lastIOStatusTextBox.TabStop = false; + // + // lastIOStatusLabel + // + this.lastIOStatusLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.lastIOStatusLabel.Location = new System.Drawing.Point(113, 308); + this.lastIOStatusLabel.Name = "lastIOStatusLabel"; + this.lastIOStatusLabel.Size = new System.Drawing.Size(116, 11); + this.lastIOStatusLabel.TabIndex = 13; + this.lastIOStatusLabel.Text = "Last I/O Status:"; + // + // MainForm + // + this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); + this.ClientSize = new System.Drawing.Size(287, 376); + this.Controls.Add(this.lastIOStatusTextBox); + this.Controls.Add(this.elementsTransferredTextBox); + this.Controls.Add(this.readTextBox); + this.Controls.Add(this.writeTextBox); + this.Controls.Add(this.lastIOStatusLabel); + this.Controls.Add(this.elementsTransferredLabel); + this.Controls.Add(this.terminateButton); + this.Controls.Add(this.stringToReadLabel); + this.Controls.Add(this.stringToWriteLabel); + this.Controls.Add(this.closeSessionButton); + this.Controls.Add(this.clearButton); + this.Controls.Add(this.openSessionButton); + this.Controls.Add(this.readButton); + this.Controls.Add(this.writeButton); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MaximizeBox = false; + this.MinimumSize = new System.Drawing.Size(295, 316); + this.Name = "MainForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Simple Asynchronous Read/Write"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + #endregion + + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.Run(new MainForm()); + } + + private void openSession_Click(object sender, System.EventArgs e) + { + using (SelectResource sr = new SelectResource()) + { + if(lastResourceString != null) + { + sr.ResourceName = lastResourceString; + } + DialogResult result = sr.ShowDialog(this); + if(result == DialogResult.OK) + { + lastResourceString = sr.ResourceName; + Cursor.Current = Cursors.WaitCursor; + try + { + using (var rmSession = new ResourceManager()) + { + mbSession = (MessageBasedSession)rmSession.Open(sr.ResourceName); + // Use SynchronizeCallbacks to specify that the object marshals callbacks across threads appropriately. + mbSession.SynchronizeCallbacks = true; + SetupControlState(true); + } + } + catch(Exception exp) + { + MessageBox.Show(exp.Message); + } + finally + { + Cursor.Current = Cursors.Default; + } + } + } + } + + private void closeSession_Click(object sender, System.EventArgs e) + { + SetupControlState(false); + mbSession.Dispose(); + } + + private void write_Click(object sender, System.EventArgs e) + { + try + { + SetupWaitingControlState(true); + string textToWrite = ReplaceCommonEscapeSequences(writeTextBox.Text); + asyncHandle = mbSession.RawIO.BeginWrite( + textToWrite, + new VisaAsyncCallback(OnWriteComplete), + (object)textToWrite.Length); + } + catch(Exception exp) + { + MessageBox.Show(exp.Message); + } + } + + private void read_Click(object sender, System.EventArgs e) + { + try + { + SetupWaitingControlState(true); + asyncHandle = mbSession.RawIO.BeginRead( + 1024, + new VisaAsyncCallback(OnReadComplete), + null); + } + catch(Exception exp) + { + MessageBox.Show(exp.Message); + } + } + + private void clear_Click(object sender, System.EventArgs e) + { + ClearControls(); + } + + private void terminate_Click(object sender, System.EventArgs e) + { + SetupWaitingControlState(false); + try + { + mbSession.RawIO.AbortAsyncOperation(asyncHandle); + } + catch(Exception exp) + { + MessageBox.Show(exp.Message); + } + } + + private void OnWriteComplete(IVisaAsyncResult result) + { + try + { + SetupWaitingControlState(false); + mbSession.RawIO.EndWrite(result); + lastIOStatusTextBox.Text = "Success"; + } + catch(Exception exp) + { + lastIOStatusTextBox.Text = exp.Message; + } + elementsTransferredTextBox.Text = ((int)result.Count).ToString(); + } + + private void OnReadComplete(IVisaAsyncResult result) + { + try + { + SetupWaitingControlState(false); + string responseString = mbSession.RawIO.EndReadString(result); + readTextBox.Text = InsertCommonEscapeSequences(responseString); + lastIOStatusTextBox.Text = "Success"; + } + catch(Exception exp) + { + lastIOStatusTextBox.Text = exp.Message; + } + elementsTransferredTextBox.Text = ((int)result.Count).ToString(); + } + + private void SetupControlState(bool isSessionOpen) + { + openSessionButton.Enabled = !isSessionOpen; + closeSessionButton.Enabled = isSessionOpen; + writeButton.Enabled = isSessionOpen; + readButton.Enabled = isSessionOpen; + writeTextBox.Enabled = isSessionOpen; + clearButton.Enabled = isSessionOpen; + if(isSessionOpen) + { + ClearControls(); + writeTextBox.Focus(); + } + } + + private void SetupWaitingControlState(bool operationIsInProgress) + { + if (operationIsInProgress) + { + readTextBox.Text = String.Empty; + elementsTransferredTextBox.Text = String.Empty; + lastIOStatusTextBox.Text = String.Empty; + } + terminateButton.Enabled = operationIsInProgress; + writeButton.Enabled = !operationIsInProgress; + readButton.Enabled = !operationIsInProgress; + } + + private string ReplaceCommonEscapeSequences(string s) + { + return (s != null) ? s.Replace("\\n", "\n").Replace("\\r", "\r") : s; + } + + private string InsertCommonEscapeSequences(string s) + { + return (s != null) ? s.Replace("\n", "\\n").Replace("\r", "\\r") : s; + } + + private void ClearControls() + { + readTextBox.Text = String.Empty; + lastIOStatusTextBox.Text = String.Empty; + elementsTransferredTextBox.Text = String.Empty; + } + } +} diff --git a/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/MainForm.resx b/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/MainForm.resx new file mode 100644 index 0000000..96b32f3 --- /dev/null +++ b/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/MainForm.resx @@ -0,0 +1,317 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + + True + + + True + + + + + AAABAAIAICAAAAEAGACoDAAAJgAAADAwAAABABgAqBwAAM4MAAAoAAAAIAAAAEAAAAABABgAAAAAAAAM + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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8AAAAAB/AADwAAAAAD8AAPAA + AAAABwAA8AAAAAADAADwAAAAAAEAAIAAAAAAgQAAgAAAAADDAACAAAAAAf8AAIAAAAAB/wAAgAAAAAP/ + AACAAAAAA/8AAIAAAAAH/wAAwAAAAA//AADAAAAAH/8AAMAAAAA//wAA4DgAAP//AADgfAAB//8AAPD/ + gA///wAA////////AAD///////8AAP///////wAA////////AAD///////8AAP///////wAA + + + \ No newline at end of file diff --git a/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/ReadMe.txt b/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/ReadMe.txt new file mode 100644 index 0000000..4b98769 --- /dev/null +++ b/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/ReadMe.txt @@ -0,0 +1,15 @@ +Example Title: Simple Asynchronous Read/Write + +Category: NI-VISA + +Description: This example demonstrates how to use the NI-VISA .NET Library to + perform simple asynchronous operations. With asynchronous + operations, you first call a method to start the operation. You then + call a second method to complete the operation. The first method + returns a handle that you can use to check the progress of the operation. + +Language: Visual C# + +Required Software: NI-VISA + +Required Hardware: Any message-based device diff --git a/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/SelectResource.cs b/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/SelectResource.cs new file mode 100644 index 0000000..fc11b0c --- /dev/null +++ b/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/SelectResource.cs @@ -0,0 +1,189 @@ +using System.Windows.Forms; +using NationalInstruments.Visa; + +namespace NationalInstruments.Examples.SimpleAsynchronousReadWrite +{ + /// + /// Summary description for SelectResource. + /// + public class SelectResource : System.Windows.Forms.Form + { + private System.Windows.Forms.ListBox availableResourcesListBox; + private System.Windows.Forms.Button okButton; + private System.Windows.Forms.Button closeButton; + private System.Windows.Forms.TextBox visaResourceNameTextBox; + private System.Windows.Forms.Label AvailableResourcesLabel; + private System.Windows.Forms.Label ResourceStringLabel; + /// + /// Required designer variable. + /// + private System.ComponentModel.Container components = null; + + public SelectResource() + { + // + // Required for Windows Form Designer support + // + InitializeComponent(); + } + + /// + /// Clean up any resources being used. + /// + protected override void Dispose( bool disposing ) + { + if( disposing ) + { + if(components != null) + { + components.Dispose(); + } + } + base.Dispose( disposing ); + } + + #region Windows Form Designer generated code + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(SelectResource)); + this.availableResourcesListBox = new System.Windows.Forms.ListBox(); + this.okButton = new System.Windows.Forms.Button(); + this.closeButton = new System.Windows.Forms.Button(); + this.visaResourceNameTextBox = new System.Windows.Forms.TextBox(); + this.AvailableResourcesLabel = new System.Windows.Forms.Label(); + this.ResourceStringLabel = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // availableResourcesListBox + // + this.availableResourcesListBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.availableResourcesListBox.Location = new System.Drawing.Point(5, 18); + this.availableResourcesListBox.Name = "availableResourcesListBox"; + this.availableResourcesListBox.Size = new System.Drawing.Size(282, 108); + this.availableResourcesListBox.TabIndex = 0; + this.availableResourcesListBox.DoubleClick += new System.EventHandler(this.availableResourcesListBox_DoubleClick); + this.availableResourcesListBox.SelectedIndexChanged += new System.EventHandler(this.availableResourcesListBox_SelectedIndexChanged); + // + // okButton + // + this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK; + this.okButton.Location = new System.Drawing.Point(5, 187); + this.okButton.Name = "okButton"; + this.okButton.Size = new System.Drawing.Size(77, 25); + this.okButton.TabIndex = 2; + this.okButton.Text = "OK"; + // + // closeButton + // + this.closeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.closeButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.closeButton.Location = new System.Drawing.Point(82, 187); + this.closeButton.Name = "closeButton"; + this.closeButton.Size = new System.Drawing.Size(77, 25); + this.closeButton.TabIndex = 3; + this.closeButton.Text = "Cancel"; + // + // visaResourceNameTextBox + // + this.visaResourceNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.visaResourceNameTextBox.Location = new System.Drawing.Point(5, 157); + this.visaResourceNameTextBox.Name = "visaResourceNameTextBox"; + this.visaResourceNameTextBox.Size = new System.Drawing.Size(282, 20); + this.visaResourceNameTextBox.TabIndex = 4; + this.visaResourceNameTextBox.Text = "GPIB0::2::INSTR"; + // + // AvailableResourcesLabel + // + this.AvailableResourcesLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.AvailableResourcesLabel.Location = new System.Drawing.Point(5, 5); + this.AvailableResourcesLabel.Name = "AvailableResourcesLabel"; + this.AvailableResourcesLabel.Size = new System.Drawing.Size(279, 12); + this.AvailableResourcesLabel.TabIndex = 5; + this.AvailableResourcesLabel.Text = "Available Resources:"; + // + // ResourceStringLabel + // + this.ResourceStringLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.ResourceStringLabel.Location = new System.Drawing.Point(5, 141); + this.ResourceStringLabel.Name = "ResourceStringLabel"; + this.ResourceStringLabel.Size = new System.Drawing.Size(279, 13); + this.ResourceStringLabel.TabIndex = 6; + this.ResourceStringLabel.Text = "Resource String:"; + // + // SelectResource + // + this.AcceptButton = this.okButton; + this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); + this.CancelButton = this.closeButton; + this.ClientSize = new System.Drawing.Size(292, 220); + this.Controls.Add(this.ResourceStringLabel); + this.Controls.Add(this.AvailableResourcesLabel); + this.Controls.Add(this.visaResourceNameTextBox); + this.Controls.Add(this.closeButton); + this.Controls.Add(this.okButton); + this.Controls.Add(this.availableResourcesListBox); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.KeyPreview = true; + this.MaximizeBox = false; + this.MinimumSize = new System.Drawing.Size(177, 247); + this.Name = "SelectResource"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Select Resource"; + this.Load += new System.EventHandler(this.OnLoad); + this.ResumeLayout(false); + + } + #endregion + + + private void OnLoad(object sender, System.EventArgs e) + { + // This example uses an instance of the NationalInstruments.Visa.ResourceManager class to find resources on the system. + // Alternatively, static methods provided by the Ivi.Visa.ResourceManager class may be used when an application + // requires additional VISA .NET implementations. + using (var rmSession = new ResourceManager()) + { + foreach (string s in rmSession.Find("(ASRL|GPIB|TCPIP|USB)?*INSTR")) + { + availableResourcesListBox.Items.Add(s); + } + } + } + + private void availableResourcesListBox_DoubleClick(object sender, System.EventArgs e) + { + string selectedString = (string)availableResourcesListBox.SelectedItem; + ResourceName = selectedString; + this.DialogResult = DialogResult.OK; + this.Close(); + } + + private void availableResourcesListBox_SelectedIndexChanged(object sender, System.EventArgs e) + { + string selectedString = (string)availableResourcesListBox.SelectedItem; + ResourceName = selectedString; + } + + public string ResourceName + { + get + { + return visaResourceNameTextBox.Text; + } + set + { + visaResourceNameTextBox.Text = value; + } + } + } +} diff --git a/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/SelectResource.resx b/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/SelectResource.resx new file mode 100644 index 0000000..7e65f4b --- /dev/null +++ b/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/SelectResource.resx @@ -0,0 +1,365 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + AAABAAIAICAAAAEAGACoDAAAJgAAADAwAAABABgAqBwAAM4MAAAoAAAAIAAAAEAAAAABABgAAAAAAAAM + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAjn54Xks/YlUudGIvgW43g3E0eGgsZ1cnaFs1i4VwAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAmpWKV0sglnVKz6p8qI1K48iW + zK57vqBq7NOZootMq5lXnYpXWEgllI18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AA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////AAD///////8AAP///////wAA//////// + AAD///////8AAP///////wAA//8AB///AAD//AAB//8AAP/wAAB//wAA/+AAAD//AAD/wAAAH/8AAP+A + AAAP/wAA/wAAAAf/AAD+AAAAA/8AAP4AAAAD/wAA/AAAAAH/AAD8AAAAAf8AAPgAAAAA/wAA+AAAAAD/ + AAD4AAAAAP8AAPgAAAAAfwAA+AAAAAB/AADwAAAAAH8AAPAAAAAAfwAA8AAAAAB/AADwAAAAAD8AAPAA + AAAABwAA8AAAAAADAADwAAAAAAEAAIAAAAAAgQAAgAAAAADDAACAAAAAAf8AAIAAAAAB/wAAgAAAAAP/ + AACAAAAAA/8AAIAAAAAH/wAAwAAAAA//AADAAAAAH/8AAMAAAAA//wAA4DgAAP//AADgfAAB//8AAPD/ + gA///wAA////////AAD///////8AAP///////wAA////////AAD///////8AAP///////wAA + + + + Private + + + True + + + 8, 8 + + + (Default) + + + False + + + False + + + SelectResource + + + True + + + 80 + + + False + + + Private + + + False + + + Private + + + Private + + + False + + + Private + + + Private + + + False + + + Private + + + Private + + + False + + + Private + + + Private + + + False + + + Private + + + Private + + + False + + + Private + + \ No newline at end of file diff --git a/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/SimpleAsynchronousReadWrite.2010.csproj b/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/SimpleAsynchronousReadWrite.2010.csproj new file mode 100644 index 0000000..b7b4505 --- /dev/null +++ b/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/SimpleAsynchronousReadWrite.2010.csproj @@ -0,0 +1,123 @@ + + + + Local + 10.0.21006.1 + 2.0 + {B8E8C039-E317-4A83-94BA-BC85DA03F880} + Debug + AnyCPU + App.ico + + + SimpleAsynchronousReadWrite + + + JScript + Grid + IE50 + false + WinExe + NationalInstruments.Examples.SimpleAsynchronousReadWrite + OnBuildSuccess + + + + + v4.0 + + + bin\Debug\ + false + 285212672 + false + + + TRACE;DEBUG;NETFX2_0;NETFX3_5;NETFX4_0 + + + true + 4096 + false + + + false + false + false + false + 4 + AnyCPU + + + bin\Release\ + false + 285212672 + false + + + TRACE;NETFX2_0;NETFX3_5;NETFX4_0 + + + false + 4096 + false + + + true + false + false + false + 4 + AnyCPU + + + + + + System + ..\..\..\..\..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.dll + + + System.Data + ..\..\..\..\..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Data.dll + + + System.Drawing + ..\..\..\..\..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Drawing.dll + + + System.Windows.Forms + ..\..\..\..\..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll + + + System.XML + ..\..\..\..\..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll + + + + + + Code + + + Form + + + Form + + + MainForm.cs + + + SelectResource.cs + + + + + + + + + + + \ No newline at end of file diff --git a/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/SimpleAsynchronousReadWrite.2010.sln b/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/SimpleAsynchronousReadWrite.2010.sln new file mode 100644 index 0000000..afc0fcb --- /dev/null +++ b/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/SimpleAsynchronousReadWrite.2010.sln @@ -0,0 +1,19 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleAsynchronousReadWrite", "SimpleAsynchronousReadWrite.2010.csproj", "{B8E8C039-E317-4A83-94BA-BC85DA03F880}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B8E8C039-E317-4A83-94BA-BC85DA03F880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B8E8C039-E317-4A83-94BA-BC85DA03F880}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B8E8C039-E317-4A83-94BA-BC85DA03F880}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B8E8C039-E317-4A83-94BA-BC85DA03F880}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/SimpleAsynchronousReadWrite.2012.csproj b/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/SimpleAsynchronousReadWrite.2012.csproj new file mode 100644 index 0000000..697c81a --- /dev/null +++ b/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/SimpleAsynchronousReadWrite.2012.csproj @@ -0,0 +1,125 @@ + + + + Local + 11.0.50522.1 RCREL + 2.0 + {B8E8C039-E317-4A83-94BA-BC85DA03F880} + Debug + AnyCPU + App.ico + + + SimpleAsynchronousReadWrite + + + JScript + Grid + IE50 + false + WinExe + NationalInstruments.Examples.SimpleAsynchronousReadWrite + OnBuildSuccess + + + + + v4.5 + + + bin\Debug\ + false + 285212672 + false + + + TRACE;DEBUG;NETFX2_0;NETFX3_5;NETFX4_0;NETFX4_5 + + + true + 4096 + false + + + false + false + false + false + 4 + AnyCPU + false + + + bin\Release\ + false + 285212672 + false + + + TRACE;NETFX2_0;NETFX3_5;NETFX4_0;NETFX4_5 + + + false + 4096 + false + + + true + false + false + false + 4 + AnyCPU + false + + + + + + System + ..\..\..\..\..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.dll + + + System.Data + ..\..\..\..\..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Data.dll + + + System.Drawing + ..\..\..\..\..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Drawing.dll + + + System.Windows.Forms + ..\..\..\..\..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll + + + System.XML + ..\..\..\..\..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll + + + + + + Code + + + Form + + + Form + + + MainForm.cs + + + SelectResource.cs + + + + + + + + + + + \ No newline at end of file diff --git a/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/SimpleAsynchronousReadWrite.2012.sln b/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/SimpleAsynchronousReadWrite.2012.sln new file mode 100644 index 0000000..d58dbd1 --- /dev/null +++ b/NI-VISA/Examples/.NET/SimpleAsynchronousReadWrite/SimpleAsynchronousReadWrite.2012.sln @@ -0,0 +1,19 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleAsynchronousReadWrite", "SimpleAsynchronousReadWrite.2012.csproj", "{B8E8C039-E317-4A83-94BA-BC85DA03F880}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B8E8C039-E317-4A83-94BA-BC85DA03F880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B8E8C039-E317-4A83-94BA-BC85DA03F880}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B8E8C039-E317-4A83-94BA-BC85DA03F880}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B8E8C039-E317-4A83-94BA-BC85DA03F880}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/NI-VISA/Examples/.NET/SimpleReadWrite/App.ico b/NI-VISA/Examples/.NET/SimpleReadWrite/App.ico new file mode 100644 index 0000000000000000000000000000000000000000..403417b99a7dd62aa99bc6f189e7fce84ebff1fd GIT binary patch literal 10614 zcmeHM2T)sCmQ`<8P48~cOizz(GKic(NC*@NA|oUaIS7%H$Vo&Ygdze25-P1ig-Lt#3-Mce2UNP?Rb~*P-H@W|P`~Q>y9 zi;4*}&xrxi(_zdkXhEVWG1wrHV8vx;{w*tMsjmpeYBuCz4u&WLRhUOx4ZGqZS!eQZ zkDI%>p2N+-!iwM!w4R`f@>j6rrg)OWfnDX$)AgeDG2&$*c5^J}#w`74y!d3AHc=P6 z&=v9IfICp-lM!i2jCTJ?6mj8p6}g6eRIkb$VqSVmPK57-ApYuP=51-o!AQnGiqQ9hm?eS7Ybq^WVGC$;1UJ_azGauRu@XlG|Ke# z{4>M+zP>TPHC}dYuKah`MUu|E&kwujdlF^szVr2{feMGbc$>GzCx+X0SGbAFQXI95 zLCU4tiXO3;BvW;UwN;T781eXU?D}QisZ4lhyW>P!``csD%0S*yPs(DO-(`VgJ;gpT z@GV)&jD{=-{duHhm=X=DU19}to$u+h(xKWRxdx_=bK=I&Hb-u5Pwa1Y9j~-V&#!9X0CO=L&A z;KAvYTi2zxP9|?|3?4~^n+rVYM4?0!FKZ2$thVnigXCofypAF^0Nl@WoZ$NsoYTxz z7!ZqaW+P{H#M+4LODd)n!G5Fp}az9-mC!+Uh)B z8E9oRc^Vhm>E!viru$)$;~kMwA$po;ABHn}b#wqA&PTPs1|}+xbTr9xH&%LZjlMsU_(@R*7{ZM_VI-oE|MOcm}?W|d;VN_ zWsCPakKe(Hw9(C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adWrite/AssemblyInfo.cs b/NI-VISA/Examples/.NET/SimpleReadWrite/AssemblyInfo.cs new file mode 100644 index 0000000..9f89a32 --- /dev/null +++ b/NI-VISA/Examples/.NET/SimpleReadWrite/AssemblyInfo.cs @@ -0,0 +1,58 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly: AssemblyTitle("")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly: AssemblyVersion("1.0.*")] + +// +// In order to sign your assembly you must specify a key to use. Refer to the +// Microsoft .NET Framework documentation for more information on assembly signing. +// +// Use the attributes below to control which key is used for signing. +// +// Notes: +// (*) If no key is specified, the assembly is not signed. +// (*) KeyName refers to a key that has been installed in the Crypto Service +// Provider (CSP) on your machine. KeyFile refers to a file which contains +// a key. +// (*) If the KeyFile and the KeyName values are both specified, the +// following processing occurs: +// (1) If the KeyName can be found in the CSP, that key is used. +// (2) If the KeyName does not exist and the KeyFile does exist, the key +// in the KeyFile is installed into the CSP and used. +// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. +// When specifying the KeyFile, the location of the KeyFile should be +// relative to the project output directory which is +// %Project Directory%\obj\. For example, if your KeyFile is +// located in the project directory, you would specify the AssemblyKeyFile +// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] +// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework +// documentation for more information on this. +// +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] +[assembly: AssemblyKeyName("")] diff --git a/NI-VISA/Examples/.NET/SimpleReadWrite/MainForm.cs b/NI-VISA/Examples/.NET/SimpleReadWrite/MainForm.cs new file mode 100644 index 0000000..4696eab --- /dev/null +++ b/NI-VISA/Examples/.NET/SimpleReadWrite/MainForm.cs @@ -0,0 +1,333 @@ +using System; +using System.Windows.Forms; +using NationalInstruments.Visa; + +namespace NationalInstruments.Examples.SimpleReadWrite +{ + ///

+ /// Summary description for Form1. + /// + public class MainForm : System.Windows.Forms.Form + { + private MessageBasedSession mbSession; + private string lastResourceString = null; + private System.Windows.Forms.TextBox writeTextBox; + private System.Windows.Forms.TextBox readTextBox; + private System.Windows.Forms.Button queryButton; + private System.Windows.Forms.Button writeButton; + private System.Windows.Forms.Button readButton; + private System.Windows.Forms.Button openSessionButton; + private System.Windows.Forms.Button clearButton; + private System.Windows.Forms.Button closeSessionButton; + private System.Windows.Forms.Label stringToWriteLabel; + private System.Windows.Forms.Label stringToReadLabel; + /// + /// Required designer variable. + /// + private System.ComponentModel.Container components = null; + + public MainForm() + { + // + // Required for Windows Form Designer support + // + InitializeComponent(); + SetupControlState(false); + } + + /// + /// Clean up any resources being used. + /// + protected override void Dispose( bool disposing ) + { + if( disposing ) + { + if(mbSession != null) + { + mbSession.Dispose(); + } + if (components != null) + { + components.Dispose(); + } + } + base.Dispose( disposing ); + } + + #region Windows Form Designer generated code + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); + this.queryButton = new System.Windows.Forms.Button(); + this.writeButton = new System.Windows.Forms.Button(); + this.readButton = new System.Windows.Forms.Button(); + this.openSessionButton = new System.Windows.Forms.Button(); + this.writeTextBox = new System.Windows.Forms.TextBox(); + this.readTextBox = new System.Windows.Forms.TextBox(); + this.clearButton = new System.Windows.Forms.Button(); + this.closeSessionButton = new System.Windows.Forms.Button(); + this.stringToWriteLabel = new System.Windows.Forms.Label(); + this.stringToReadLabel = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // queryButton + // + this.queryButton.Location = new System.Drawing.Point(5, 83); + this.queryButton.Name = "queryButton"; + this.queryButton.Size = new System.Drawing.Size(74, 23); + this.queryButton.TabIndex = 3; + this.queryButton.Text = "Query"; + this.queryButton.Click += new System.EventHandler(this.query_Click); + // + // writeButton + // + this.writeButton.Location = new System.Drawing.Point(79, 83); + this.writeButton.Name = "writeButton"; + this.writeButton.Size = new System.Drawing.Size(74, 23); + this.writeButton.TabIndex = 4; + this.writeButton.Text = "Write"; + this.writeButton.Click += new System.EventHandler(this.write_Click); + // + // readButton + // + this.readButton.Location = new System.Drawing.Point(153, 83); + this.readButton.Name = "readButton"; + this.readButton.Size = new System.Drawing.Size(74, 23); + this.readButton.TabIndex = 5; + this.readButton.Text = "Read"; + this.readButton.Click += new System.EventHandler(this.read_Click); + // + // openSessionButton + // + this.openSessionButton.Location = new System.Drawing.Point(5, 5); + this.openSessionButton.Name = "openSessionButton"; + this.openSessionButton.Size = new System.Drawing.Size(92, 22); + this.openSessionButton.TabIndex = 0; + this.openSessionButton.Text = "Open Session"; + this.openSessionButton.Click += new System.EventHandler(this.openSession_Click); + // + // writeTextBox + // + this.writeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.writeTextBox.Location = new System.Drawing.Point(5, 54); + this.writeTextBox.Name = "writeTextBox"; + this.writeTextBox.Size = new System.Drawing.Size(275, 20); + this.writeTextBox.TabIndex = 2; + this.writeTextBox.Text = "*IDN?\\n"; + // + // readTextBox + // + this.readTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.readTextBox.Location = new System.Drawing.Point(5, 136); + this.readTextBox.Multiline = true; + this.readTextBox.Name = "readTextBox"; + this.readTextBox.ReadOnly = true; + this.readTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.readTextBox.Size = new System.Drawing.Size(275, 119); + this.readTextBox.TabIndex = 6; + this.readTextBox.TabStop = false; + // + // clearButton + // + this.clearButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.clearButton.Location = new System.Drawing.Point(6, 257); + this.clearButton.Name = "clearButton"; + this.clearButton.Size = new System.Drawing.Size(275, 24); + this.clearButton.TabIndex = 7; + this.clearButton.Text = "Clear"; + this.clearButton.Click += new System.EventHandler(this.clear_Click); + // + // closeSessionButton + // + this.closeSessionButton.Location = new System.Drawing.Point(97, 5); + this.closeSessionButton.Name = "closeSessionButton"; + this.closeSessionButton.Size = new System.Drawing.Size(92, 22); + this.closeSessionButton.TabIndex = 1; + this.closeSessionButton.Text = "Close Session"; + this.closeSessionButton.Click += new System.EventHandler(this.closeSession_Click); + // + // stringToWriteLabel + // + this.stringToWriteLabel.Location = new System.Drawing.Point(5, 34); + this.stringToWriteLabel.Name = "stringToWriteLabel"; + this.stringToWriteLabel.Size = new System.Drawing.Size(91, 14); + this.stringToWriteLabel.TabIndex = 8; + this.stringToWriteLabel.Text = "String to Write:"; + // + // stringToReadLabel + // + this.stringToReadLabel.Location = new System.Drawing.Point(5, 117); + this.stringToReadLabel.Name = "stringToReadLabel"; + this.stringToReadLabel.Size = new System.Drawing.Size(101, 15); + this.stringToReadLabel.TabIndex = 9; + this.stringToReadLabel.Text = "String Read:"; + // + // MainForm + // + this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); + this.ClientSize = new System.Drawing.Size(287, 289); + this.Controls.Add(this.stringToReadLabel); + this.Controls.Add(this.stringToWriteLabel); + this.Controls.Add(this.closeSessionButton); + this.Controls.Add(this.clearButton); + this.Controls.Add(this.readTextBox); + this.Controls.Add(this.writeTextBox); + this.Controls.Add(this.openSessionButton); + this.Controls.Add(this.readButton); + this.Controls.Add(this.writeButton); + this.Controls.Add(this.queryButton); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MaximizeBox = false; + this.MinimumSize = new System.Drawing.Size(295, 316); + this.Name = "MainForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Simple Read/Write"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + #endregion + + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.Run(new MainForm()); + } + + private void openSession_Click(object sender, System.EventArgs e) + { + using (SelectResource sr = new SelectResource()) + { + if(lastResourceString != null) + { + sr.ResourceName = lastResourceString; + } + DialogResult result = sr.ShowDialog(this); + if(result == DialogResult.OK) + { + lastResourceString = sr.ResourceName; + Cursor.Current = Cursors.WaitCursor; + using (var rmSession = new ResourceManager()) + { + try + { + mbSession = (MessageBasedSession)rmSession.Open(sr.ResourceName); + SetupControlState(true); + } + catch (InvalidCastException) + { + MessageBox.Show("Resource selected must be a message-based session"); + } + catch (Exception exp) + { + MessageBox.Show(exp.Message); + } + finally + { + Cursor.Current = Cursors.Default; + } + } + } + } + } + + private void closeSession_Click(object sender, System.EventArgs e) + { + SetupControlState(false); + mbSession.Dispose(); + } + + private void query_Click(object sender, System.EventArgs e) + { + readTextBox.Text = String.Empty; + Cursor.Current = Cursors.WaitCursor; + try + { + string textToWrite = ReplaceCommonEscapeSequences(writeTextBox.Text); + mbSession.RawIO.Write(textToWrite); + readTextBox.Text = InsertCommonEscapeSequences(mbSession.RawIO.ReadString()); + } + catch(Exception exp) + { + MessageBox.Show(exp.Message); + } + finally + { + Cursor.Current = Cursors.Default; + } + } + + private void write_Click(object sender, System.EventArgs e) + { + try + { + string textToWrite = ReplaceCommonEscapeSequences(writeTextBox.Text); + mbSession.RawIO.Write(textToWrite); + } + catch(Exception exp) + { + MessageBox.Show(exp.Message); + } + } + + private void read_Click(object sender, System.EventArgs e) + { + readTextBox.Text = String.Empty; + Cursor.Current = Cursors.WaitCursor; + try + { + readTextBox.Text = InsertCommonEscapeSequences(mbSession.RawIO.ReadString()); + } + catch(Exception exp) + { + MessageBox.Show(exp.Message); + } + finally + { + Cursor.Current = Cursors.Default; + } + } + + private void clear_Click(object sender, System.EventArgs e) + { + readTextBox.Text = String.Empty; + } + + private void SetupControlState(bool isSessionOpen) + { + openSessionButton.Enabled = !isSessionOpen; + closeSessionButton.Enabled = isSessionOpen; + queryButton.Enabled = isSessionOpen; + writeButton.Enabled = isSessionOpen; + readButton.Enabled = isSessionOpen; + writeTextBox.Enabled = isSessionOpen; + clearButton.Enabled = isSessionOpen; + if(isSessionOpen) + { + readTextBox.Text = String.Empty; + writeTextBox.Focus(); + } + } + + private string ReplaceCommonEscapeSequences(string s) + { + return s.Replace("\\n", "\n").Replace("\\r", "\r"); + } + + private string InsertCommonEscapeSequences(string s) + { + return s.Replace("\n", "\\n").Replace("\r", "\\r"); + } + } +} diff --git a/NI-VISA/Examples/.NET/SimpleReadWrite/MainForm.resx b/NI-VISA/Examples/.NET/SimpleReadWrite/MainForm.resx new file mode 100644 index 0000000..dd546ff --- /dev/null +++ b/NI-VISA/Examples/.NET/SimpleReadWrite/MainForm.resx @@ -0,0 +1,311 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + + + + AAABAAIAICAAAAEAGACoDAAAJgAAADAwAAABABgAqBwAAM4MAAAoAAAAIAAAAEAAAAABABgAAAAAAAAM + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +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AAD/wAAAH/8AAP+A + AAAP/wAA/wAAAAf/AAD+AAAAA/8AAP4AAAAD/wAA/AAAAAH/AAD8AAAAAf8AAPgAAAAA/wAA+AAAAAD/ + AAD4AAAAAP8AAPgAAAAAfwAA+AAAAAB/AADwAAAAAH8AAPAAAAAAfwAA8AAAAAB/AADwAAAAAD8AAPAA + AAAABwAA8AAAAAADAADwAAAAAAEAAIAAAAAAgQAAgAAAAADDAACAAAAAAf8AAIAAAAAB/wAAgAAAAAP/ + AACAAAAAA/8AAIAAAAAH/wAAwAAAAA//AADAAAAAH/8AAMAAAAA//wAA4DgAAP//AADgfAAB//8AAPD/ + gA///wAA////////AAD///////8AAP///////wAA////////AAD///////8AAP///////wAA + + + \ No newline at end of file diff --git a/NI-VISA/Examples/.NET/SimpleReadWrite/ReadMe.txt b/NI-VISA/Examples/.NET/SimpleReadWrite/ReadMe.txt new file mode 100644 index 0000000..ee2815c --- /dev/null +++ b/NI-VISA/Examples/.NET/SimpleReadWrite/ReadMe.txt @@ -0,0 +1,13 @@ +Example Title: Simple Read/Write + +Category: NI-VISA + +Description: This example demonstrates how to use the NI-VISA .NET Library to + perform simple synchronous I/O operations. You can use this example + to send commands, such as "*IDN?\n", to your instrument. + +Language: Visual C# + +Required Software: NI-VISA + +Required Hardware: Any message-based device diff --git a/NI-VISA/Examples/.NET/SimpleReadWrite/SelectResource.cs b/NI-VISA/Examples/.NET/SimpleReadWrite/SelectResource.cs new file mode 100644 index 0000000..fe32547 --- /dev/null +++ b/NI-VISA/Examples/.NET/SimpleReadWrite/SelectResource.cs @@ -0,0 +1,190 @@ +using System.Windows.Forms; +using NationalInstruments.Visa; + +namespace NationalInstruments.Examples.SimpleReadWrite +{ + /// + /// Summary description for SelectResource. + /// + public class SelectResource : System.Windows.Forms.Form + { + private System.Windows.Forms.ListBox availableResourcesListBox; + private System.Windows.Forms.Button okButton; + private System.Windows.Forms.Button closeButton; + private System.Windows.Forms.TextBox visaResourceNameTextBox; + private System.Windows.Forms.Label AvailableResourcesLabel; + private System.Windows.Forms.Label ResourceStringLabel; + /// + /// Required designer variable. + /// + private System.ComponentModel.Container components = null; + + public SelectResource() + { + // + // Required for Windows Form Designer support + // + InitializeComponent(); + } + + /// + /// Clean up any resources being used. + /// + protected override void Dispose( bool disposing ) + { + if( disposing ) + { + if(components != null) + { + components.Dispose(); + } + } + base.Dispose( disposing ); + } + + #region Windows Form Designer generated code + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(SelectResource)); + this.availableResourcesListBox = new System.Windows.Forms.ListBox(); + this.okButton = new System.Windows.Forms.Button(); + this.closeButton = new System.Windows.Forms.Button(); + this.visaResourceNameTextBox = new System.Windows.Forms.TextBox(); + this.AvailableResourcesLabel = new System.Windows.Forms.Label(); + this.ResourceStringLabel = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // availableResourcesListBox + // + this.availableResourcesListBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.availableResourcesListBox.Location = new System.Drawing.Point(5, 18); + this.availableResourcesListBox.Name = "availableResourcesListBox"; + this.availableResourcesListBox.Size = new System.Drawing.Size(282, 108); + this.availableResourcesListBox.TabIndex = 0; + this.availableResourcesListBox.DoubleClick += new System.EventHandler(this.availableResourcesListBox_DoubleClick); + this.availableResourcesListBox.SelectedIndexChanged += new System.EventHandler(this.availableResourcesListBox_SelectedIndexChanged); + // + // okButton + // + this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK; + this.okButton.Location = new System.Drawing.Point(5, 187); + this.okButton.Name = "okButton"; + this.okButton.Size = new System.Drawing.Size(77, 25); + this.okButton.TabIndex = 2; + this.okButton.Text = "OK"; + // + // closeButton + // + this.closeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.closeButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.closeButton.Location = new System.Drawing.Point(82, 187); + this.closeButton.Name = "closeButton"; + this.closeButton.Size = new System.Drawing.Size(77, 25); + this.closeButton.TabIndex = 3; + this.closeButton.Text = "Cancel"; + // + // visaResourceNameTextBox + // + this.visaResourceNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.visaResourceNameTextBox.Location = new System.Drawing.Point(5, 157); + this.visaResourceNameTextBox.Name = "visaResourceNameTextBox"; + this.visaResourceNameTextBox.Size = new System.Drawing.Size(282, 20); + this.visaResourceNameTextBox.TabIndex = 4; + this.visaResourceNameTextBox.Text = "GPIB0::2::INSTR"; + // + // AvailableResourcesLabel + // + this.AvailableResourcesLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.AvailableResourcesLabel.Location = new System.Drawing.Point(5, 5); + this.AvailableResourcesLabel.Name = "AvailableResourcesLabel"; + this.AvailableResourcesLabel.Size = new System.Drawing.Size(279, 12); + this.AvailableResourcesLabel.TabIndex = 5; + this.AvailableResourcesLabel.Text = "Available Resources:"; + // + // ResourceStringLabel + // + this.ResourceStringLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.ResourceStringLabel.Location = new System.Drawing.Point(5, 141); + this.ResourceStringLabel.Name = "ResourceStringLabel"; + this.ResourceStringLabel.Size = new System.Drawing.Size(279, 13); + this.ResourceStringLabel.TabIndex = 6; + this.ResourceStringLabel.Text = "Resource String:"; + // + // SelectResource + // + this.AcceptButton = this.okButton; + this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); + this.CancelButton = this.closeButton; + this.ClientSize = new System.Drawing.Size(292, 220); + this.Controls.Add(this.ResourceStringLabel); + this.Controls.Add(this.AvailableResourcesLabel); + this.Controls.Add(this.visaResourceNameTextBox); + this.Controls.Add(this.closeButton); + this.Controls.Add(this.okButton); + this.Controls.Add(this.availableResourcesListBox); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.KeyPreview = true; + this.MaximizeBox = false; + this.MinimumSize = new System.Drawing.Size(177, 247); + this.Name = "SelectResource"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Select Resource"; + this.Load += new System.EventHandler(this.OnLoad); + this.ResumeLayout(false); + + } + #endregion + + + private void OnLoad(object sender, System.EventArgs e) + { + // This example uses an instance of the NationalInstruments.Visa.ResourceManager class to find resources on the system. + // Alternatively, static methods provided by the Ivi.Visa.ResourceManager class may be used when an application + // requires additional VISA .NET implementations. + using (var rmSession = new ResourceManager()) + { + var resources = rmSession.Find("(ASRL|GPIB|TCPIP|USB)?*"); + foreach (string s in resources) + { + availableResourcesListBox.Items.Add(s); + } + } + } + + private void availableResourcesListBox_DoubleClick(object sender, System.EventArgs e) + { + string selectedString = (string)availableResourcesListBox.SelectedItem; + ResourceName = selectedString; + this.DialogResult = DialogResult.OK; + this.Close(); + } + + private void availableResourcesListBox_SelectedIndexChanged(object sender, System.EventArgs e) + { + string selectedString = (string)availableResourcesListBox.SelectedItem; + ResourceName = selectedString; + } + + public string ResourceName + { + get + { + return visaResourceNameTextBox.Text; + } + set + { + visaResourceNameTextBox.Text = value; + } + } + } +} diff --git a/NI-VISA/Examples/.NET/SimpleReadWrite/SelectResource.resx b/NI-VISA/Examples/.NET/SimpleReadWrite/SelectResource.resx new file mode 100644 index 0000000..7e65f4b --- /dev/null +++ b/NI-VISA/Examples/.NET/SimpleReadWrite/SelectResource.resx @@ -0,0 +1,365 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + AAABAAIAICAAAAEAGACoDAAAJgAAADAwAAABABgAqBwAAM4MAAAoAAAAIAAAAEAAAAABABgAAAAAAAAM + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAjn54Xks/YlUudGIvgW43g3E0eGgsZ1cnaFs1i4VwAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////AAD///////8AAP///////wAA//////// + AAD///////8AAP///////wAA//8AB///AAD//AAB//8AAP/wAAB//wAA/+AAAD//AAD/wAAAH/8AAP+A + AAAP/wAA/wAAAAf/AAD+AAAAA/8AAP4AAAAD/wAA/AAAAAH/AAD8AAAAAf8AAPgAAAAA/wAA+AAAAAD/ + AAD4AAAAAP8AAPgAAAAAfwAA+AAAAAB/AADwAAAAAH8AAPAAAAAAfwAA8AAAAAB/AADwAAAAAD8AAPAA + AAAABwAA8AAAAAADAADwAAAAAAEAAIAAAAAAgQAAgAAAAADDAACAAAAAAf8AAIAAAAAB/wAAgAAAAAP/ + AACAAAAAA/8AAIAAAAAH/wAAwAAAAA//AADAAAAAH/8AAMAAAAA//wAA4DgAAP//AADgfAAB//8AAPD/ + gA///wAA////////AAD///////8AAP///////wAA////////AAD///////8AAP///////wAA + + + + Private + + + True + + + 8, 8 + + + (Default) + + + False + + + False + + + SelectResource + + + True + + + 80 + + + False + + + Private + + + False + + + Private + + + Private + + + False + + + Private + + + Private + + + False + + + Private + + + Private + + + False + + + Private + + + Private + + + False + + + Private + + + Private + + + False + + + Private + + \ No newline at end of file diff --git a/NI-VISA/Examples/.NET/SimpleReadWrite/SimpleReadWrite.2010.csproj b/NI-VISA/Examples/.NET/SimpleReadWrite/SimpleReadWrite.2010.csproj new file mode 100644 index 0000000..97d8e83 --- /dev/null +++ b/NI-VISA/Examples/.NET/SimpleReadWrite/SimpleReadWrite.2010.csproj @@ -0,0 +1,123 @@ + + + + Local + 10.0.21006.1 + 2.0 + {B8E8C039-E317-4A83-94BA-BC85DA03F880} + Debug + AnyCPU + App.ico + + + SimpleReadWrite + + + JScript + Grid + IE50 + false + WinExe + NationalInstruments.Examples.SimpleReadWrite + OnBuildSuccess + + + + + v4.0 + + + bin\Debug\ + false + 285212672 + false + + + DEBUG;TRACE;NETFX3_5;NETFX2_0;NETFX4_0 + + + true + 4096 + false + + + false + false + false + false + 4 + AnyCPU + + + bin\Release\ + false + 285212672 + false + + + TRACE;NETFX3_5;NETFX2_0;NETFX4_0 + + + false + 4096 + false + + + true + false + false + false + 4 + AnyCPU + + + + + + System + ..\..\..\..\..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.dll + + + System.Data + ..\..\..\..\..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Data.dll + + + System.Drawing + ..\..\..\..\..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Drawing.dll + + + System.Windows.Forms + ..\..\..\..\..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll + + + System.XML + ..\..\..\..\..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll + + + + + + Code + + + Form + + + Form + + + MainForm.cs + + + SelectResource.cs + + + + + + + + + + + \ No newline at end of file diff --git a/NI-VISA/Examples/.NET/SimpleReadWrite/SimpleReadWrite.2010.sln b/NI-VISA/Examples/.NET/SimpleReadWrite/SimpleReadWrite.2010.sln new file mode 100644 index 0000000..f2ae1dc --- /dev/null +++ b/NI-VISA/Examples/.NET/SimpleReadWrite/SimpleReadWrite.2010.sln @@ -0,0 +1,19 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleReadWrite", "SimpleReadWrite.2010.csproj", "{B8E8C039-E317-4A83-94BA-BC85DA03F880}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B8E8C039-E317-4A83-94BA-BC85DA03F880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B8E8C039-E317-4A83-94BA-BC85DA03F880}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B8E8C039-E317-4A83-94BA-BC85DA03F880}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B8E8C039-E317-4A83-94BA-BC85DA03F880}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/NI-VISA/Examples/.NET/SimpleReadWrite/SimpleReadWrite.2012.csproj b/NI-VISA/Examples/.NET/SimpleReadWrite/SimpleReadWrite.2012.csproj new file mode 100644 index 0000000..bdfd299 --- /dev/null +++ b/NI-VISA/Examples/.NET/SimpleReadWrite/SimpleReadWrite.2012.csproj @@ -0,0 +1,125 @@ + + + + Local + 11.0.50522.1 RCREL + 2.0 + {B8E8C039-E317-4A83-94BA-BC85DA03F880} + Debug + AnyCPU + App.ico + + + SimpleReadWrite + + + JScript + Grid + IE50 + false + WinExe + NationalInstruments.Examples.SimpleReadWrite + OnBuildSuccess + + + + + v4.5 + + + bin\Debug\ + false + 285212672 + false + + + DEBUG;TRACE;NETFX3_5;NETFX2_0;NETFX4_0;NETFX4_5 + + + true + 4096 + false + + + false + false + false + false + 4 + AnyCPU + false + + + bin\Release\ + false + 285212672 + false + + + TRACE;NETFX3_5;NETFX2_0;NETFX4_0;NETFX4_5 + + + false + 4096 + false + + + true + false + false + false + 4 + AnyCPU + false + + + + + + System + ..\..\..\..\..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.dll + + + System.Data + ..\..\..\..\..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Data.dll + + + System.Drawing + ..\..\..\..\..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Drawing.dll + + + System.Windows.Forms + ..\..\..\..\..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll + + + System.XML + ..\..\..\..\..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll + + + + + + Code + + + Form + + + Form + + + MainForm.cs + + + SelectResource.cs + + + + + + + + + + + \ No newline at end of file diff --git a/NI-VISA/Examples/.NET/SimpleReadWrite/SimpleReadWrite.2012.sln b/NI-VISA/Examples/.NET/SimpleReadWrite/SimpleReadWrite.2012.sln new file mode 100644 index 0000000..8ea7b4f --- /dev/null +++ b/NI-VISA/Examples/.NET/SimpleReadWrite/SimpleReadWrite.2012.sln @@ -0,0 +1,19 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleReadWrite", "SimpleReadWrite.2012.csproj", "{B8E8C039-E317-4A83-94BA-BC85DA03F880}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B8E8C039-E317-4A83-94BA-BC85DA03F880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B8E8C039-E317-4A83-94BA-BC85DA03F880}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B8E8C039-E317-4A83-94BA-BC85DA03F880}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B8E8C039-E317-4A83-94BA-BC85DA03F880}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/NI-VISA/Examples/C/Examples_MSVC.dsw b/NI-VISA/Examples/C/Examples_MSVC.dsw new file mode 100644 index 0000000..dc44872 --- /dev/null +++ b/NI-VISA/Examples/C/Examples_MSVC.dsw @@ -0,0 +1,243 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "AsyncIO"=.\GPIB\AsyncIO_MSVC.dsp - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "AsyncIntr"=".\VXI-VME\AsyncIntr_MSVC.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "AsyncSRQ"=.\GPIB\AsyncSRQ_MSVC.dsp - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "FindRsrc"=.\General\FindRsrc_MSVC.dsp - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "HighReg"=".\VXI-VME\HighReg_MSVC.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "Locking"=.\General\Locking_MSVC.dsp - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "LowReg"=".\VXI-VME\LowReg_MSVC.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "RdWrt"=.\General\RdWrt_MSVC.dsp - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "RdWrtSrl"=.\Serial\RdWrtSrl_MSVC.dsp - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ReserveTrig"=.\PXI\ReserveTrig_MSVC.dsp - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "RouteTrig"=.\PXI\RouteTrig_MSVC.dsp - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ShareSys"=".\VXI-VME\ShareSys_MSVC.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "TCPIP"=.\TCPIP\TCPIP_MSVC.dsp - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "WaitIntr"=".\VXI-VME\WaitIntr_MSVC.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "WaitSRQ"=.\GPIB\WaitSRQ_MSVC.dsp - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "WaitTrig"=".\VXI-VME\WaitTrig_MSVC.dsp" - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ + begin source code control + end source code control +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/NI-VISA/Examples/C/Examples_MSVC_VS2005.sln b/NI-VISA/Examples/C/Examples_MSVC_VS2005.sln new file mode 100644 index 0000000..3396dcc --- /dev/null +++ b/NI-VISA/Examples/C/Examples_MSVC_VS2005.sln @@ -0,0 +1,240 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AsyncIO", "Gpib\AsyncIO_MSVC_VS2005.vcproj", "{0DF1F546-0EB8-426B-AE08-3247ACC1F355}" + ProjectSection(WebsiteProperties) = preProject + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.Debug = "False" + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AsyncIntr", "Vxi-vme\AsyncIntr_MSVC_VS2005.vcproj", "{B45A4F23-689C-4756-BCD7-B999BDBB29A5}" + ProjectSection(WebsiteProperties) = preProject + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.Debug = "False" + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AsyncSRQ", "Gpib\AsyncSRQ_MSVC_VS2005.vcproj", "{FB2EAF25-2003-4295-A24B-2869DDF335D8}" + ProjectSection(WebsiteProperties) = preProject + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.Debug = "False" + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FindRsrc", "General\FindRsrc_MSVC_VS2005.vcproj", "{93BA1AE2-1344-4B95-993F-16314E4E1832}" + ProjectSection(WebsiteProperties) = preProject + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.Debug = "False" + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HighReg", "Vxi-vme\HighReg_MSVC_VS2005.vcproj", "{5287D317-A439-4C06-B49C-1D180B7A257B}" + ProjectSection(WebsiteProperties) = preProject + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.Debug = "False" + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Locking", "General\Locking_MSVC_VS2005.vcproj", "{6B2088ED-A867-4708-9067-92E75E092EB5}" + ProjectSection(WebsiteProperties) = preProject + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.Debug = "False" + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LowReg", "Vxi-vme\LowReg_MSVC_VS2005.vcproj", "{4851B238-5BD8-407F-A9C4-B7460E42BCE3}" + ProjectSection(WebsiteProperties) = preProject + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.Debug = "False" + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RdWrt", "General\RdWrt_MSVC_VS2005.vcproj", "{2FA33368-82C2-49B8-AC94-460A34C719C1}" + ProjectSection(WebsiteProperties) = preProject + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.Debug = "False" + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RdWrtSrl", "Serial\RdWrtSrl_MSVC_VS2005.vcproj", "{373DBF7A-ADAD-43D1-B9A1-DDC7421C5B4F}" + ProjectSection(WebsiteProperties) = preProject + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.Debug = "False" + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReserveTrig", "PXI\ReserveTrig_MSVC_VS2005.vcproj", "{10767517-D9FC-4241-9DD9-805ECA12A584}" + ProjectSection(WebsiteProperties) = preProject + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.Debug = "False" + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RouteTrig", "PXI\RouteTrig_MSVC_VS2005.vcproj", "{C00818A7-D55D-48BE-9E32-09389E1DD4EB}" + ProjectSection(WebsiteProperties) = preProject + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.Debug = "False" + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ShareSys", "Vxi-vme\ShareSys_MSVC_VS2005.vcproj", "{E44BBCCF-7F0A-4969-988C-196A2B3EAA98}" + ProjectSection(WebsiteProperties) = preProject + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.Debug = "False" + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TCPIP", "TCPIP\TCPIP_MSVC_VS2005.vcproj", "{02C1C19C-5E65-420B-959C-145A0264F934}" + ProjectSection(WebsiteProperties) = preProject + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.Debug = "False" + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WaitIntr", "Vxi-vme\WaitIntr_MSVC_VS2005.vcproj", "{11155569-0F34-48BB-A2CB-5325486864EB}" + ProjectSection(WebsiteProperties) = preProject + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.Debug = "False" + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WaitSRQ", "Gpib\WaitSRQ_MSVC_VS2005.vcproj", "{5C98A41B-F832-4AE9-BD75-A450FA2A45AA}" + ProjectSection(WebsiteProperties) = preProject + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.Debug = "False" + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WaitTrig", "Vxi-vme\WaitTrig_MSVC_VS2005.vcproj", "{D397112D-1904-4BB2-AEA7-994095BF4A43}" + ProjectSection(WebsiteProperties) = preProject + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.Debug = "False" + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0DF1F546-0EB8-426B-AE08-3247ACC1F355}.Debug|Win32.ActiveCfg = Debug|Win32 + {0DF1F546-0EB8-426B-AE08-3247ACC1F355}.Debug|Win32.Build.0 = Debug|Win32 + {0DF1F546-0EB8-426B-AE08-3247ACC1F355}.Debug|x64.ActiveCfg = Debug|x64 + {0DF1F546-0EB8-426B-AE08-3247ACC1F355}.Debug|x64.Build.0 = Debug|x64 + {0DF1F546-0EB8-426B-AE08-3247ACC1F355}.Release|Win32.ActiveCfg = Release|Win32 + {0DF1F546-0EB8-426B-AE08-3247ACC1F355}.Release|Win32.Build.0 = Release|Win32 + {0DF1F546-0EB8-426B-AE08-3247ACC1F355}.Release|x64.ActiveCfg = Release|x64 + {0DF1F546-0EB8-426B-AE08-3247ACC1F355}.Release|x64.Build.0 = Release|x64 + {B45A4F23-689C-4756-BCD7-B999BDBB29A5}.Debug|Win32.ActiveCfg = Debug|Win32 + {B45A4F23-689C-4756-BCD7-B999BDBB29A5}.Debug|Win32.Build.0 = Debug|Win32 + {B45A4F23-689C-4756-BCD7-B999BDBB29A5}.Debug|x64.ActiveCfg = Debug|x64 + {B45A4F23-689C-4756-BCD7-B999BDBB29A5}.Debug|x64.Build.0 = Debug|x64 + {B45A4F23-689C-4756-BCD7-B999BDBB29A5}.Release|Win32.ActiveCfg = Release|Win32 + {B45A4F23-689C-4756-BCD7-B999BDBB29A5}.Release|Win32.Build.0 = Release|Win32 + {B45A4F23-689C-4756-BCD7-B999BDBB29A5}.Release|x64.ActiveCfg = Release|x64 + {B45A4F23-689C-4756-BCD7-B999BDBB29A5}.Release|x64.Build.0 = Release|x64 + {FB2EAF25-2003-4295-A24B-2869DDF335D8}.Debug|Win32.ActiveCfg = Debug|Win32 + {FB2EAF25-2003-4295-A24B-2869DDF335D8}.Debug|Win32.Build.0 = Debug|Win32 + {FB2EAF25-2003-4295-A24B-2869DDF335D8}.Debug|x64.ActiveCfg = Debug|x64 + {FB2EAF25-2003-4295-A24B-2869DDF335D8}.Debug|x64.Build.0 = Debug|x64 + {FB2EAF25-2003-4295-A24B-2869DDF335D8}.Release|Win32.ActiveCfg = Release|Win32 + {FB2EAF25-2003-4295-A24B-2869DDF335D8}.Release|Win32.Build.0 = Release|Win32 + {FB2EAF25-2003-4295-A24B-2869DDF335D8}.Release|x64.ActiveCfg = Release|x64 + {FB2EAF25-2003-4295-A24B-2869DDF335D8}.Release|x64.Build.0 = Release|x64 + {93BA1AE2-1344-4B95-993F-16314E4E1832}.Debug|Win32.ActiveCfg = Debug|Win32 + {93BA1AE2-1344-4B95-993F-16314E4E1832}.Debug|Win32.Build.0 = Debug|Win32 + {93BA1AE2-1344-4B95-993F-16314E4E1832}.Debug|x64.ActiveCfg = Debug|x64 + {93BA1AE2-1344-4B95-993F-16314E4E1832}.Debug|x64.Build.0 = Debug|x64 + {93BA1AE2-1344-4B95-993F-16314E4E1832}.Release|Win32.ActiveCfg = Release|Win32 + {93BA1AE2-1344-4B95-993F-16314E4E1832}.Release|Win32.Build.0 = Release|Win32 + {93BA1AE2-1344-4B95-993F-16314E4E1832}.Release|x64.ActiveCfg = Release|x64 + {93BA1AE2-1344-4B95-993F-16314E4E1832}.Release|x64.Build.0 = Release|x64 + {5287D317-A439-4C06-B49C-1D180B7A257B}.Debug|Win32.ActiveCfg = Debug|Win32 + {5287D317-A439-4C06-B49C-1D180B7A257B}.Debug|Win32.Build.0 = Debug|Win32 + {5287D317-A439-4C06-B49C-1D180B7A257B}.Debug|x64.ActiveCfg = Debug|x64 + {5287D317-A439-4C06-B49C-1D180B7A257B}.Debug|x64.Build.0 = Debug|x64 + {5287D317-A439-4C06-B49C-1D180B7A257B}.Release|Win32.ActiveCfg = Release|Win32 + {5287D317-A439-4C06-B49C-1D180B7A257B}.Release|Win32.Build.0 = Release|Win32 + {5287D317-A439-4C06-B49C-1D180B7A257B}.Release|x64.ActiveCfg = Release|x64 + {5287D317-A439-4C06-B49C-1D180B7A257B}.Release|x64.Build.0 = Release|x64 + {6B2088ED-A867-4708-9067-92E75E092EB5}.Debug|Win32.ActiveCfg = Debug|Win32 + {6B2088ED-A867-4708-9067-92E75E092EB5}.Debug|Win32.Build.0 = Debug|Win32 + {6B2088ED-A867-4708-9067-92E75E092EB5}.Debug|x64.ActiveCfg = Debug|x64 + {6B2088ED-A867-4708-9067-92E75E092EB5}.Debug|x64.Build.0 = Debug|x64 + {6B2088ED-A867-4708-9067-92E75E092EB5}.Release|Win32.ActiveCfg = Release|Win32 + {6B2088ED-A867-4708-9067-92E75E092EB5}.Release|Win32.Build.0 = Release|Win32 + {6B2088ED-A867-4708-9067-92E75E092EB5}.Release|x64.ActiveCfg = Release|x64 + {6B2088ED-A867-4708-9067-92E75E092EB5}.Release|x64.Build.0 = Release|x64 + {4851B238-5BD8-407F-A9C4-B7460E42BCE3}.Debug|Win32.ActiveCfg = Debug|Win32 + {4851B238-5BD8-407F-A9C4-B7460E42BCE3}.Debug|Win32.Build.0 = Debug|Win32 + {4851B238-5BD8-407F-A9C4-B7460E42BCE3}.Debug|x64.ActiveCfg = Debug|x64 + {4851B238-5BD8-407F-A9C4-B7460E42BCE3}.Debug|x64.Build.0 = Debug|x64 + {4851B238-5BD8-407F-A9C4-B7460E42BCE3}.Release|Win32.ActiveCfg = Release|Win32 + {4851B238-5BD8-407F-A9C4-B7460E42BCE3}.Release|Win32.Build.0 = Release|Win32 + {4851B238-5BD8-407F-A9C4-B7460E42BCE3}.Release|x64.ActiveCfg = Release|x64 + {4851B238-5BD8-407F-A9C4-B7460E42BCE3}.Release|x64.Build.0 = Release|x64 + {2FA33368-82C2-49B8-AC94-460A34C719C1}.Debug|Win32.ActiveCfg = Debug|Win32 + {2FA33368-82C2-49B8-AC94-460A34C719C1}.Debug|Win32.Build.0 = Debug|Win32 + {2FA33368-82C2-49B8-AC94-460A34C719C1}.Debug|x64.ActiveCfg = Debug|x64 + {2FA33368-82C2-49B8-AC94-460A34C719C1}.Debug|x64.Build.0 = Debug|x64 + {2FA33368-82C2-49B8-AC94-460A34C719C1}.Release|Win32.ActiveCfg = Release|Win32 + {2FA33368-82C2-49B8-AC94-460A34C719C1}.Release|Win32.Build.0 = Release|Win32 + {2FA33368-82C2-49B8-AC94-460A34C719C1}.Release|x64.ActiveCfg = Release|x64 + {2FA33368-82C2-49B8-AC94-460A34C719C1}.Release|x64.Build.0 = Release|x64 + {373DBF7A-ADAD-43D1-B9A1-DDC7421C5B4F}.Debug|Win32.ActiveCfg = Debug|Win32 + {373DBF7A-ADAD-43D1-B9A1-DDC7421C5B4F}.Debug|Win32.Build.0 = Debug|Win32 + {373DBF7A-ADAD-43D1-B9A1-DDC7421C5B4F}.Debug|x64.ActiveCfg = Debug|x64 + {373DBF7A-ADAD-43D1-B9A1-DDC7421C5B4F}.Debug|x64.Build.0 = Debug|x64 + {373DBF7A-ADAD-43D1-B9A1-DDC7421C5B4F}.Release|Win32.ActiveCfg = Release|Win32 + {373DBF7A-ADAD-43D1-B9A1-DDC7421C5B4F}.Release|Win32.Build.0 = Release|Win32 + {373DBF7A-ADAD-43D1-B9A1-DDC7421C5B4F}.Release|x64.ActiveCfg = Release|x64 + {373DBF7A-ADAD-43D1-B9A1-DDC7421C5B4F}.Release|x64.Build.0 = Release|x64 + {10767517-D9FC-4241-9DD9-805ECA12A584}.Debug|Win32.ActiveCfg = Debug|Win32 + {10767517-D9FC-4241-9DD9-805ECA12A584}.Debug|Win32.Build.0 = Debug|Win32 + {10767517-D9FC-4241-9DD9-805ECA12A584}.Debug|x64.ActiveCfg = Debug|x64 + {10767517-D9FC-4241-9DD9-805ECA12A584}.Debug|x64.Build.0 = Debug|x64 + {10767517-D9FC-4241-9DD9-805ECA12A584}.Release|Win32.ActiveCfg = Release|Win32 + {10767517-D9FC-4241-9DD9-805ECA12A584}.Release|Win32.Build.0 = Release|Win32 + {10767517-D9FC-4241-9DD9-805ECA12A584}.Release|x64.ActiveCfg = Release|x64 + {10767517-D9FC-4241-9DD9-805ECA12A584}.Release|x64.Build.0 = Release|x64 + {C00818A7-D55D-48BE-9E32-09389E1DD4EB}.Debug|Win32.ActiveCfg = Debug|Win32 + {C00818A7-D55D-48BE-9E32-09389E1DD4EB}.Debug|Win32.Build.0 = Debug|Win32 + {C00818A7-D55D-48BE-9E32-09389E1DD4EB}.Debug|x64.ActiveCfg = Debug|x64 + {C00818A7-D55D-48BE-9E32-09389E1DD4EB}.Debug|x64.Build.0 = Debug|x64 + {C00818A7-D55D-48BE-9E32-09389E1DD4EB}.Release|Win32.ActiveCfg = Release|Win32 + {C00818A7-D55D-48BE-9E32-09389E1DD4EB}.Release|Win32.Build.0 = Release|Win32 + {C00818A7-D55D-48BE-9E32-09389E1DD4EB}.Release|x64.ActiveCfg = Release|x64 + {C00818A7-D55D-48BE-9E32-09389E1DD4EB}.Release|x64.Build.0 = Release|x64 + {E44BBCCF-7F0A-4969-988C-196A2B3EAA98}.Debug|Win32.ActiveCfg = Debug|Win32 + {E44BBCCF-7F0A-4969-988C-196A2B3EAA98}.Debug|Win32.Build.0 = Debug|Win32 + {E44BBCCF-7F0A-4969-988C-196A2B3EAA98}.Debug|x64.ActiveCfg = Debug|x64 + {E44BBCCF-7F0A-4969-988C-196A2B3EAA98}.Debug|x64.Build.0 = Debug|x64 + {E44BBCCF-7F0A-4969-988C-196A2B3EAA98}.Release|Win32.ActiveCfg = Release|Win32 + {E44BBCCF-7F0A-4969-988C-196A2B3EAA98}.Release|Win32.Build.0 = Release|Win32 + {E44BBCCF-7F0A-4969-988C-196A2B3EAA98}.Release|x64.ActiveCfg = Release|x64 + {E44BBCCF-7F0A-4969-988C-196A2B3EAA98}.Release|x64.Build.0 = Release|x64 + {02C1C19C-5E65-420B-959C-145A0264F934}.Debug|Win32.ActiveCfg = Debug|Win32 + {02C1C19C-5E65-420B-959C-145A0264F934}.Debug|Win32.Build.0 = Debug|Win32 + {02C1C19C-5E65-420B-959C-145A0264F934}.Debug|x64.ActiveCfg = Debug|x64 + {02C1C19C-5E65-420B-959C-145A0264F934}.Debug|x64.Build.0 = Debug|x64 + {02C1C19C-5E65-420B-959C-145A0264F934}.Release|Win32.ActiveCfg = Release|Win32 + {02C1C19C-5E65-420B-959C-145A0264F934}.Release|Win32.Build.0 = Release|Win32 + {02C1C19C-5E65-420B-959C-145A0264F934}.Release|x64.ActiveCfg = Release|x64 + {02C1C19C-5E65-420B-959C-145A0264F934}.Release|x64.Build.0 = Release|x64 + {11155569-0F34-48BB-A2CB-5325486864EB}.Debug|Win32.ActiveCfg = Debug|Win32 + {11155569-0F34-48BB-A2CB-5325486864EB}.Debug|Win32.Build.0 = Debug|Win32 + {11155569-0F34-48BB-A2CB-5325486864EB}.Debug|x64.ActiveCfg = Debug|x64 + {11155569-0F34-48BB-A2CB-5325486864EB}.Debug|x64.Build.0 = Debug|x64 + {11155569-0F34-48BB-A2CB-5325486864EB}.Release|Win32.ActiveCfg = Release|Win32 + {11155569-0F34-48BB-A2CB-5325486864EB}.Release|Win32.Build.0 = Release|Win32 + {11155569-0F34-48BB-A2CB-5325486864EB}.Release|x64.ActiveCfg = Release|x64 + {11155569-0F34-48BB-A2CB-5325486864EB}.Release|x64.Build.0 = Release|x64 + {5C98A41B-F832-4AE9-BD75-A450FA2A45AA}.Debug|Win32.ActiveCfg = Debug|Win32 + {5C98A41B-F832-4AE9-BD75-A450FA2A45AA}.Debug|Win32.Build.0 = Debug|Win32 + {5C98A41B-F832-4AE9-BD75-A450FA2A45AA}.Debug|x64.ActiveCfg = Debug|x64 + {5C98A41B-F832-4AE9-BD75-A450FA2A45AA}.Debug|x64.Build.0 = Debug|x64 + {5C98A41B-F832-4AE9-BD75-A450FA2A45AA}.Release|Win32.ActiveCfg = Release|Win32 + {5C98A41B-F832-4AE9-BD75-A450FA2A45AA}.Release|Win32.Build.0 = Release|Win32 + {5C98A41B-F832-4AE9-BD75-A450FA2A45AA}.Release|x64.ActiveCfg = Release|x64 + {5C98A41B-F832-4AE9-BD75-A450FA2A45AA}.Release|x64.Build.0 = Release|x64 + {D397112D-1904-4BB2-AEA7-994095BF4A43}.Debug|Win32.ActiveCfg = Debug|Win32 + {D397112D-1904-4BB2-AEA7-994095BF4A43}.Debug|Win32.Build.0 = Debug|Win32 + {D397112D-1904-4BB2-AEA7-994095BF4A43}.Debug|x64.ActiveCfg = Debug|x64 + {D397112D-1904-4BB2-AEA7-994095BF4A43}.Debug|x64.Build.0 = Debug|x64 + {D397112D-1904-4BB2-AEA7-994095BF4A43}.Release|Win32.ActiveCfg = Release|Win32 + {D397112D-1904-4BB2-AEA7-994095BF4A43}.Release|Win32.Build.0 = Release|Win32 + {D397112D-1904-4BB2-AEA7-994095BF4A43}.Release|x64.ActiveCfg = Release|x64 + {D397112D-1904-4BB2-AEA7-994095BF4A43}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/NI-VISA/Examples/C/General/FindRsrc.c b/NI-VISA/Examples/C/General/FindRsrc.c new file mode 100644 index 0000000..272066c --- /dev/null +++ b/NI-VISA/Examples/C/General/FindRsrc.c @@ -0,0 +1,120 @@ +/*********************************************************************/ +/* This example demonstrates how you might query your system for */ +/* a particular instrument. This example queries for all */ +/* GPIB, serial or VXI instruments. Notice that VISA is able to */ +/* find GPIB and VXI instruments because the instruments have a */ +/* predefined protocol. But serial instruments do not. Hence, */ +/* VISA merely indicates that a serial port is available. */ +/* */ +/* The general flow of the code is */ +/* Open Resource Manager */ +/* Use viFindRsrc() to query for the first available instrument */ +/* Open a session to this device */ +/* Find the next instrument using viFindNext() */ +/* Open a session to this device. */ +/* Loop on finding the next instrument until all have been found*/ +/* Close all VISA Sessions */ +/*********************************************************************/ + + +#include +#include + +#include "visa.h" + +static char instrDescriptor[VI_FIND_BUFLEN]; +static ViUInt32 numInstrs; +static ViFindList findList; +static ViSession defaultRM, instr; +static ViStatus status; + +int main(void) +{ + /* First we will need to open the default resource manager. */ + status = viOpenDefaultRM (&defaultRM); + if (status < VI_SUCCESS) + { + printf("Could not open a session to the VISA Resource Manager!\n"); + exit (EXIT_FAILURE); + } + + /* + * Find all the VISA resources in our system and store the number of resources + * in the system in numInstrs. Notice the different query descriptions a + * that are available. + + Interface Expression + -------------------------------------- + GPIB "GPIB[0-9]*::?*INSTR" + VXI "VXI?*INSTR" + GPIB-VXI "GPIB-VXI?*INSTR" + Any VXI "?*VXI[0-9]*::?*INSTR" + Serial "ASRL[0-9]*::?*INSTR" + PXI "PXI?*INSTR" + All instruments "?*INSTR" + All resources "?*" + */ + status = viFindRsrc (defaultRM, "?*INSTR", &findList, &numInstrs, instrDescriptor); + if (status < VI_SUCCESS) + { + printf ("An error occurred while finding resources.\nHit enter to continue."); + fflush(stdin); + getchar(); + viClose (defaultRM); + return status; + } + + printf("%d instruments, serial ports, and other resources found:\n\n",numInstrs); + printf("%s \n",instrDescriptor); + + /* Now we will open a session to the instrument we just found. */ + status = viOpen (defaultRM, instrDescriptor, VI_NULL, VI_NULL, &instr); + if (status < VI_SUCCESS) + { + printf ("An error occurred opening a session to %s\n",instrDescriptor); + } + else + { + /* Now close the session we just opened. */ + /* In actuality, we would probably use an attribute to determine */ + /* if this is the instrument we are looking for. */ + viClose (instr); + } + + while (--numInstrs) + { + /* stay in this loop until we find all instruments */ + status = viFindNext (findList, instrDescriptor); /* find next desriptor */ + if (status < VI_SUCCESS) + { /* did we find the next resource? */ + printf ("An error occurred finding the next resource.\nHit enter to continue."); + fflush(stdin); + getchar(); + viClose (defaultRM); + return status; + } + printf("%s \n",instrDescriptor); + + /* Now we will open a session to the instrument we just found */ + status = viOpen (defaultRM, instrDescriptor, VI_NULL, VI_NULL, &instr); + if (status < VI_SUCCESS) + { + printf ("An error occurred opening a session to %s\n",instrDescriptor); + } + else + { + /* Now close the session we just opened. */ + /* In actuality, we would probably use an attribute to determine */ + /* if this is the instrument we are looking for. */ + viClose (instr); + } + } /* end while */ + + status = viClose(findList); + status = viClose (defaultRM); + printf ("\nHit enter to continue."); + fflush(stdin); + getchar(); + + return 0; +} diff --git a/NI-VISA/Examples/C/General/FindRsrc_MSVC.dsp b/NI-VISA/Examples/C/General/FindRsrc_MSVC.dsp new file mode 100644 index 0000000..b85010d --- /dev/null +++ b/NI-VISA/Examples/C/General/FindRsrc_MSVC.dsp @@ -0,0 +1,115 @@ +# Microsoft Developer Studio Project File - Name="FindRsrc" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=FindRsrc - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "FindRsrc_MSVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "FindRsrc_MSVC.mak" CFG="FindRsrc - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "FindRsrc - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "FindRsrc - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "FindRsrc - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /machine:I386 /out:"Release/FindRsrc.exe" + +!ELSEIF "$(CFG)" == "FindRsrc - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /debug /machine:I386 /out:"Debug/FindRsrc.exe" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "FindRsrc - Win32 Release" +# Name "FindRsrc - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\FindRsrc.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visa.h +# End Source File +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visatype.h +# End Source File +# End Group +# Begin Group "Library Files" + +# PROP Default_Filter "lib" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\lib\msc\visa32.lib +# End Source File +# End Group +# End Target +# End Project diff --git a/NI-VISA/Examples/C/General/FindRsrc_MSVC_VS2005.vcproj b/NI-VISA/Examples/C/General/FindRsrc_MSVC_VS2005.vcproj new file mode 100644 index 0000000..f4c281f --- /dev/null +++ b/NI-VISA/Examples/C/General/FindRsrc_MSVC_VS2005.vcproj @@ -0,0 +1,501 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NI-VISA/Examples/C/General/Locking.c b/NI-VISA/Examples/C/General/Locking.c new file mode 100644 index 0000000..04455ee --- /dev/null +++ b/NI-VISA/Examples/C/General/Locking.c @@ -0,0 +1,211 @@ +/********************************************************************/ +/* This example demonstrates VISA locking */ +/* */ +/* In VISA, applications can open multiple sessions to the same */ +/* resource simultaneously and access that resource through these */ +/* different sessions concurrently. */ +/* In some cases, an application may need to restrict other */ +/* sessions from accessing that resource. */ +/* For example, an application may need to execute a write and a */ +/* read operation as an atomic operation so that no other */ +/* operations intervene between the write and read operations. */ +/* If another application or even this same application were to */ +/* perform another write between this first write and read, then it */ +/* could put the instrument in an unstable state. */ +/* This is where locking becomes convenient. The application can */ +/* lock the resource before invoking the write operation and unlock */ +/* it after the read operation, to execute them as a single step. */ +/* This prevents other applications from accessing the resource */ +/* and prevents possible contention. VISA defines locking */ +/* to restrict accesses to resources for such special circumstances.*/ +/* */ +/* The VISA locking mechanism enforces arbitration of accesses to */ +/* resources on an individual basis. If a session locks a resource, */ +/* operations invoked by other sessions are returned with an error. */ +/* */ +/* This VI opens two sessions to an instrument and locks the first */ +/* session. The first session then writes the String to Write to */ +/* the instrument and reads a response of the desired length. */ +/* */ +/* The second session tries to do the same task but will not */ +/* succeed unless the first session is unlocked. */ +/* */ +/* The general flow of the code is */ +/* Open Resource Manager */ +/* Open 2 VISA sessions to an instrument */ +/* Lock the first session */ +/* Read and write to that instrument using the first session */ +/* Unlock the first session */ +/* Now read and write to the instrument with the second session*/ +/* Close the VISA Sessions */ +/********************************************************************/ + +#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +/* Functions like strcpy are technically not secure because they do */ +/* not contain a 'length'. But we disable this warning for the VISA */ +/* examples since we never copy more than the actual buffer size. */ +#define _CRT_SECURE_NO_DEPRECATE +#endif + +#include +#include +#include + +#include "visa.h" + +static ViSession defaultRM; +static ViSession instr1, instr2; +static ViUInt32 retCount; +static ViUInt32 writeCount; +static ViStatus status; +static unsigned char buffer[100]; +static int cchar; +static char stringinput[512]; + + +int main (void) +{ + /* + * First we must call viOpenDefaultRM to get the resource manager + * handle. We will store this handle in defaultRM. + */ + status=viOpenDefaultRM (&defaultRM); + if (status < VI_SUCCESS) + { + printf("Could not open a session to the VISA Resource Manager!\n"); + exit (EXIT_FAILURE); + } + + /* + * Now we will open a session to a GPIB instrument at address 2. + * We must use the handle from viOpenDefaultRM and we must + * also use a string that indicates which instrument to open. This + * is called the instrument descriptor. The format for this string + * can be found in the function panel by right clicking on the + * description parameter. After opening a session to the + * device, we will get a handle to the instrument which we + * will use in later Visa functions. The two parameters in this + * function which are reserved for future functionality. + * These two parameters are given the value VI_NULL. + */ + status = viOpen (defaultRM, "GPIB0::2::INSTR", VI_NULL, VI_NULL, &instr1); + if (status < VI_SUCCESS) + { + printf ("Cannot open a session to the device.\n"); + goto Close; + } + + /* + * Now we will open another session to a GPIB instrument at address 2. + */ + status = viOpen (defaultRM, "GPIB0::2::INSTR", VI_NULL, VI_NULL, &instr2); + if (status < VI_SUCCESS) + { + printf ("Cannot open a second session to the device.\n"); + goto Close; + } + + /* + * Now we will lock the first session to the resource using the + * viLock function. Notice that the locking command takes a parameter + * which can be set to VI_EXCLUSIVE_LOCK or VI_SHARED_LOCK. The exclusive + * lock will only let that session access the device until the + * lock is released. The shared locking option uses the last two parameters + * which are set to VI_NULL for the exclusive lock. The first of these + * is a requested access key for the shared lock. The last parameter is + * a return value with the actual key assigned to the lock. If the shared + * lock is used the return actual key value can be used by another session + * for the actual key parameter to gain access to the locked resource. + * Please refer to the NI-VISA User Manual for more information. + */ + status = viLock (instr1, VI_EXCLUSIVE_LOCK, VI_TMO_IMMEDIATE, VI_NULL, VI_NULL); + if (status < VI_SUCCESS) + { + printf("Error locking the session"); + goto Close; + } + + + /* + * Now we will write the string "*IDN?\n" to the device and read back the + * Response from the session that obtained a lock on the resource + */ + strcpy(stringinput,"*IDN?\n"); + status = viWrite (instr1, (ViBuf)stringinput, (ViUInt32)strlen(stringinput), &writeCount); + if (status < VI_SUCCESS) + { + printf("Error writing to the device\n"); + goto Close; + } + + /* + * Now we will attempt to read back a response from the device to + * the identification query that was sent. We will use the viRead + * function to acquire the data. We will try to read back 100 bytes. + * After the data has been read the response is displayed. + */ + status = viRead (instr1, buffer, 100, &retCount); + if (status < VI_SUCCESS) + { + printf("Error reading a response from the device\n"); + goto Close; + } + else + { + printf("\nData read: %*s\n",retCount,buffer); + } + + /* + * Now we will ask the user if they want to unlock the resource. + * Then we will try the same operations with the second session. If the + * resource is not unlocked these operations will fail as would any attempts + * to modify global attributes by the second session. + */ + printf("Do you wish to unlock the resource so the second session can also access it(y/n)?\n"); + cchar = getchar (); + if (cchar == 'y' || cchar == 'Y') + { + status = viUnlock (instr1); + if (status < VI_SUCCESS) + { + printf("Error unlocking the resource\n"); + goto Close; + } + } + + /* + * Now we will attempt the same read and write sequence we attempted with the first + * session. If the lock was not removed this will fail + */ + status = viWrite (instr2, (ViBuf)stringinput, (ViUInt32)strlen(stringinput), &writeCount); + if (status == VI_ERROR_RSRC_LOCKED) + { + printf("The resource is locked you can't write to it!\n"); + } + + /* + * Now we will attempt to read back a response from the device to + * the identification query that was sent. We will use the viRead + * function to acquire the data. We will try to read back 100 bytes. + * After the data has been read the response is displayed. + */ + status = viRead (instr2, buffer, 100, &retCount); + if (status == VI_ERROR_RSRC_LOCKED) + { + printf("The resource is still locked you can't read from it!\n"); + } + else + { + printf("\nData read: %*s\n",retCount,buffer); + } + +Close: + status = viClose(instr1); + status = viClose(instr2); + status = viClose(defaultRM); + printf("Finished closing sessions.\nHit enter to continue.\n"); + fflush(stdin); + getchar(); + + return 0; +} diff --git a/NI-VISA/Examples/C/General/Locking_MSVC.dsp b/NI-VISA/Examples/C/General/Locking_MSVC.dsp new file mode 100644 index 0000000..ff98d15 --- /dev/null +++ b/NI-VISA/Examples/C/General/Locking_MSVC.dsp @@ -0,0 +1,115 @@ +# Microsoft Developer Studio Project File - Name="Locking" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=Locking - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Locking_MSVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Locking_MSVC.mak" CFG="Locking - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Locking - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "Locking - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Locking - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /machine:I386 /out:"Release/Locking.exe" + +!ELSEIF "$(CFG)" == "Locking - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /debug /machine:I386 /out:"Debug/Locking.exe" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "Locking - Win32 Release" +# Name "Locking - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\Locking.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visa.h +# End Source File +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visatype.h +# End Source File +# End Group +# Begin Group "Library Files" + +# PROP Default_Filter "lib" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\lib\msc\visa32.lib +# End Source File +# End Group +# End Target +# End Project diff --git a/NI-VISA/Examples/C/General/Locking_MSVC_VS2005.vcproj b/NI-VISA/Examples/C/General/Locking_MSVC_VS2005.vcproj new file mode 100644 index 0000000..bf36e0b --- /dev/null +++ b/NI-VISA/Examples/C/General/Locking_MSVC_VS2005.vcproj @@ -0,0 +1,501 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NI-VISA/Examples/C/General/RdWrt.c b/NI-VISA/Examples/C/General/RdWrt.c new file mode 100644 index 0000000..6806c91 --- /dev/null +++ b/NI-VISA/Examples/C/General/RdWrt.c @@ -0,0 +1,136 @@ +/********************************************************************/ +/* Read and Write to an Instrument Example */ +/* */ +/* This code demonstrates synchronous read and write commands to a */ +/* GPIB, serial or message-based VXI instrument using VISA. */ +/* */ +/* The general flow of the code is */ +/* Open Resource Manager */ +/* Open VISA Session to an Instrument */ +/* Write the Identification Query Using viWrite */ +/* Try to Read a Response With viRead */ +/* Close the VISA Session */ +/********************************************************************/ + +#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +/* Functions like strcpy are technically not secure because they do */ +/* not contain a 'length'. But we disable this warning for the VISA */ +/* examples since we never copy more than the actual buffer size. */ +#define _CRT_SECURE_NO_DEPRECATE +#endif + +#include +#include +#include + +#include "visa.h" + +static ViSession defaultRM; +static ViSession instr; +static ViStatus status; +static ViUInt32 retCount; +static ViUInt32 writeCount; +static unsigned char buffer[100]; +static char stringinput[512]; + +/* +* In every source code or header file that you use it is necessary to prototype +* your VISA variables at the beginning of the file. You need to declare the VISA +* session, VISA integers, VISA strings, VISA pointers, and VISA floating variables. +* Remember that if you are prototyping variables that are to be used as part of the +* VISA session that need this prototyping. As an example, above retCount has been +* prototyped as a static variable to this particular module. It is an integer of +* bit length 32. If you are uncertain how to declare your VISA prototypes refer +* to the VISA help under the Section titled Type Assignments Table. The VISA +* help is located in your NI-VISA directory or folder. +*/ + +int main(void) +{ + /* + * First we must call viOpenDefaultRM to get the resource manager + * handle. We will store this handle in defaultRM. + */ + status=viOpenDefaultRM (&defaultRM); + if (status < VI_SUCCESS) + { + printf("Could not open a session to the VISA Resource Manager!\n"); + exit (EXIT_FAILURE); + } + + /* + * Now we will open a VISA session to a device at Primary Address 2. + * You can use any address for your instrument. In this example we are + * using GPIB Primary Address 2. + * + * We must use the handle from viOpenDefaultRM and we must + * also use a string that indicates which instrument to open. This + * is called the instrument descriptor. The format for this string + * can be found in the NI-VISA User Manual. + * After opening a session to the device, we will get a handle to + * the instrument which we will use in later VISA functions. + * The two parameters in this function which are left blank are + * reserved for future functionality. These two parameters are + * given the value VI_NULL. + * + * This example will also work for serial or VXI instruments by changing + * the instrument descriptor from GPIB0::2::INSTR to ASRL1::INSTR or + * VXI0::2::INSTR depending on the necessary descriptor for your + * instrument. + */ + status = viOpen (defaultRM, "GPIB0::2::INSTR", VI_NULL, VI_NULL, &instr); + if (status < VI_SUCCESS) + { + printf ("Cannot open a session to the device.\n"); + goto Close; + } + + /* + * Set timeout value to 5000 milliseconds (5 seconds). + */ + status = viSetAttribute (instr, VI_ATTR_TMO_VALUE, 5000); + + /* + * At this point we now have a session open to the instrument at + * Primary Address 2. We can use this session handle to write + * an ASCII command to the instrument. We will use the viWrite function + * to send the string "*IDN?", asking for the device's identification. + */ + strcpy(stringinput,"*IDN?"); + status = viWrite (instr, (ViBuf)stringinput, (ViUInt32)strlen(stringinput), &writeCount); + if (status < VI_SUCCESS) + { + printf("Error writing to the device\n"); + goto Close; + } + + /* + * Now we will attempt to read back a response from the device to + * the identification query that was sent. We will use the viRead + * function to acquire the data. We will try to read back 100 bytes. + * After the data has been read the response is displayed. + */ + status = viRead (instr, buffer, 100, &retCount); + if (status < VI_SUCCESS) + { + printf("Error reading a response from the device\n"); + } + else + { + printf("Data read: %*s\n",retCount,buffer); + } + + + /* + * Now we will close the session to the instrument using + * viClose. This operation frees all system resources. + */ +Close: + printf("Closing Sessions\nHit enter to continue."); + fflush(stdin); + getchar(); + status = viClose(instr); + status = viClose(defaultRM); + + return 0; +} diff --git a/NI-VISA/Examples/C/General/RdWrt_MSVC.dsp b/NI-VISA/Examples/C/General/RdWrt_MSVC.dsp new file mode 100644 index 0000000..978425a --- /dev/null +++ b/NI-VISA/Examples/C/General/RdWrt_MSVC.dsp @@ -0,0 +1,115 @@ +# Microsoft Developer Studio Project File - Name="RdWrt" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=RdWrt - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "RdWrt_MSVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "RdWrt_MSVC.mak" CFG="RdWrt - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "RdWrt - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "RdWrt - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "RdWrt - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /machine:I386 /out:"Release/RdWrt.exe" + +!ELSEIF "$(CFG)" == "RdWrt - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /debug /machine:I386 /out:"Debug/RdWrt.exe" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "RdWrt - Win32 Release" +# Name "RdWrt - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\RdWrt.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visa.h +# End Source File +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visatype.h +# End Source File +# End Group +# Begin Group "Library Files" + +# PROP Default_Filter "lib" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\lib\msc\visa32.lib +# End Source File +# End Group +# End Target +# End Project diff --git a/NI-VISA/Examples/C/General/RdWrt_MSVC_VS2005.vcproj b/NI-VISA/Examples/C/General/RdWrt_MSVC_VS2005.vcproj new file mode 100644 index 0000000..1418353 --- /dev/null +++ b/NI-VISA/Examples/C/General/RdWrt_MSVC_VS2005.vcproj @@ -0,0 +1,501 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NI-VISA/Examples/C/Gpib/AsyncIO.c b/NI-VISA/Examples/C/Gpib/AsyncIO.c new file mode 100644 index 0000000..4c93ada --- /dev/null +++ b/NI-VISA/Examples/C/Gpib/AsyncIO.c @@ -0,0 +1,177 @@ +/**************************************************************************/ +/* Asynchronous I/O Completion Example */ +/* */ +/* This example shows how to use an asynchronous event handling function */ +/* that is called when an asynchronous input/output operation completes. */ +/* Compare this to viRead and viWrite which block the application until */ +/* either the call returns successfully or a timeout occurs. Read and */ +/* write operations can be quite slow sometimes, so these asynchronous */ +/* operations will allow you processor to perform other tasks. */ +/* The code uses VISA functions and sets a flag in the callback upon */ +/* completion of an asynchronous read from a GPIB device to break out of */ +/* an otherwise infinite loop. The flow of the code is as follows: */ +/* */ +/* Open A Session To The VISA Resource Manager */ +/* Open A Session To A GPIB Device */ +/* Install A Handler For Asynchronous IO Completion Events */ +/* Enable Asynchronous IO Completion Events */ +/* Write A Command To The Instrument */ +/* Call The Asynchronous Read Command */ +/* Start A Loop That Can Only Be Broken By A Handler Flag Or Timeout */ +/* Print Out The Returned Data */ +/* Close The Instrument Session */ +/* Close The Resource Manager Session */ +/**************************************************************************/ + +#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +/* Functions like strcpy are technically not secure because they do */ +/* not contain a 'length'. But we disable this warning for the VISA */ +/* examples since we never copy more than the actual buffer size. */ +#define _CRT_SECURE_NO_DEPRECATE +#endif + +#include +#include +#include + +#include "visa.h" + +/* Prototype for the event handler for asynchronous i/o completion */ +ViStatus _VI_FUNCH AsyncHandler(ViSession vi, ViEventType etype, ViEvent event, ViAddr userHandle); + +#define READ_BUFFER_SIZE 4096 + +static ViJobId job; +static unsigned char data[READ_BUFFER_SIZE]; +static ViAddr uhandle; +static ViStatus status, StatusSession; +static ViSession inst, Sessionparam; +static ViEventType EventTypeparam; +static ViAddr Addressparam; +static ViUInt32 BytesToWrite; +static ViSession defaultRM; +static ViUInt32 rcount, RdCount; +static volatile ViBoolean stopflag = VI_FALSE; +static int letter; +static char stringinput[256]; + +/* + * The handler function. The instrument session, the type of event, and a + * handle to the event are passed to the function along with a user handle + * which is basically a label that could be used to reference the handler. + * The only thing done in the handler is to set a flag that allows the + * program to finish. Always return VI_SUCCESS from your handler. + */ +ViStatus _VI_FUNCH AsyncHandler(ViSession vi, ViEventType etype, ViEvent event, ViAddr userHandle) +{ + Sessionparam = vi; + EventTypeparam = etype; + Addressparam = userHandle; + viGetAttribute (event, VI_ATTR_STATUS, &StatusSession); + viGetAttribute (event, VI_ATTR_RET_COUNT, &RdCount); + stopflag = VI_TRUE; + return VI_SUCCESS; +} + + +int main (void) +{ + /* + * First we open a session to the VISA resource manager. We are + * returned a handle to the resource manager session that we must + * use to open sessions to specific instruments. + */ + status = viOpenDefaultRM (&defaultRM); + if (status < VI_SUCCESS) + { + printf("Could not open a session to the VISA Resource Manager!\n"); + exit (EXIT_FAILURE); + } + + /* + * Next we use the resource manager handle to open a session to a + * GPIB instrument at device 2. A handle to this session is + * returned in the handle inst. Please consult the NI-VISA User Manual + * for the syntax for using other instruments. + */ + status = viOpen (defaultRM, "GPIB::2::INSTR", VI_NULL, VI_NULL, &inst); + + /* + * Now we install the handler for asynchronous i/o completion events. + * To install the handler, we must pass our instrument session, the type of + * event to handle, the handler function name and a user handle + * which acts as a handle to the handler function. + */ + status = viInstallHandler (inst, VI_EVENT_IO_COMPLETION, AsyncHandler, uhandle); + + /* Now we must actually enable the I/O completion event so that our + * handler will see the events. Note, one of the parameters is + * VI_HNDLR indicating that we want the events to be handled by + * an asynchronous event handler. The alternate mechanism for handling + * events is to queue them and read events off of the queue when + * you want to check them in your program. + */ + status = viEnableEvent (inst, VI_EVENT_IO_COMPLETION, VI_HNDLR, VI_NULL); + + /* + * Now the VISA write command is used to send a request to the + * instrument to generate a sine wave. This demonstrates the + * synchronous read operation that blocks the application until viRead() + * returns. Note that the command syntax is instrument specific. + */ + + /* + * Here you specify which string you wish to send to your instrument. + * The command listed below is device specific. You may have to change + * command to accommodate your instrument. + */ + strcpy(stringinput,"SOUR:FUNC SIN; SENS: DATA?\n"); + BytesToWrite = (ViUInt32)strlen(stringinput); + status = viWrite (inst, (ViBuf)stringinput,BytesToWrite, &rcount); + + /* + * Next the asynchronous read command is called to read back the + * date from the instrument. Immediately after this is called + * the program goes into a loop which will terminate + * on an i/o completion event triggering the asynchronous callback. + * Note that the asynchronous read command returns a job id that is + * a handle to the asynchronous command. We can use this handle + * to terminate the read if too much time has passed. + */ + status = viReadAsync (inst, data, READ_BUFFER_SIZE - 1, &job); + + printf("\n\nHit enter to continue."); + letter = getchar(); + + /* + * If the asynchronous callback was called and the flag was set + * we print out the returned data otherwise we terminate the + * asynchronous job. + */ + if (stopflag == VI_TRUE) + { + /* RdCount was set in the callback */ + /* Add a NULL terminator to the read buffer */ + data[RdCount] = '\0'; + printf ("Here is the data: %s", data); + } + else + { + status = viTerminate (inst, VI_NULL, job); + printf("The asynchronous read did not complete.\n"); + } + + printf ("\nHit enter to continue."); + fflush(stdin); + getchar(); + + /* + * Now we close the instrument session and the resource manager + * session to free up resources. + */ + status = viClose(inst); + status = viClose(defaultRM); + + return 0; +} + diff --git a/NI-VISA/Examples/C/Gpib/AsyncIO_MSVC.dsp b/NI-VISA/Examples/C/Gpib/AsyncIO_MSVC.dsp new file mode 100644 index 0000000..b04ece2 --- /dev/null +++ b/NI-VISA/Examples/C/Gpib/AsyncIO_MSVC.dsp @@ -0,0 +1,115 @@ +# Microsoft Developer Studio Project File - Name="AsyncIO" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=AsyncIO - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "AsyncIO_MSVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "AsyncIO_MSVC.mak" CFG="AsyncIO - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "AsyncIO - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "AsyncIO - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "AsyncIO - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /machine:I386 /out:"Release/AsyncIO.exe" + +!ELSEIF "$(CFG)" == "AsyncIO - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /debug /machine:I386 /out:"Debug/AsyncIO.exe" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "AsyncIO - Win32 Release" +# Name "AsyncIO - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\AsyncIO.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visa.h +# End Source File +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visatype.h +# End Source File +# End Group +# Begin Group "Library Files" + +# PROP Default_Filter "lib" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\lib\msc\visa32.lib +# End Source File +# End Group +# End Target +# End Project diff --git a/NI-VISA/Examples/C/Gpib/AsyncIO_MSVC_VS2005.vcproj b/NI-VISA/Examples/C/Gpib/AsyncIO_MSVC_VS2005.vcproj new file mode 100644 index 0000000..5e29c39 --- /dev/null +++ b/NI-VISA/Examples/C/Gpib/AsyncIO_MSVC_VS2005.vcproj @@ -0,0 +1,501 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NI-VISA/Examples/C/Gpib/AsyncSRQ.c b/NI-VISA/Examples/C/Gpib/AsyncSRQ.c new file mode 100644 index 0000000..6d8d69f --- /dev/null +++ b/NI-VISA/Examples/C/Gpib/AsyncSRQ.c @@ -0,0 +1,202 @@ +/**************************************************************************/ +/* Asynchronous SRQ Event Handling Example */ +/* */ +/* This example shows how to use an asynchronous event handling function */ +/* that is called when a service request (SRQ) is issued. */ +/* This code uses VISA functions and sets a flag in the handler for the */ +/* occurrence of a service request from a GPIB device to break out of */ +/* an otherwise infinite loop. The flow of the code is as follows: */ +/* */ +/* Open A Session To The VISA Resource Manager */ +/* Open A Session To A GPIB Device */ +/* Install An Event Handler For SRQ Events */ +/* Enable SRQ Events */ +/* Write A Command To The Instrument To Cause It To Generate An SRQ */ +/* Start An Infinite Loop That Can Only Be Stopped By A Handler Flag */ +/* Print Out The Data */ +/* Close The Instrument Session */ +/* Close The Resource Manager Session */ +/**************************************************************************/ + +#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +/* Functions like strcpy are technically not secure because they do */ +/* not contain a 'length'. But we disable this warning for the VISA */ +/* examples since we never copy more than the actual buffer size. */ +#define _CRT_SECURE_NO_DEPRECATE +#endif + +#include +#include +#include + +#include "visa.h" + +/* Prototype for the SRQ event handler */ +ViStatus _VI_FUNCH SRQhandler(ViSession vi, ViEventType etype, ViEvent event, ViAddr userHandle); + +#define READ_BUFFER_SIZE 4096 + +static unsigned char data[READ_BUFFER_SIZE]; +static ViAddr uhandle; +static ViStatus status; +static ViUInt32 BytesToRead; +static ViSession inst; +static ViSession defaultRM; +static ViSession Sessionparam; +static ViEventType EventTypeparam; +static ViAddr Addressparam; +static ViUInt32 rcount, rdcount=0; +static volatile ViBoolean stopflag = VI_FALSE; +static int letter; +static char stringinput[256]; + + +/* + * The instrument session, the type of event, and a handle to the event are + * passed to the event handler function along with a user handle which is basically a + * label that could be used to reference the handler. + * First, the event handler calls viReadSTB() to get the serial poll byte from the + * instrument. With GPIB SRQ events, viReadSTB() must be called otherwise + * later SRQ events will not be detected. The handler then reads in the + * data to a global variable and sets a flag that allows the program to + * finish. This is an instrument specific implementation that requires + * viWrite() and viRead() to be called here. Always return VI_SUCCESS from your handler. + */ +ViStatus _VI_FUNCH SRQhandler(ViSession vi, ViEventType etype, ViEvent event, ViAddr userHandle) +{ + ViUInt16 stb; + + Sessionparam = vi; + EventTypeparam = etype; + Addressparam = userHandle; + + status = viReadSTB (inst, &stb); + strcpy (stringinput,"SENS: DATA?\n"); + status = viWrite (vi, (ViBuf)stringinput, (ViUInt32)strlen(stringinput), &rcount); + BytesToRead = READ_BUFFER_SIZE - 1; + status = viRead (vi, data, BytesToRead, &rdcount); + stopflag = VI_TRUE; + + return VI_SUCCESS; +} + + +int main(void) +{ + /* + * First we open a session to the VISA resource manager. We are + * returned a handle to the resource manager session that we must + * use to open sessions to specific instruments. + */ + status = viOpenDefaultRM (&defaultRM); + if (status < VI_SUCCESS) + { + printf("Could not open a session to the VISA Resource Manager!\n"); + exit (EXIT_FAILURE); + } + + /* + * Next we use the resource manager handle to open a session to a + * GPIB instrument at address 2. A handle to this session is + * returned in the handle inst. + */ + status = viOpen (defaultRM, "GPIB::2::INSTR", VI_NULL, VI_NULL, &inst); + if (status < VI_SUCCESS) + { + printf("Could not open a session to the device simulator\nHit enter to continue."); + fflush(stdin); + getchar(); + goto Close; + } + + /* + * Now we install the handler for service request events. + * We must pass our instrument session to the handler, the type of + * event to handle, the handler function name and a user handle + * which acts as a user-defined handle passed to the handler + * function. + */ + status = viInstallHandler (inst, VI_EVENT_SERVICE_REQ, SRQhandler, uhandle); + if (status < VI_SUCCESS) + { + printf("The event handler could not be successfully installed.\nHit enter to continue."); + fflush(stdin); + getchar(); + goto Close; + } + + /* Now we must actually enable the service request event so that our + * handler will see the events. Note that one of the parameters is + * VI_HNDLR indicating that we want the SRQ events to be handled by + * an asynchronous handler. The alternate mechanism for handling + * events is to queue them and read events from the queue when + * you want to dequeue them in your program. + */ + status = viEnableEvent (inst, VI_EVENT_SERVICE_REQ, VI_HNDLR, VI_NULL); + if (status < VI_SUCCESS) + { + printf("The SRQ event could not be enabled.\nHit enter to continue."); + fflush(stdin); + getchar(); + goto Close; + } + + /* + * Now the VISA write function is used to instruct the + * instrument to generate a sine wave and assert the SRQ line + * when it is finished. Notice that this is specific to one + * particular instrument. + */ + strcpy (stringinput,"*ESE 0x01; *SRE 0x20; SOUR:FUNC SIN; *OPC\n"); + status = viWrite (inst, (ViBuf)stringinput, (ViUInt32)strlen(stringinput), &rcount); + + printf("The program has passed all of the other status tests.\n"); + if (status < VI_SUCCESS) + { + printf("Error writing to the instrument.\nHit enter to continue."); + fflush(stdin); + getchar(); + goto Close; + + } + + /* + * Now the program goes into a wait loop which will only terminate + * if a service request event triggers the asynchronous callback. + */ + printf("Hit enter to continue."); + letter = getchar(); + + /* + * If the asynchronous event handler was called, then stopflag was set. + * Now, we print out the data read back. + */ + if (stopflag == VI_TRUE) + { + /* rdcount was set in callback */ + /* Add a NULL terminator to the read buffer */ + data[rdcount] = '\0'; + printf ("Here is the data %s\n", data); + printf ("Hit enter to continue."); + fflush(stdin); + getchar(); + } + + /* + * Now we must uninstall the event handler, and close the session to + * the instrument and the session to the resource manager. + */ + status = viUninstallHandler (inst, VI_EVENT_SERVICE_REQ, SRQhandler, uhandle); + if (status < VI_SUCCESS) + { + printf("There was an error uninstalling the handler.\nHit enter to continue."); + fflush(stdin); + getchar(); + } + +Close: + status = viClose (inst); + status = viClose (defaultRM); + return 0; +} + diff --git a/NI-VISA/Examples/C/Gpib/AsyncSRQ_MSVC.dsp b/NI-VISA/Examples/C/Gpib/AsyncSRQ_MSVC.dsp new file mode 100644 index 0000000..df77bbe --- /dev/null +++ b/NI-VISA/Examples/C/Gpib/AsyncSRQ_MSVC.dsp @@ -0,0 +1,115 @@ +# Microsoft Developer Studio Project File - Name="AsyncSRQ" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=AsyncSRQ - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "AsyncSRQ_MSVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "AsyncSRQ_MSVC.mak" CFG="AsyncSRQ - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "AsyncSRQ - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "AsyncSRQ - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "AsyncSRQ - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /machine:I386 /out:"Release/AsyncSRQ.exe" + +!ELSEIF "$(CFG)" == "AsyncSRQ - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /debug /machine:I386 /out:"Debug/AsyncSRQ.exe" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "AsyncSRQ - Win32 Release" +# Name "AsyncSRQ - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\AsyncSRQ.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visa.h +# End Source File +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visatype.h +# End Source File +# End Group +# Begin Group "Library Files" + +# PROP Default_Filter "lib" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\lib\msc\visa32.lib +# End Source File +# End Group +# End Target +# End Project diff --git a/NI-VISA/Examples/C/Gpib/AsyncSRQ_MSVC_VS2005.vcproj b/NI-VISA/Examples/C/Gpib/AsyncSRQ_MSVC_VS2005.vcproj new file mode 100644 index 0000000..c8eabed --- /dev/null +++ b/NI-VISA/Examples/C/Gpib/AsyncSRQ_MSVC_VS2005.vcproj @@ -0,0 +1,501 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NI-VISA/Examples/C/Gpib/WaitSRQ.c b/NI-VISA/Examples/C/Gpib/WaitSRQ.c new file mode 100644 index 0000000..c0f3424 --- /dev/null +++ b/NI-VISA/Examples/C/Gpib/WaitSRQ.c @@ -0,0 +1,166 @@ +/**************************************************************************/ +/* Synchronous SRQ Event Handling Example */ +/* */ +/* This example shows how to enable VISA to detect SRQ events. */ +/* The program writes a command to a device and then waits to receive */ +/* an SRQ event before trying to read the response. */ +/* */ +/* Open A Session To The VISA Resource Manager */ +/* Open A Session To A GPIB Device */ +/* Enable SRQ Events */ +/* Write A Command To The Instrument */ +/* Wait to receive an SRQ event */ +/* Read the Data */ +/* Print Out The Data */ +/* Close The Instrument Session */ +/* Close The Resource Manager Session */ +/**************************************************************************/ + +#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +/* Functions like strcpy are technically not secure because they do */ +/* not contain a 'length'. But we disable this warning for the VISA */ +/* examples since we never copy more than the actual buffer size. */ +#define _CRT_SECURE_NO_DEPRECATE +#endif + +#include +#include +#include + +#include "visa.h" + +static ViSession inst; +static ViSession defaultRM; +static ViUInt32 WaitTimeout = 30000; /* Timeout in milliseconds */ +static ViEvent ehandle; +static ViEventType etype; +static ViStatus status; +static ViUInt32 rcount; +static ViUInt16 statusByte; +static unsigned char data[3000]; +static char stringinput[512], nextstringinput[512]; + +int main(void) +{ + /* + * First we open a session to the VISA resource manager. We are + * returned a handle to the resource manager session that we must + * use to open sessions to specific instruments. + */ + status = viOpenDefaultRM (&defaultRM); + if (status < VI_SUCCESS) + { + printf("Could not open a session to the VISA Resource Manager!\n"); + exit (EXIT_FAILURE); + } + + /* + * Next we use the resource manager handle to open a session to a + * GPIB instrument at address 2. A handle to this session is + * returned in the handle inst. + */ + status = viOpen (defaultRM, "GPIB::2::INSTR", VI_NULL, VI_NULL, &inst); + if (status < VI_SUCCESS) + { + printf("Could not open a session to the device simulator"); + goto Close; + } + + + /* Now we must enable the service request event so that VISA + * will receive the events. Note: one of the parameters is + * VI_QUEUE indicating that we want the events to be handled by + * a synchronous event queue. The alternate mechanism for handling + * events is to set up an asynchronous event handling function using + * the VI_HNDLR option. The events go into a queue which by default + * can hold 50 events. This maximum queue size can be changed with + * an attribute but it must be called before the events are enabled. + */ + status = viEnableEvent (inst, VI_EVENT_SERVICE_REQ, VI_QUEUE, VI_NULL); + if (status < VI_SUCCESS) + { + printf("The SRQ event could not be enabled"); + goto Close; + } + + /* + * Now the VISA write command is used to send a request to the + * instrument to generate a sine wave and assert the SRQ line + * when it is finished. Notice that this is specific to one + * particular instrument. + */ + strcpy(stringinput,"SRE 0x10; SOUR:FUNC SIN\n"); + status = viWrite (inst, (ViBuf)stringinput, (ViUInt32)strlen(stringinput), &rcount); + if (status < VI_SUCCESS) + { + printf("Error writing to the instrument\n"); + goto Close; + } + + /* + * Now we wait for an SRQ event to be received by the event queue. + * The timeout is in milliseconds and is set to 30000 or 30 seconds. + * Notice that a handle to the event is returned by the viWaitOnEvent + * call. This event handle can be used to obtain various + * attributes of the event. Finally, the event handle should be closed + * to free system resources. + */ + printf("\nWaiting for an SRQ Event\n\n"); + status = viWaitOnEvent (inst, VI_EVENT_SERVICE_REQ, WaitTimeout, &etype, &ehandle); + + /* + * If an SRQ event was received we first read the status byte with + * the viReadSTB function. This should always be called after + * receiving a GPIB SRQ event, or subsequent events will not be + * received properly. Then the data is read and the event is closed + * and the data is displayed. Otherwise sessions are closed and the + * program terminates. + */ + if (status >= VI_SUCCESS) + { + status = viReadSTB (inst, &statusByte); + if (status < VI_SUCCESS) + { + printf("There was an error reading the status byte"); + goto Close; + } + + strcpy(nextstringinput,"SENS: DATA?\n"); + status = viWrite (inst, (ViBuf)nextstringinput, (ViUInt32)strlen(nextstringinput), &rcount); + if (status < VI_SUCCESS) + { + printf("There was an error writing the command to get the data"); + goto Close; + } + + status = viRead (inst, data, 3000, &rcount); + if (status < VI_SUCCESS) + { + printf("There was an error reading the data"); + goto Close; + } + + status = viClose (ehandle); + if (status < VI_SUCCESS) + { + printf("There was an error closing the event handle"); + goto Close; + } + + printf("Here is the data: %*s\n", rcount, data); + } + + /* + * Now we must close the session to the instrument and the session + * to the resource manager. + */ +Close: + status = viClose (inst); + status = viClose (defaultRM); + printf ("Hit enter to continue."); + fflush (stdin); + getchar(); + + return 0; +} + diff --git a/NI-VISA/Examples/C/Gpib/WaitSRQ_MSVC.dsp b/NI-VISA/Examples/C/Gpib/WaitSRQ_MSVC.dsp new file mode 100644 index 0000000..d19a664 --- /dev/null +++ b/NI-VISA/Examples/C/Gpib/WaitSRQ_MSVC.dsp @@ -0,0 +1,115 @@ +# Microsoft Developer Studio Project File - Name="WaitSRQ" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=WaitSRQ - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "WaitSRQ_MSVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "WaitSRQ_MSVC.mak" CFG="WaitSRQ - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "WaitSRQ - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "WaitSRQ - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "WaitSRQ - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /machine:I386 /out:"Release/WaitSRQ.exe" + +!ELSEIF "$(CFG)" == "WaitSRQ - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /debug /machine:I386 /out:"Debug/WaitSRQ.exe" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "WaitSRQ - Win32 Release" +# Name "WaitSRQ - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\WaitSRQ.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visa.h +# End Source File +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visatype.h +# End Source File +# End Group +# Begin Group "Library Files" + +# PROP Default_Filter "lib" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\lib\msc\visa32.lib +# End Source File +# End Group +# End Target +# End Project diff --git a/NI-VISA/Examples/C/Gpib/WaitSRQ_MSVC_VS2005.vcproj b/NI-VISA/Examples/C/Gpib/WaitSRQ_MSVC_VS2005.vcproj new file mode 100644 index 0000000..9ef2e1a --- /dev/null +++ b/NI-VISA/Examples/C/Gpib/WaitSRQ_MSVC_VS2005.vcproj @@ -0,0 +1,501 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NI-VISA/Examples/C/PXI/ReserveTrig.c b/NI-VISA/Examples/C/PXI/ReserveTrig.c new file mode 100644 index 0000000..594b1c5 --- /dev/null +++ b/NI-VISA/Examples/C/PXI/ReserveTrig.c @@ -0,0 +1,78 @@ +/************************************************************** + * This example opens a session to a PXI BACKPLANE resource and + * reserves trigger lines for an identified PXI system. + * The PXI BACKPLANE resource will follow the format: + * PXI0::?::BACKPLANE + * where ? is the number of your PXI chassis in MAX. + * + * Note that the unreserve call only executes if the reservation + * was successfully made. You must use caution when unreserving + * triggers as you could remove automatic reservations made by + * drivers such as DAQmx which could result in hardware damage. + * + * For more information on PXI Timing and Triggering, please see + * KB 3TCCT2D8 at ni.com/support + ***************************************************************/ + + +/* Includes */ +#define NIVISA_PXI /* to include PXI VISA Attributes */ + +#include + +/* Prototypes */ +int ReserveTrigger (int myTrigger, int myBusSegment); + +/* Definitions */ +int main (void) +{ + ViStatus status; + + status = ReserveTrigger (0, 1); + + return status; +} + +int ReserveTrigger (int myTrigger, int myBusSegment) +{ + ViSession RsrcManager; + ViSession vi; + ViStatus status = VI_SUCCESS; + + /* Open VISA Resource Manager and PXI Backplane Resource */ + status = viOpenDefaultRM (&RsrcManager); + if (status < VI_SUCCESS) + goto ReserveDone; + + status = viOpen (RsrcManager, "PXI0::2::BACKPLANE", 0, 0, &vi); + if (status < VI_SUCCESS) + goto CloseRMSession; + + /* Set the Trigger ID and the Trigger Bus Attributes */ + status = viSetAttribute (vi, VI_ATTR_TRIG_ID, myTrigger); + if (status < VI_SUCCESS) + goto CloseBackplaneSession; + + status = viSetAttribute (vi, VI_ATTR_PXI_TRIG_BUS, myBusSegment); + if (status < VI_SUCCESS) + goto CloseBackplaneSession; + + /* Reserve the Trigger */ + status = viAssertTrigger (vi, VI_TRIG_PROT_RESERVE); + if (status < VI_SUCCESS) + goto CloseBackplaneSession; + + /* TODO: Enter code that requires the trigger reserved here */ + + /* UnReserve the Trigger - only do this if we succeeded in Reserving */ + status = viAssertTrigger (vi, VI_TRIG_PROT_UNRESERVE); + +CloseBackplaneSession: + /* Close the VISA Session to the PXI Backplane */ + viClose (vi); +CloseRMSession: + viClose (RsrcManager); +ReserveDone: + return (status); +} + diff --git a/NI-VISA/Examples/C/PXI/ReserveTrig_MSVC.dsp b/NI-VISA/Examples/C/PXI/ReserveTrig_MSVC.dsp new file mode 100644 index 0000000..d364fdd --- /dev/null +++ b/NI-VISA/Examples/C/PXI/ReserveTrig_MSVC.dsp @@ -0,0 +1,115 @@ +# Microsoft Developer Studio Project File - Name="ReserveTrig" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=ReserveTrig - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ReserveTrig_MSVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ReserveTrig_MSVC.mak" CFG="ReserveTrig - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ReserveTrig - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "ReserveTrig - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ReserveTrig - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /machine:I386 /out:"Release/ReserveTrig.exe" + +!ELSEIF "$(CFG)" == "ReserveTrig - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /debug /machine:I386 /out:"Debug/ReserveTrig.exe" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "ReserveTrig - Win32 Release" +# Name "ReserveTrig - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\ReserveTrig.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visa.h +# End Source File +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visatype.h +# End Source File +# End Group +# Begin Group "Library Files" + +# PROP Default_Filter "lib" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\lib\msc\visa32.lib +# End Source File +# End Group +# End Target +# End Project diff --git a/NI-VISA/Examples/C/PXI/ReserveTrig_MSVC_VS2005.vcproj b/NI-VISA/Examples/C/PXI/ReserveTrig_MSVC_VS2005.vcproj new file mode 100644 index 0000000..7fb1192 --- /dev/null +++ b/NI-VISA/Examples/C/PXI/ReserveTrig_MSVC_VS2005.vcproj @@ -0,0 +1,501 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NI-VISA/Examples/C/PXI/RouteTrig.c b/NI-VISA/Examples/C/PXI/RouteTrig.c new file mode 100644 index 0000000..b86b617 --- /dev/null +++ b/NI-VISA/Examples/C/PXI/RouteTrig.c @@ -0,0 +1,80 @@ +/************************************************************** + * This example opens a session to a PXI BACKPLANE resource and + * routes trigger lines for an identified PXI system. + * The PXI BACKPLANE resource will follow the format: + * PXI0::?::BACKPLANE + * where ? is the number of your PXI chassis in MAX. + * + * Note that this program routes triggers from a source bus + * to a destination bus but does not reserve a trigger line + * in the source bus. This could allow multiple boards to drive + * a single trigger line which could damage your hardware. + * See the "Reserve PXI Trigger" example for a method of reserving + * the source trigger so automatic drivers such as DAQmx avoid + * using the same line. + * + * For more information on PXI Timing and Triggering, please see + * KB 3TCCT2D8 at ni.com/support + ***************************************************************/ + +/* Includes */ +#define NIVISA_PXI /* to include PXI VISA Attributes */ + +#include + +/* Prototypes */ +int RouteTrigger (ViInt16 myTrigger, int mySourceSegment, int myDestinationSegment); + +/* Definitions */ +int main (void) +{ + ViStatus status; + + status = RouteTrigger (0, 1, 3); + + return status; +} + +int RouteTrigger (ViInt16 myTrigger, int mySourceSegment, int myDestinationSegment) +{ + ViSession RsrcManager; + ViSession vi; + ViStatus status = VI_SUCCESS; + + /* Open VISA Resource Manager and PXI Backplane Resource */ + status = viOpenDefaultRM (&RsrcManager); + if (status < VI_SUCCESS) + goto RouteDone; + + status = viOpen (RsrcManager, "PXI0::2::BACKPLANE", 0, 0, &vi); + if (status < VI_SUCCESS) + goto CloseRMSession; + + /* Set the Source and Destination bus PXI VISA Attributes */ + status = viSetAttribute (vi, VI_ATTR_PXI_SRC_TRIG_BUS, mySourceSegment); + if (status < VI_SUCCESS) + goto CloseBackplaneSession; + + status = viSetAttribute (vi, VI_ATTR_PXI_DEST_TRIG_BUS,myDestinationSegment); + if (status < VI_SUCCESS) + goto CloseBackplaneSession; + + /* Route the trigger */ + status = viMapTrigger (vi, myTrigger, myTrigger, VI_NULL); + if (status < VI_SUCCESS) + goto CloseBackplaneSession; + + /* TODO: Enter code that requires the trigger routed here */ + + /* UnRoute the trigger - only do this if we succeeded in Routing */ + status = viUnmapTrigger (vi, myTrigger, myTrigger); + +CloseBackplaneSession: + /* Close your VISA Sessions */ + status = viClose (vi); +CloseRMSession: + status = viClose (RsrcManager); +RouteDone: + return (status); +} + diff --git a/NI-VISA/Examples/C/PXI/RouteTrig_MSVC.dsp b/NI-VISA/Examples/C/PXI/RouteTrig_MSVC.dsp new file mode 100644 index 0000000..7033254 --- /dev/null +++ b/NI-VISA/Examples/C/PXI/RouteTrig_MSVC.dsp @@ -0,0 +1,115 @@ +# Microsoft Developer Studio Project File - Name="RouteTrig" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=RouteTrig - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "RouteTrig_MSVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "RouteTrig_MSVC.mak" CFG="RouteTrig - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "RouteTrig - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "RouteTrig - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "RouteTrig - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /machine:I386 /out:"Release/RouteTrig.exe" + +!ELSEIF "$(CFG)" == "RouteTrig - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /debug /machine:I386 /out:"Debug/RouteTrig.exe" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "RouteTrig - Win32 Release" +# Name "RouteTrig - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\RouteTrig.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visa.h +# End Source File +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visatype.h +# End Source File +# End Group +# Begin Group "Library Files" + +# PROP Default_Filter "lib" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\lib\msc\visa32.lib +# End Source File +# End Group +# End Target +# End Project diff --git a/NI-VISA/Examples/C/PXI/RouteTrig_MSVC_VS2005.vcproj b/NI-VISA/Examples/C/PXI/RouteTrig_MSVC_VS2005.vcproj new file mode 100644 index 0000000..26db04a --- /dev/null +++ b/NI-VISA/Examples/C/PXI/RouteTrig_MSVC_VS2005.vcproj @@ -0,0 +1,501 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NI-VISA/Examples/C/Serial/RdWrtSrl.c b/NI-VISA/Examples/C/Serial/RdWrtSrl.c new file mode 100644 index 0000000..9d07149 --- /dev/null +++ b/NI-VISA/Examples/C/Serial/RdWrtSrl.c @@ -0,0 +1,159 @@ +/********************************************************************/ +/* Read and Write to a Serial Instrument */ +/* */ +/* This code demonstrates sending synchronous read & write commands */ +/* through the serial port using VISA. */ +/* The example writes the "*IDN?\n" string to the serial port (COM1)*/ +/* and attempts to read back a result using the write and read */ +/* functions. */ +/* */ +/* The general flow of the code is */ +/* Open Resource Manager */ +/* Open VISA Session to an Instrument */ +/* Configure the Serial Port */ +/* Write the Identification Query Using viWrite */ +/* Try to Read a Response With viRead */ +/* Close the VISA Session */ +/********************************************************************/ + +#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +/* Functions like strcpy are technically not secure because they do */ +/* not contain a 'length'. But we disable this warning for the VISA */ +/* examples since we never copy more than the actual buffer size. */ +#define _CRT_SECURE_NO_DEPRECATE +#endif + +#include +#include +#include + +#include "visa.h" + +static ViSession defaultRM; +static ViSession instr; +static ViUInt32 retCount; +static ViUInt32 writeCount; +static ViStatus status; +static unsigned char buffer[100]; +static char stringinput[512]; + + +int main(void) +{ + /* + * First we must call viOpenDefaultRM to get the manager + * handle. We will store this handle in defaultRM. + */ + status=viOpenDefaultRM (&defaultRM); + if (status < VI_SUCCESS) + { + printf ("Could not open a session to the VISA Resource Manager!\n"); + exit (EXIT_FAILURE); + } + + /* + * Now we will open a VISA session to the serial port (COM1). + * We must use the handle from viOpenDefaultRM and we must + * also use a string that indicates which instrument to open. This + * is called the instrument descriptor. The format for this string + * can be found in the function panel by right clicking on the + * descriptor parameter. After opening a session to the + * device, we will get a handle to the instrument which we + * will use in later VISA functions. The AccessMode and Timeout + * parameters in this function are reserved for future + * functionality. These two parameters are given the value VI_NULL. + */ + status = viOpen (defaultRM, "ASRL1::INSTR", VI_NULL, VI_NULL, &instr); + if (status < VI_SUCCESS) + { + printf ("Cannot open a session to the device.\n"); + goto Close; + } + + /* + * At this point we now have a session open to the serial instrument. + * Now we need to configure the serial port: + */ + + /* Set the timeout to 5 seconds (5000 milliseconds). */ + status = viSetAttribute (instr, VI_ATTR_TMO_VALUE, 5000); + + /* Set the baud rate to 4800 (default is 9600). */ + status = viSetAttribute (instr, VI_ATTR_ASRL_BAUD, 4800); + + /* Set the number of data bits contained in each frame (from 5 to 8). + * The data bits for each frame are located in the low-order bits of + * every byte stored in memory. + */ + status = viSetAttribute (instr, VI_ATTR_ASRL_DATA_BITS, 8); + + /* Specify parity. Options: + * VI_ASRL_PAR_NONE - No parity bit exists, + * VI_ASRL_PAR_ODD - Odd parity should be used, + * VI_ASRL_PAR_EVEN - Even parity should be used, + * VI_ASRL_PAR_MARK - Parity bit exists and is always 1, + * VI_ASRL_PAR_SPACE - Parity bit exists and is always 0. + */ + status = viSetAttribute (instr, VI_ATTR_ASRL_PARITY, VI_ASRL_PAR_NONE); + + /* Specify stop bit. Options: + * VI_ASRL_STOP_ONE - 1 stop bit is used per frame, + * VI_ASRL_STOP_ONE_5 - 1.5 stop bits are used per frame, + * VI_ASRL_STOP_TWO - 2 stop bits are used per frame. + */ + status = viSetAttribute (instr, VI_ATTR_ASRL_STOP_BITS, VI_ASRL_STOP_ONE); + + /* Specify that the read operation should terminate when a termination + * character is received. + */ + status = viSetAttribute (instr, VI_ATTR_TERMCHAR_EN, VI_TRUE); + + /* Set the termination character to 0xA + */ + status = viSetAttribute (instr, VI_ATTR_TERMCHAR, 0xA); + + + /* We will use the viWrite function to send the device the string "*IDN?\n", + * asking for the device's identification. + */ + strcpy (stringinput,"*IDN?\n"); + status = viWrite (instr, (ViBuf)stringinput, (ViUInt32)strlen(stringinput), &writeCount); + if (status < VI_SUCCESS) + { + printf ("Error writing to the device.\n"); + goto Close; + } + + /* + * Now we will attempt to read back a response from the device to + * the identification query that was sent. We will use the viRead + * function to acquire the data. We will try to read back 100 bytes. + * This function will stop reading if it finds the termination character + * before it reads 100 bytes. + * After the data has been read the response is displayed. + */ + status = viRead (instr, buffer, 100, &retCount); + if (status < VI_SUCCESS) + { + printf ("Error reading a response from the device.\n"); + } + else + { + printf ("\nData read: %*s\n", retCount, buffer); + } + + + /* + * Now we will close the session to the instrument using + * viClose. This operation frees all system resources. + */ +Close: + status = viClose (instr); + status = viClose (defaultRM); + printf ("Hit enter to continue."); + fflush (stdin); + getchar(); + + return 0; +} + diff --git a/NI-VISA/Examples/C/Serial/RdWrtSrl_MSVC.dsp b/NI-VISA/Examples/C/Serial/RdWrtSrl_MSVC.dsp new file mode 100644 index 0000000..3e47c79 --- /dev/null +++ b/NI-VISA/Examples/C/Serial/RdWrtSrl_MSVC.dsp @@ -0,0 +1,115 @@ +# Microsoft Developer Studio Project File - Name="RdWrtSrl" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=RdWrtSrl - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "RdWrtSrl_MSVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "RdWrtSrl_MSVC.mak" CFG="RdWrtSrl - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "RdWrtSrl - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "RdWrtSrl - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "RdWrtSrl - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /machine:I386 /out:"Release/RdWrtSrl.exe" + +!ELSEIF "$(CFG)" == "RdWrtSrl - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /debug /machine:I386 /out:"Debug/RdWrtSrl.exe" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "RdWrtSrl - Win32 Release" +# Name "RdWrtSrl - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\RdWrtSrl.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visa.h +# End Source File +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visatype.h +# End Source File +# End Group +# Begin Group "Library Files" + +# PROP Default_Filter "lib" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\lib\msc\visa32.lib +# End Source File +# End Group +# End Target +# End Project diff --git a/NI-VISA/Examples/C/Serial/RdWrtSrl_MSVC_VS2005.vcproj b/NI-VISA/Examples/C/Serial/RdWrtSrl_MSVC_VS2005.vcproj new file mode 100644 index 0000000..075a56c --- /dev/null +++ b/NI-VISA/Examples/C/Serial/RdWrtSrl_MSVC_VS2005.vcproj @@ -0,0 +1,501 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NI-VISA/Examples/C/TCPIP/TCPIP_MSVC.dsp b/NI-VISA/Examples/C/TCPIP/TCPIP_MSVC.dsp new file mode 100644 index 0000000..f63ee3b --- /dev/null +++ b/NI-VISA/Examples/C/TCPIP/TCPIP_MSVC.dsp @@ -0,0 +1,112 @@ +# Microsoft Developer Studio Project File - Name="TCPIP" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=TCPIP - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "TCPIP_MSVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "TCPIP_MSVC.mak" CFG="TCPIP - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "TCPIP - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "TCPIP - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "TCPIP - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "TCPIP - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "TCPIP - Win32 Release" +# Name "TCPIP - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\tcpip.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visa.h +# End Source File +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visatype.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\lib\msc\visa32.lib +# End Source File +# End Group +# End Target +# End Project diff --git a/NI-VISA/Examples/C/TCPIP/TCPIP_MSVC_VS2005.vcproj b/NI-VISA/Examples/C/TCPIP/TCPIP_MSVC_VS2005.vcproj new file mode 100644 index 0000000..b42e03b --- /dev/null +++ b/NI-VISA/Examples/C/TCPIP/TCPIP_MSVC_VS2005.vcproj @@ -0,0 +1,493 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NI-VISA/Examples/C/TCPIP/tcpip.c b/NI-VISA/Examples/C/TCPIP/tcpip.c new file mode 100644 index 0000000..66dca4d --- /dev/null +++ b/NI-VISA/Examples/C/TCPIP/tcpip.c @@ -0,0 +1,73 @@ +/*********************************************************************/ +/* This example demonstrates opening a simple TCPIP connection and */ +/* does a read and checks a few properties. */ +/* */ +/* The general flow of the code is */ +/* Open Resource Manager */ +/* Open a session to the TCP/IP site at NI */ +/* Perform a read, and check properties */ +/* Close all VISA Sessions */ +/*********************************************************************/ + + +#include +#include + +#include "visa.h" + +static char outputBuffer[VI_FIND_BUFLEN]; +static ViSession defaultRM, instr; +static ViStatus status; +static ViUInt32 count; +static ViUInt16 portNo; + +int main(void) +{ + /* First we will need to open the default resource manager. */ + status = viOpenDefaultRM (&defaultRM); + if (status < VI_SUCCESS) + { + printf("Could not open a session to the VISA Resource Manager!\n"); + exit (EXIT_FAILURE); + } + + /* Now we will open a session via TCP/IP to ni.com */ + status = viOpen (defaultRM, "TCPIP0::ftp.ni.com::21::SOCKET", VI_NULL, VI_NULL, &instr); + if (status < VI_SUCCESS) + { + printf ("An error occurred opening the session to TCPIP0::ftp.ni.com::21::SOCKET\n"); + viClose(defaultRM); + exit (EXIT_FAILURE); + } + + viSetAttribute (instr, VI_ATTR_TCPIP_NODELAY, VI_TRUE); + + status = viRead (instr, (ViBuf)outputBuffer, 25, &count); + if (status < VI_SUCCESS) + { + printf("viRead failed with error code %x \n",status); + viClose(defaultRM); + exit (EXIT_FAILURE); + } + + printf("The server response is:\n %s\n\n",outputBuffer); + status = viGetAttribute (instr, VI_ATTR_TCPIP_ADDR, outputBuffer); + printf(" Address: %s\n",outputBuffer); + + status = viGetAttribute (instr, VI_ATTR_TCPIP_HOSTNAME, outputBuffer); + printf(" Host Name: %s\n",outputBuffer); + + status = viGetAttribute (instr, VI_ATTR_TCPIP_PORT, &portNo); + printf(" Port: %d\n",portNo); + + status = viGetAttribute (instr, VI_ATTR_RSRC_CLASS, outputBuffer); + printf(" Resource Class: %s\n",outputBuffer); + + status = viClose (instr); + status = viClose (defaultRM); + printf ("\nHit enter to continue."); + fflush(stdin); + getchar(); + + return 0; +} diff --git a/NI-VISA/Examples/C/USB/RdWrtUSBTMC.c b/NI-VISA/Examples/C/USB/RdWrtUSBTMC.c new file mode 100644 index 0000000..8a672f1 --- /dev/null +++ b/NI-VISA/Examples/C/USB/RdWrtUSBTMC.c @@ -0,0 +1,143 @@ +/********************************************************************/ +/* Read and Write to a USBTMC Instrument */ +/* */ +/* This code demonstrates sending synchronous read & write commands */ +/* to an USB Test & Measurement Class (USBTMC) instrument using */ +/* NI-VISA */ +/* The example writes the "*IDN?\n" string to all the USBTMC */ +/* devices connected to the system and attempts to read back */ +/* results using the write and read functions. */ +/* */ +/* The general flow of the code is */ +/* Open Resource Manager */ +/* Open VISA Session to an Instrument */ +/* Write the Identification Query Using viWrite */ +/* Try to Read a Response With viRead */ +/* Close the VISA Session */ +/********************************************************************/ + +#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +/* Functions like strcpy are technically not secure because they do */ +/* not contain a 'length'. But we disable this warning for the VISA */ +/* examples since we never copy more than the actual buffer size. */ +#define _CRT_SECURE_NO_DEPRECATE +#endif + +#include +#include +#include + +#include "visa.h" + +static ViSession defaultRM; +static ViSession instr; +static ViUInt32 numInstrs; +static ViFindList findList; +static ViUInt32 retCount; +static ViUInt32 writeCount; +static ViStatus status; +static char instrResourceString[VI_FIND_BUFLEN]; + +static unsigned char buffer[100]; +static char stringinput[512]; + +int main(void) +{ + int i; + + /* + * First we must call viOpenDefaultRM to get the manager + * handle. We will store this handle in defaultRM. + */ + status=viOpenDefaultRM (&defaultRM); + if (status < VI_SUCCESS) + { + printf ("Could not open a session to the VISA Resource Manager!\n"); + exit (EXIT_FAILURE); + } + + /* Find all the USB TMC VISA resources in our system and store the */ + /* number of resources in the system in numInstrs. */ + status = viFindRsrc (defaultRM, "USB?*INSTR", &findList, &numInstrs, instrResourceString); + + if (status < VI_SUCCESS) + { + printf ("An error occurred while finding resources.\nHit enter to continue."); + fflush(stdin); + getchar(); + viClose (defaultRM); + return status; + } + + /* + * Now we will open VISA sessions to all USB TMC instruments. + * We must use the handle from viOpenDefaultRM and we must + * also use a string that indicates which instrument to open. This + * is called the instrument descriptor. The format for this string + * can be found in the function panel by right clicking on the + * descriptor parameter. After opening a session to the + * device, we will get a handle to the instrument which we + * will use in later VISA functions. The AccessMode and Timeout + * parameters in this function are reserved for future + * functionality. These two parameters are given the value VI_NULL. + */ + + for (i=0; i 0) + viFindNext (findList, instrResourceString); + + status = viOpen (defaultRM, instrResourceString, VI_NULL, VI_NULL, &instr); + + if (status < VI_SUCCESS) + { + printf ("Cannot open a session to the device %d.\n", i+1); + continue; + } + + /* + * At this point we now have a session open to the USB TMC instrument. + * We will now use the viWrite function to send the device the string "*IDN?\n", + * asking for the device's identification. + */ + strcpy (stringinput,"*IDN?\n"); + status = viWrite (instr, (ViBuf)stringinput, (ViUInt32)strlen(stringinput), &writeCount); + if (status < VI_SUCCESS) + { + printf ("Error writing to the device %d.\n", i+1); + status = viClose (instr); + continue; + } + + /* + * Now we will attempt to read back a response from the device to + * the identification query that was sent. We will use the viRead + * function to acquire the data. We will try to read back 100 bytes. + * This function will stop reading if it finds the termination character + * before it reads 100 bytes. + * After the data has been read the response is displayed. + */ + status = viRead (instr, buffer, 100, &retCount); + if (status < VI_SUCCESS) + { + printf ("Error reading a response from the device %d.\n", i+1); + } + else + { + printf ("\nDevice %d: %*s\n", i+1, retCount, buffer); + } + status = viClose (instr); + } + + + /* + * Now we will close the session to the instrument using + * viClose. This operation frees all system resources. + */ + status = viClose (defaultRM); + printf ("Hit enter to continue."); + fflush (stdin); + getchar(); + + return 0; +} diff --git a/NI-VISA/Examples/C/USB/RdWrtUSBTMC_MSVC.dsp b/NI-VISA/Examples/C/USB/RdWrtUSBTMC_MSVC.dsp new file mode 100644 index 0000000..7d7e7e3 --- /dev/null +++ b/NI-VISA/Examples/C/USB/RdWrtUSBTMC_MSVC.dsp @@ -0,0 +1,115 @@ +# Microsoft Developer Studio Project File - Name="RdWrtUSBTMC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=RdWrtUSBTMC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "RdWrtUSBTMC_MSVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "RdWrtUSBTMC_MSVC.mak" CFG="RdWrtUSBTMC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "RdWrtUSBTMC - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "RdWrtUSBTMC - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "RdWrtUSBTMC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /machine:I386 /out:"Release/RdWrtUSBTMC.exe" + +!ELSEIF "$(CFG)" == "RdWrtUSBTMC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /debug /machine:I386 /out:"Debug/RdWrtUSBTMC.exe" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "RdWrtUSBTMC - Win32 Release" +# Name "RdWrtUSBTMC - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\RdWrtUSBTMC.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visa.h +# End Source File +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visatype.h +# End Source File +# End Group +# Begin Group "Library Files" + +# PROP Default_Filter "lib" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\lib\msc\visa32.lib +# End Source File +# End Group +# End Target +# End Project diff --git a/NI-VISA/Examples/C/USB/RdWrtUSBTMC_MSVC_VS2005.vcproj b/NI-VISA/Examples/C/USB/RdWrtUSBTMC_MSVC_VS2005.vcproj new file mode 100644 index 0000000..2922ffc --- /dev/null +++ b/NI-VISA/Examples/C/USB/RdWrtUSBTMC_MSVC_VS2005.vcproj @@ -0,0 +1,501 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NI-VISA/Examples/C/USB/USBDescriptors.c b/NI-VISA/Examples/C/USB/USBDescriptors.c new file mode 100644 index 0000000..6cceb91 --- /dev/null +++ b/NI-VISA/Examples/C/USB/USBDescriptors.c @@ -0,0 +1,410 @@ +/*********************************************************************/ +/* This example demonstrates how you may query the USB RAW devices */ +/* and list the descriptors associated with those devices. */ +/* */ +/* The general flow of the code is */ +/* Open Resource Manager */ +/* Use viFindRsrc() to query available USB RAW instrument */ +/* Open a session to the device found */ +/* Display the descriptors for this device */ +/* Repeat process with the next instrument using viFindNext() */ +/* Close all VISA Sessions */ +/*********************************************************************/ + +#include +#include +#include + +#include "visa.h" + +/* Defines */ +#define USB_REQUESTTYPE_GET_DESCRIPTOR 0x80 +#define USB_REQUEST_GET_DESCRIPTOR 6 +#define USB_DESCRIPTOR_TYPE_DEVICE 0x01 +#define USB_DESCRIPTOR_TYPE_CONFIG 0x02 +#define USB_DESCRIPTOR_TYPE_STRING 0x03 +#define USB_DESCRIPTOR_TYPE_INTERFACE 0x04 +#define USB_DESCRIPTOR_TYPE_ENDPOINT 0x05 +#define USB_DESCRIPTOR_LANGUAGE_ENGLISH 0x0409 + +/* Typedefs */ +typedef struct { + ViUInt8 bLength; + ViUInt8 bDescriptorType; + ViUInt16 bcdUSB; + ViUInt8 bDeviceClass; + ViUInt8 bDeviceSubClass; + ViUInt8 bDeviceProtocol; + ViUInt8 bMaxPacketSize0; + ViUInt16 idVendor; + ViUInt16 idProduct; + ViUInt16 bcdDevice; + ViUInt8 iManufacturer; + ViUInt8 iProduct; + ViUInt8 iSerialNumber; + ViUInt8 bNumConfigurations; +} tUsbDeviceDesc; + +typedef struct { + ViUInt8 bLength; + ViUInt8 bDescriptorType; + ViUInt16 wTotalLength; + ViUInt8 bNumInterfaces; + ViUInt8 bConfigurationValue; + ViUInt8 iConfiguration; + ViUInt8 bmAttributes; + ViUInt8 MaxPower; +} tUsbConfigDesc; + +typedef struct { + ViUInt8 bLength; + ViUInt8 bDescriptorType; + ViUInt8 bInterfaceNumber; + ViUInt8 bAlternateSetting; + ViUInt8 bNumEndpoints; + ViUInt8 bInterfaceClass; + ViUInt8 bInterfaceSubClass; + ViUInt8 bInterfaceProtocol; + ViUInt8 iInterface; +} tUsbInterfaceDesc; + +typedef struct { + ViUInt8 bLength; + ViUInt8 bDescriptorType; + ViUInt8 bEndpointAddress; + ViUInt8 bmAttributes; + ViUInt16 wMaxPacketSize; + ViUInt8 bInterval; +} tUsbEndpointDesc ; + +typedef struct { + ViUInt8 bLength; + ViUInt8 bDescriptorType; +} tUsbCommonDesc; + +/* Prototypes */ +void GetStringDescriptor(ViUInt8 stringIndex, ViString stringDesc); +void DisplayEndPointTransferType(ViUInt8 bmAttr); +void DisplayDeviceDescriptor(ViSession instrHandle); +void DisplayConfigDescriptor(ViSession instrHandle); +void TraverseConfigDescriptor(ViChar* configDesc); + +/* Variables */ +static char instrDescriptor[VI_FIND_BUFLEN]; +static ViUInt32 numInstrs; +static ViFindList findList; +static ViSession defaultRM, instr; +static ViStatus status; + +int main(void) +{ + /* First we will need to open the default resource manager. */ + status = viOpenDefaultRM (&defaultRM); + if (status < VI_SUCCESS) + { + printf("Could not open a session to the VISA Resource Manager!\n"); + exit (EXIT_FAILURE); + } + + /* Find all the RAW USB VISA resources in our system and store the */ + /* number of resources in the system in numInstrs. */ + status = viFindRsrc (defaultRM, "USB?*RAW", &findList, &numInstrs, instrDescriptor); + + if (status < VI_SUCCESS) + { + printf ("An error occurred while finding resources.\nHit enter to continue."); + fflush(stdin); + getchar(); + viClose (defaultRM); + return status; + } + + printf("%d USB RAW instruments found:\n\n",numInstrs); + printf("%s \n\n",instrDescriptor); + + /* Now we will open a session to the instrument we just found. */ + status = viOpen (defaultRM, instrDescriptor, VI_NULL, VI_NULL, &instr); + if (status < VI_SUCCESS) + { + printf ("An error occurred opening a session to %s\n",instrDescriptor); + } + else + { + DisplayDeviceDescriptor(instr); + DisplayConfigDescriptor(instr); + viClose (instr); + } + + while (--numInstrs) + { + /* stay in this loop until we find all instruments */ + status = viFindNext (findList, instrDescriptor); /* find next desriptor */ + if (status < VI_SUCCESS) + { /* did we find the next resource? */ + printf ("An error occurred finding the next resource.\nHit enter to continue."); + fflush(stdin); + getchar(); + viClose (defaultRM); + return status; + } + printf("%s \n",instrDescriptor); + + /* Now we will open a session to the instrument we just found */ + status = viOpen (defaultRM, instrDescriptor, VI_NULL, VI_NULL, &instr); + if (status < VI_SUCCESS) + { + printf ("An error occurred opening a session to %s\n",instrDescriptor); + } + else + { + DisplayDeviceDescriptor(instr); + DisplayConfigDescriptor(instr); + viClose (instr); + } + } /* end while */ + + status = viClose(findList); + status = viClose(defaultRM); + printf ("\nHit enter to continue."); + fflush(stdin); + getchar(); + + return 0; +} + +/*********************************************************************/ +/* Retrieve the string descriptor for the device */ +/* stringIndex: input parameter containing the index for the string */ +/* descriptor */ +/* stringDesc: output buffer to hold the string descriptor */ +/*********************************************************************/ + +void GetStringDescriptor(ViUInt8 stringIndex, ViString stringDesc) +{ + ViUInt16 inBuffer[VI_FIND_BUFLEN]; + ViUInt16 stringDescLen; + ViUInt16 retCount; + ViUInt16 i; + tUsbCommonDesc inBufferHeader; + ViStatus status; + + /* Query the length of the string package */ + status = viUsbControlIn (instr, USB_REQUESTTYPE_GET_DESCRIPTOR, USB_REQUEST_GET_DESCRIPTOR, + USB_DESCRIPTOR_TYPE_STRING << 8 | stringIndex, USB_DESCRIPTOR_LANGUAGE_ENGLISH, 2, (ViPBuf)&inBufferHeader, &retCount); + if (status < VI_SUCCESS) + { + printf("An error occured when retrieving string descriptor header.\n"); + } + + if (inBufferHeader.bLength > sizeof(inBuffer)) + { + stringDesc[0] = '\0'; + printf ("String descriptor size %hu greater than maximum supported size %hu\n",inBufferHeader.bLength,sizeof(inBuffer)); + return; + } + + /* Query the String Descriptor */ + status = viUsbControlIn (instr, USB_REQUESTTYPE_GET_DESCRIPTOR, USB_REQUEST_GET_DESCRIPTOR, + USB_DESCRIPTOR_TYPE_STRING << 8 | stringIndex, USB_DESCRIPTOR_LANGUAGE_ENGLISH, inBufferHeader.bLength, + (ViPBuf)inBuffer, &retCount); + if (status < VI_SUCCESS) + { + printf("An error occured when retrieving string descriptor.\n"); + } + + /* Reformat the string */ + stringDescLen = (inBufferHeader.bLength / 2) - 1; + + for (i = 0; i < stringDescLen; ++i) + { + stringDesc[i] = (ViChar)inBuffer[i+1]; + } + + /* Append End of the String */ + stringDesc[stringDescLen]='\0'; +} + +/*********************************************************************/ +/* Print the Endpoint Transfer Type to console output */ +/* bmAttr: bmAttribute value for the Endpoint */ +/*********************************************************************/ +void DisplayEndPointTransferType(ViUInt8 bmAttr) +{ + switch (bmAttr & 0x03) + { + case 0: + printf("Control"); + break; + case 1: + printf("Isochronous"); + break; + case 2: + printf("Bulk"); + break; + case 3: + printf("Interrupt"); + break; + default: + printf("Unrecognized Type"); + } + printf("\n"); +} + + +/*********************************************************************/ +/* This function queries the device descriptor using the instrument */ +/* handle that is passed in. Then it print the device descriptor to */ +/* console output */ +/*********************************************************************/ +void DisplayDeviceDescriptor(ViSession instrHandle) +{ + ViUInt16 retCount; + ViChar stringDesc[VI_FIND_BUFLEN]; + tUsbDeviceDesc deviceDesc; + ViStatus status; + + /* Get Device Descriptor */ + status = viUsbControlIn (instrHandle, USB_REQUESTTYPE_GET_DESCRIPTOR, USB_REQUEST_GET_DESCRIPTOR, + USB_DESCRIPTOR_TYPE_DEVICE << 8, 0, sizeof(tUsbDeviceDesc), (ViPBuf)&deviceDesc, &retCount); + if (status < VI_SUCCESS) + { + printf("An error occured when retrieving device descriptor.\n"); + } + + /* Display Device Descriptor */ + printf("*********************\n"); + printf("* Device Descriptor *\n"); + printf("*********************\n"); + printf("bcdUSB:\t\t\t 0x%04X\n",deviceDesc.bcdUSB); + printf("bDeviceClass:\t\t 0x%02X\n",deviceDesc.bDeviceClass); + printf("bDeviceSubClass:\t 0x%02X\n",deviceDesc.bDeviceSubClass); + printf("bDeviceProtocol:\t 0x%02X\n", deviceDesc.bDeviceProtocol); + printf("bMaxPacketSize0:\t 0x%02X\n", deviceDesc.bMaxPacketSize0); + printf("idVendor:\t\t 0x%04X\n", deviceDesc.idVendor); + printf("idProduct:\t\t 0x%04X\n", deviceDesc.idProduct); + printf("bcdDevice:\t\t 0x%04X\n", deviceDesc.bcdDevice); + + /* A few Device Descriptor items also could include String Descriptors */ + printf("iManufacturer:\t\t 0x%02X\n", deviceDesc.iManufacturer); + if (deviceDesc.iManufacturer != 0) + { + GetStringDescriptor(deviceDesc.iManufacturer,stringDesc); + printf("\t\t\t \"%s\"\n",stringDesc); + } + + printf("iProduct:\t\t 0x%02X\n", deviceDesc.iProduct); + if (deviceDesc.iProduct != 0) + { + GetStringDescriptor(deviceDesc.iProduct,stringDesc); + printf("\t\t\t \"%s\"\n",stringDesc); + } + + printf("iSerialNumber:\t\t 0x%02X\n", deviceDesc.iSerialNumber); + if (deviceDesc.iSerialNumber != 0) + { + GetStringDescriptor(deviceDesc.iSerialNumber,stringDesc); + printf("\t\t\t \"%s\"\n",stringDesc); + } + + printf("bNumConfigurations:\t 0x%02X\n", deviceDesc.bNumConfigurations); + + printf("\n"); +} + +/*********************************************************************/ +/* This function queries the config descriptor using the instrument */ +/* handle that is passed in. Then it print the config descriptor to */ +/* console output */ +/*********************************************************************/ +void DisplayConfigDescriptor(ViSession instrHandle) +{ + tUsbConfigDesc configDescOnly; + ViStatus status; + ViUInt16 retCount; + ViChar configDescComplete[2048]; + + /* Retrieve the config descriptor */ + status = viUsbControlIn(instrHandle, USB_REQUESTTYPE_GET_DESCRIPTOR, USB_REQUEST_GET_DESCRIPTOR, + USB_DESCRIPTOR_TYPE_CONFIG << 8, 0, sizeof(tUsbConfigDesc), + (ViPBuf)&configDescOnly, &retCount); + if (status < VI_SUCCESS) + { + printf("An error occured when retrieving configuration descriptor.\n"); + } + + if (configDescOnly.wTotalLength > 2048) + { + printf("Actual size of complete configuration descriptor (%lu) is greater than maximum buffer size (%lu)\n", configDescOnly.wTotalLength, 2048); + return; + } + /* Retrieve the entire config descriptors */ + status = viUsbControlIn(instrHandle, USB_REQUESTTYPE_GET_DESCRIPTOR, USB_REQUEST_GET_DESCRIPTOR, + USB_DESCRIPTOR_TYPE_CONFIG << 8, 0, configDescOnly.wTotalLength, + (ViPBuf)configDescComplete, &retCount); + if (status < VI_SUCCESS) + { + printf("An error occured when retrieving configuration descriptor.\n"); + } + + /* Traverse and Display the entire config descriptor */ + printf("****************************\n"); + printf("* Configuration Descriptor *\n"); + printf("****************************\n"); + printf("wTotalLength:\t\t 0x%04X\n", configDescOnly.wTotalLength); + printf("bNumInterfaces:\t\t 0x%02X\n", configDescOnly.bNumInterfaces); + printf("bConfigurationValue:\t 0x%02X\n", configDescOnly.bConfigurationValue); + printf("iConfiguration:\t\t 0x%02X\n", configDescOnly.iConfiguration); + printf("bmAttributes:\t\t 0x%02X\n", configDescOnly.bmAttributes); + printf("MaxPower:\t\t 0x%02X\n\n", configDescOnly.MaxPower); + + TraverseConfigDescriptor(configDescComplete); +} + +/*********************************************************************/ +/* This function parses the complete config descriptor. */ +/* Then it print the device descriptor to console output. */ +/*********************************************************************/ +void TraverseConfigDescriptor(ViChar* pConfigDesc) +{ + ViUInt16 currentOffset = ((tUsbConfigDesc *)pConfigDesc)->bLength; /* Skip over the config descriptor */ + ViUInt16 totalSize = ((tUsbConfigDesc *)pConfigDesc)->wTotalLength; + tUsbInterfaceDesc * pInterfaceDesc; + tUsbEndpointDesc * pEndpointDesc; + + while (currentOffset < totalSize) + { + /* Interface Descriptor */ + if (((tUsbCommonDesc *)(pConfigDesc + currentOffset))->bDescriptorType == USB_DESCRIPTOR_TYPE_INTERFACE) + { + pInterfaceDesc = (tUsbInterfaceDesc *)(pConfigDesc + currentOffset); + printf("************************\n"); + printf("* Interface Descriptor *\n"); + printf("************************\n"); + printf("bInterfaceNumber:\t 0x%02X\n",pInterfaceDesc->bInterfaceNumber); + printf("bAlternatedSetting:\t 0x%02X\n",pInterfaceDesc->bAlternateSetting); + printf("bNumEndpoints:\t\t 0x%02X\n",pInterfaceDesc->bNumEndpoints); + printf("bInterfaceClass:\t 0x%02X\n",pInterfaceDesc->bInterfaceClass); + printf("bInterfaceSubClass:\t 0x%02X\n",pInterfaceDesc->bInterfaceSubClass); + printf("bInterfaceProtocol:\t 0x%02X\n",pInterfaceDesc->bInterfaceProtocol); + printf("bInterface:\t\t 0x%02X\n",pInterfaceDesc->iInterface); + printf("\n"); + } + /* Endpoint Descriptor */ + else if (((tUsbCommonDesc *)(pConfigDesc + currentOffset))->bDescriptorType == USB_DESCRIPTOR_TYPE_ENDPOINT) + { + pEndpointDesc = (tUsbEndpointDesc *)(pConfigDesc + currentOffset); + printf("***********************\n"); + printf("* Endpoint Descriptor *\n"); + printf("***********************\n"); + printf("bEndpointAddress:\t 0x%02X\n",pEndpointDesc->bEndpointAddress); + printf("Transfer Type:\t\t "); + DisplayEndPointTransferType(pEndpointDesc->bmAttributes); + printf("wMaxPacketSize:\t\t 0x%02X\n",pEndpointDesc->wMaxPacketSize); + printf("bInterval:\t\t 0x%02X\n",pEndpointDesc->bInterval); + printf("\n"); + } + /* update the iterator */ + currentOffset += ((tUsbCommonDesc *)(pConfigDesc + currentOffset))->bLength; + } +} + diff --git a/NI-VISA/Examples/C/USB/USBDescriptors_MSVC.dsp b/NI-VISA/Examples/C/USB/USBDescriptors_MSVC.dsp new file mode 100644 index 0000000..f4b3fa1 --- /dev/null +++ b/NI-VISA/Examples/C/USB/USBDescriptors_MSVC.dsp @@ -0,0 +1,115 @@ +# Microsoft Developer Studio Project File - Name="USBDescriptors" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=USBDescriptors - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "USBDescriptors_MSVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "USBDescriptors_MSVC.mak" CFG="USBDescriptors - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "USBDescriptors - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "USBDescriptors - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "USBDescriptors - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /machine:I386 /out:"Release/USBDescriptors.exe" + +!ELSEIF "$(CFG)" == "USBDescriptors - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /debug /machine:I386 /out:"Debug/USBDescriptors.exe" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "USBDescriptors - Win32 Release" +# Name "USBDescriptors - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\USBDescriptors.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visa.h +# End Source File +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visatype.h +# End Source File +# End Group +# Begin Group "Library Files" + +# PROP Default_Filter "lib" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\lib\msc\visa32.lib +# End Source File +# End Group +# End Target +# End Project diff --git a/NI-VISA/Examples/C/USB/USBDescriptors_MSVC_VS2005.vcproj b/NI-VISA/Examples/C/USB/USBDescriptors_MSVC_VS2005.vcproj new file mode 100644 index 0000000..7764026 --- /dev/null +++ b/NI-VISA/Examples/C/USB/USBDescriptors_MSVC_VS2005.vcproj @@ -0,0 +1,493 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NI-VISA/Examples/C/Vxi-vme/AsyncIntr.c b/NI-VISA/Examples/C/Vxi-vme/AsyncIntr.c new file mode 100644 index 0000000..539136d --- /dev/null +++ b/NI-VISA/Examples/C/Vxi-vme/AsyncIntr.c @@ -0,0 +1,159 @@ +/**********************************************************************/ +/* Asynchronous Interrupt Handling Example */ +/* */ +/* This code opens a session to a controller at Logical Address zero */ +/* This example installs an event handler to receive interrupts or */ +/* signals. The program can be easily tested by running it and then */ +/* asserting interrupts using VXI Interactive Control, VIC. */ +/* VIC can be used to assert an interrupt or generate a signal. */ +/* Send the StatusId = 0xfd00 for this example. The driver does not */ +/* pass interrupts generated from National Instruments' controllers */ +/* with certain StatusId values to the event handler. */ +/* */ +/* The general flow of this code is: */ +/* Open Resource Manager */ +/* Open VISA session to an instrument */ +/* Enable A Handler For Interrupt Events */ +/* Wait For An Interrupt Event */ +/* (Assert An Interrupt From VIC) */ +/* Continue to Wait For Interrupt Events Until User Ends Program */ +/* Close the VISA session */ +/**********************************************************************/ + +#include +#include + +#include "visa.h" + +static ViUInt16 StatusID; +static ViSession instr; +static ViSession defaultRM; +static ViStatus status; +static int tempchar; + +ViStatus _VI_FUNCH IntrHandler(ViSession instr, ViEventType etype, ViEvent event, ViAddr userhandle); + +/* + * Here we define the function that is called whenever an interrupt event + * is received. + */ +ViStatus _VI_FUNCH IntrHandler(ViSession instr, ViEventType etype, ViEvent event, ViAddr userhandle) +{ + /* etype is a number which identifies the event type that has been received. */ + viGetAttribute (event, VI_ATTR_SIGP_STATUS_ID, &StatusID); + printf("An event was received. The Status/ID value is 0x%x\n",StatusID); + + /* System calls are allowed to be used inside the event handler on + all VISA supported platforms other than Macintosh. */ + return VI_SUCCESS; +} + +/* + * main code. + */ +int main (void) +{ + /* + * First we must call viOpenDefaultRM to get the manager + * handle. We will store this handle in defaultRM. + */ + status=viOpenDefaultRM (&defaultRM); + if (status < VI_SUCCESS) + { + printf("Could not open a session to the VISA Resource Manager!\n"); + exit (EXIT_FAILURE); + } + + /* + * Note: at this point it would be proper programming procedure to + * to call viFindRsrc to find available instruments to which we can + * open a session. The viFindRsrc function returns the descriptor + * for the first of these instrument. viFindNext can then be used to + * get descriptors for the other instruments. These descriptors + * are then used to open a session to the desired instrument. + * For simplicity, we will assume there is a controller + * at Logical Address zero and open a session to this address. + */ + + /* + * Now we will open a VISA session to the device at logical + * address zero. We must use the resource manager handle + * from viOpenDefaultRM. We must also use a string which will + * indicate which instrument to open. This is called the + * instrument descriptor. The format for this string can + * be found in the NI-VISA User Manual. After opening a session to the + * device, we will get a handle to the instrument which we + * will use in later VISA functions. The remaining two parameters + * in this function are reserved for future functionality. + * They are given the values VI_NULL. + */ + status = viOpen (defaultRM, "VXI::0::INSTR", VI_NULL, VI_NULL, &instr); + if (status < VI_SUCCESS) + { + printf("Can not open a VISA session to VXI0::0::INSTR\n"); + viClose (defaultRM); + exit (EXIT_SUCCESS); + } + + /* + * Now we will install the event handler that will monitor interrupt + * events. The handler is named IntrHandler. uhandle is a handle + * allowing data to be passed to the handler from the application. + */ + status = viInstallHandler (instr, VI_EVENT_VXI_SIGP, IntrHandler, VI_NULL); + if (status < VI_SUCCESS) + { + printf("Could not install the interrupt handler.\n"); + viClose (defaultRM); + exit (EXIT_SUCCESS); + } + + /* + * Now we will enable signal processing events so the program can + * receive them into its event handler. It will only receive events for + * interrupts or signals. See the other interrupt example to see how things + * would differ if events were queued. + */ + status = viEnableEvent (instr, VI_EVENT_VXI_SIGP, VI_HNDLR, VI_NULL); + if (status < VI_SUCCESS) + { + printf("Could not enable the interrupt event.\n"); + viClose (defaultRM); + exit (EXIT_SUCCESS); + } + + /* + * Under Windows 3.x or the Macintosh, Yield() or PeekMessage() functions + * may need to be called to give up processor time so that VISA events + * will be invoked. Under WIN32 or UNIX, this is not necessary because + * VISA event handlers are spawned in a separate thread. + */ + printf("Press any key to stop waiting for events.\n"); + fflush(stdin); + tempchar=getchar(); + + /* + * The VXI Interactive Control program, VIC, can be used to + * assert an interrupt or generate a signal. Send the StatusId = 0xFD00 + * for this example. The driver does not pass interrupts generated from + * National Instruments' controllers with certain StatusId values to + * to the event handler. + */ + + /* Now we will uninstall the handler we installed to handle interrupts + * Calling this function will implicitly call viDisableEvent(). + * Note that unlike viWaitonEvent, the event is closed for us when we + * exit the handler. Compare this with the other interrupt example. */ + status = viUninstallHandler (instr, VI_EVENT_VXI_SIGP, IntrHandler, VI_NULL); + + /* Now we will close the session to the instrument using + * viClose. We will tell VISA what to close using the handle, "instr". */ + viClose (instr); + viClose (defaultRM); + printf("\nHit Enter to continue."); + fflush(stdin); + getchar(); + + return 0; +} + diff --git a/NI-VISA/Examples/C/Vxi-vme/AsyncIntr_MSVC.dsp b/NI-VISA/Examples/C/Vxi-vme/AsyncIntr_MSVC.dsp new file mode 100644 index 0000000..14fb916 --- /dev/null +++ b/NI-VISA/Examples/C/Vxi-vme/AsyncIntr_MSVC.dsp @@ -0,0 +1,115 @@ +# Microsoft Developer Studio Project File - Name="AsyncIntr" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=AsyncIntr - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "AsyncIntr_MSVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "AsyncIntr_MSVC.mak" CFG="AsyncIntr - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "AsyncIntr - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "AsyncIntr - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "AsyncIntr - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /machine:I386 /out:"Release/AsyncIntr.exe" + +!ELSEIF "$(CFG)" == "AsyncIntr - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /debug /machine:I386 /out:"Debug/AsyncIntr.exe" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "AsyncIntr - Win32 Release" +# Name "AsyncIntr - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\AsyncIntr.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visa.h +# End Source File +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visatype.h +# End Source File +# End Group +# Begin Group "Library Files" + +# PROP Default_Filter "lib" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\lib\msc\visa32.lib +# End Source File +# End Group +# End Target +# End Project diff --git a/NI-VISA/Examples/C/Vxi-vme/AsyncIntr_MSVC_VS2005.vcproj b/NI-VISA/Examples/C/Vxi-vme/AsyncIntr_MSVC_VS2005.vcproj new file mode 100644 index 0000000..811d587 --- /dev/null +++ b/NI-VISA/Examples/C/Vxi-vme/AsyncIntr_MSVC_VS2005.vcproj @@ -0,0 +1,501 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NI-VISA/Examples/C/Vxi-vme/HighReg.c b/NI-VISA/Examples/C/Vxi-vme/HighReg.c new file mode 100644 index 0000000..2b2f48a --- /dev/null +++ b/NI-VISA/Examples/C/Vxi-vme/HighReg.c @@ -0,0 +1,153 @@ +/**************************************************************/ +/* High Level Register Access Example */ +/* */ +/* This example reads and writes the offset register of the */ +/* device at logical address 0. To do this, the code reads */ +/* the register at 0xC006 in A16 space, then writes the value*/ +/* back to the same register. Then it moves the first four */ +/* configuration registers into local RAM and displays this */ +/* on the STDIO window. This code uses only VISA functions. */ +/* */ +/* The general flow of this code is: */ +/* Open Resource Manager */ +/* Open VISA session to the instrument at LA 0 */ +/* Read the offset register */ +/* Write the same value back to the offset register */ +/* Move in the first 4 config registers */ +/* Close VISA session */ +/**************************************************************/ + +#include +#include + +#include "visa.h" + +static ViSession defaultRM; +static ViSession instr; +static ViUInt16 value; +static ViBusAddress offset; +static ViUInt16 data[4]; +static ViBusSize count; +static ViStatus status; + +int main (void) +{ + /* + * First we must call viOpenDefaultRM to get the manager + * handle. We will store this handle in defaultRM. + */ + status=viOpenDefaultRM (&defaultRM); + if (status < VI_SUCCESS) + { + printf("Could not open a session to the VISA Resource Manager!\n"); + exit (EXIT_FAILURE); + } + + + /* + * Note: at this point it would be proper programming procedure to + * to call viFindRsrc to find available instruments to which we can + * open a session. The viFindRsrc function returns the descriptor + * for the first of these instrument. viFindNext can then be used to + * get descriptors for the other instruments. These descriptors + * are then used to open a session to the desired instrument. + * For simplicity, we will assume there is a controller + * at Logical Address zero and open a session to this address. + */ + + /* + * Now we will open a VISA session to the device at logical + * address zero. We must use the resource manager handle + * from viOpenDefaultRM. We must also use a string which will + * indicate which instrument to open. This is called the + * instrument descriptor. The format for this string can + * be found in the NI-VISA User Manual. After opening a session to the + * device, we will get a handle to the instrument which we + * will use in later VISA functions. The remaining two parameters + * in this function are reserved for future functionality. + * They are given the values VI_NULL. + */ + status = viOpen (defaultRM, "VXI0::0::INSTR", VI_NULL, VI_NULL, &instr); + if (status < VI_SUCCESS) + { + printf ("Cannot open a session to the device.\n"); + viClose (defaultRM); + exit (EXIT_SUCCESS); + } + + /* + * Now we will read in the offset register and display it + * on the screen. We must use the session handle to the + * instrument from the viOpen function. We will be reading + * 16 bits by using the viIn16 function. + */ + offset = 0x6; /* offset in A16 space from the base of the device's memory */ + + /* + * Note that the offset is relative to the base of the device's + * memory in that address space. Offset is not the absolute address + * of the device. + */ + status = viIn16 (instr, VI_A16_SPACE, offset, &value); + if (status < VI_SUCCESS) /* an error occurred */ + { + printf ("Cannot communicate with device.\n"); + } + else /* read was successful */ + { + printf ("The offset register of the device at LA 0 is 0x%x\n", value); + } + + /* + * Now we will write out the value just read with the + * viOut16 function. We will write this to the offset + * register of the device at logical address zero + * using the instrument handle returned from viOpen. + */ + status = viOut16 (instr, VI_A16_SPACE, offset, value); + if (status < VI_SUCCESS) /* success */ + { + printf("Cannot write data to registers.\n"); + } + else /* an error occurred */ + { + printf ("0x%x was written correctly to the Offset Register.\n",value); + } + + /* + * Now we will move the first 4 configuration registers into local + * memory. This will be done using viMoveIn16. + */ + offset = 0; /* we want to get data from 0xC000-0xC007 */ + count = 4; /* move 4 16-bit pieces of data */ + + status = viMoveIn16 (instr, VI_A16_SPACE, offset, count, data); + if (status < VI_SUCCESS) /* error occurred */ + { + printf ("Could not move data.\n"); + } + else /* successful move */ + { + printf ("\nThe first 4 configuration registers are:\n"); + printf ("Register 0 = 0x%04hX\n", data[0]); + printf ("Register 1 = 0x%04hX\n", data[1]); + printf ("Register 2 = 0x%04hX\n", data[2]); + printf ("Register 3 = 0x%04hX\n", data[3]); + } + + /* + * Now we must close the session to the instrument using + * viClose. We must tell VISA what to close by use of the + * instrument handle, "instr". We will also close the VISA + * Resource Manager. + */ + + status = viClose (instr); + status = viClose (defaultRM); + printf("\nHit Enter to continue."); + fflush(stdin); + getchar(); + + return 0; +} + diff --git a/NI-VISA/Examples/C/Vxi-vme/HighReg_MSVC.dsp b/NI-VISA/Examples/C/Vxi-vme/HighReg_MSVC.dsp new file mode 100644 index 0000000..e02f110 --- /dev/null +++ b/NI-VISA/Examples/C/Vxi-vme/HighReg_MSVC.dsp @@ -0,0 +1,115 @@ +# Microsoft Developer Studio Project File - Name="HighReg" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=HighReg - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "HighReg_MSVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "HighReg_MSVC.mak" CFG="HighReg - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "HighReg - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "HighReg - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "HighReg - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /machine:I386 /out:"Release/HighReg.exe" + +!ELSEIF "$(CFG)" == "HighReg - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /debug /machine:I386 /out:"Debug/HighReg.exe" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "HighReg - Win32 Release" +# Name "HighReg - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\HighReg.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visa.h +# End Source File +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visatype.h +# End Source File +# End Group +# Begin Group "Library Files" + +# PROP Default_Filter "lib" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\lib\msc\visa32.lib +# End Source File +# End Group +# End Target +# End Project diff --git a/NI-VISA/Examples/C/Vxi-vme/HighReg_MSVC_VS2005.vcproj b/NI-VISA/Examples/C/Vxi-vme/HighReg_MSVC_VS2005.vcproj new file mode 100644 index 0000000..416dcbc --- /dev/null +++ b/NI-VISA/Examples/C/Vxi-vme/HighReg_MSVC_VS2005.vcproj @@ -0,0 +1,501 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NI-VISA/Examples/C/Vxi-vme/LowReg.c b/NI-VISA/Examples/C/Vxi-vme/LowReg.c new file mode 100644 index 0000000..5b1140f --- /dev/null +++ b/NI-VISA/Examples/C/Vxi-vme/LowReg.c @@ -0,0 +1,158 @@ +/**************************************************************/ +/* Low Level Register Access Example */ +/* */ +/* This example uses low level register functions to read the */ +/* offset register of a VXI device at logical address 0. The */ +/* program uses the viMapAddress function to map a window */ +/* to the A16 VXI address space and then uses viPeek to read */ +/* the value of this register. */ +/* */ +/* The general flow of this code is: */ +/* Open Resource Manager */ +/* Open VISA session to an instrument */ +/* Map the desired VXI memory to the local processor's memory */ +/* Use viPeek to read the offset register */ +/* Unmap the memory */ +/* Close the VISA session */ +/**************************************************************/ + +#include +#include + +#include "visa.h" + +#define ADD_OFFSET(addr, offs) (((ViPByte)addr) + (offs)) + +static ViSession defaultRM; +static ViSession instr; +static ViUInt16 value, access; +static ViBusAddress offset; +static ViAddr mapped_address, address; +static ViBusSize size; +static ViStatus status; + +int main (void) +{ + /* + * First we must call viOpenDefaultRM to get the manager + * handle. We will store this handle in defaultRM. + */ + status=viOpenDefaultRM (&defaultRM); + if (status < VI_SUCCESS) + { + printf("Could not open a session to the VISA Resource Manager!\n"); + exit (EXIT_FAILURE); + } + + /* + * Note: at this point it would be proper programming procedure to + * to call viFindRsrc to find available instruments to which we can + * open a session. The viFindRsrc function returns the descriptor + * for the first of these instrument. viFindNext can then be used to + * get descriptors for the other instruments. These descriptors + * are then used to open a session to the desired instrument. + * For simplicity, we will assume there is a controller + * at Logical Address zero and open a session to this address. + */ + + /* + * Now we will open a VISA session to the device at logical + * address zero. We must use the resource manager handle + * from viOpenDefaultRM. We must also use a string which will + * indicate which instrument to open. This is called the + * instrument descriptor. The format for this string can + * be found in the NI-VISA User Manual. After opening a session to the + * device, we will get a handle to the instrument which we + * will use in later VISA functions. The remaining two parameters + * in this function are reserved for future functionality. + * They are given the values VI_NULL. + */ + status = viOpen (defaultRM, "VXI0::0::INSTR", VI_NULL, VI_NULL, &instr); + if (status < VI_SUCCESS) + { + printf ("Cannot open a session to the device.\n"); + viClose (defaultRM); + exit (EXIT_SUCCESS); + } + + /* Now we will map a window to the A16 space containing the + * configuration registers of the device using the viMapAddress + * function. This function will use the session to the + * device we obtained using viOpen. + */ + offset = 0x0; /* read Offset register in A16 */ + size = 0x40; /* we will map to all configuration registers */ + status = viMapAddress (instr, VI_A16_SPACE, offset, size, VI_FALSE, VI_NULL,&mapped_address); + if (status < VI_SUCCESS) + { + printf ("Error mapping the address to local memory\n"); + printf ("Make sure you have a User Window configured in VXIedit\n"); + viClose (defaultRM); + exit (EXIT_SUCCESS); + } + + /* + * Now we will use the viPeek16 function to read the value + * of the Offset register for the device at LA 0 which we have + * mapped to the A16 space. We will do this using the pointer + * returned from the viMapAddress function. The viPeek function + * basically just dereferences a pointer to the VXI address space. + * The Offset register is at offset 0x6, so we need to increment + * the mapped address. + */ + + /* + * Now that we have mapped the window, we can use the pointer + * to read and write to registers. We could do this by directly + * dereferencing the pointer, or by using viPeekXX/viPokeXX. On + * some O/S's you will not be able to directly dereference the pointer, + * so your code is more portable if you use viPeekXX/viPokeXX. To + * find out if you can directly dereference the pointer, you can get + * a VISA Attribute. In the following code, we check to see if we + * can dereference the pointer. If that is permitted we will read + * the Offset register by a direct dereference, otherwise we call + * viPeek16. After this we call viPeek again. + */ + + /* Now we will use a macro to manipulate the pointer. This */ + /* macro will add the correct value to the pointer to make */ + /* it point to the Offset register. */ + address = ADD_OFFSET (mapped_address, 6); + + viGetAttribute (instr, VI_ATTR_WIN_ACCESS, &access); + if (access == VI_DEREF_ADDR) /* can dereference the pointer directly */ + { + printf ("Direct Pointer Dereference was used to read the Offset Register.\n"); + value = *(ViPUInt16)address; + } + else /* must use viPeek16 */ + { + printf ("viPeek16 was used to read the Offset Register.\n"); + viPeek16 (instr, address, &value); + } + + printf("The value read from the Offset register is 0x%hX\n", value); + + /* Now do viPeek16 again in case you could dereference the pointer in the first access. */ + viPeek16 (instr, address, &value); + printf ("The value read from the Offset Register using viPeek16 was 0x%hx", value); + + /* + * Now we need to unmap the User Window for completeness of + * code. + */ + status = viUnmapAddress (instr); + + /* + * Finally, we need to close all the VISA sessions that we + * opened + */ + viClose (instr); + viClose (defaultRM); + printf("\nHit Enter to continue."); + fflush(stdin); + getchar(); + + return 0; +} + diff --git a/NI-VISA/Examples/C/Vxi-vme/LowReg_MSVC.dsp b/NI-VISA/Examples/C/Vxi-vme/LowReg_MSVC.dsp new file mode 100644 index 0000000..33ae782 --- /dev/null +++ b/NI-VISA/Examples/C/Vxi-vme/LowReg_MSVC.dsp @@ -0,0 +1,115 @@ +# Microsoft Developer Studio Project File - Name="LowReg" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=LowReg - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "LowReg_MSVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "LowReg_MSVC.mak" CFG="LowReg - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "LowReg - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "LowReg - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "LowReg - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /machine:I386 /out:"Release/LowReg.exe" + +!ELSEIF "$(CFG)" == "LowReg - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /debug /machine:I386 /out:"Debug/LowReg.exe" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "LowReg - Win32 Release" +# Name "LowReg - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\LowReg.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visa.h +# End Source File +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visatype.h +# End Source File +# End Group +# Begin Group "Library Files" + +# PROP Default_Filter "lib" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\lib\msc\visa32.lib +# End Source File +# End Group +# End Target +# End Project diff --git a/NI-VISA/Examples/C/Vxi-vme/LowReg_MSVC_VS2005.vcproj b/NI-VISA/Examples/C/Vxi-vme/LowReg_MSVC_VS2005.vcproj new file mode 100644 index 0000000..030bf5d --- /dev/null +++ b/NI-VISA/Examples/C/Vxi-vme/LowReg_MSVC_VS2005.vcproj @@ -0,0 +1,501 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NI-VISA/Examples/C/Vxi-vme/ShareSys.c b/NI-VISA/Examples/C/Vxi-vme/ShareSys.c new file mode 100644 index 0000000..05abdad --- /dev/null +++ b/NI-VISA/Examples/C/Vxi-vme/ShareSys.c @@ -0,0 +1,260 @@ +/**************************************************************/ +/* How to Share System Memory Example */ +/* */ +/* This example demonstrates how to share memory from */ +/* a National Instruments controller to the VXI backplane. */ +/* */ +/* Before proceeding, familiarize yourself with application */ +/* note 018, Use of Local Shared RAM on NI-VXI Interfaces, */ +/* from National Instrument's web or ftp site or */ +/* faxback system. */ +/* */ +/* You will need to make some configuration changes in */ +/* VXIEdit or VXItedit or T&M Explorer. Note that these */ +/* descriptions apply to MITE based controllers. */ +/* Please refer to the documentation that came with your */ +/* controller to determine how to configure shared memory */ +/* from system memory. */ +/* */ +/* The following steps must be carried out before memory can */ +/* be shared. If using VXIEdit or VXItedit, start below. */ +/* Is using the T&M Explorer, skip down to that section */ +/* */ +/* VXIEdit/VXItedit settings: */ +/* 1. In the logical address configuration page for the */ +/* controller set the Address Space parameter to A16/A24 */ +/* or A16/A32 (preferred) depending on which space you want */ +/* to use to share memory. The A16/A32 allows you to share */ +/* all system RAM. */ +/* */ +/* 2. Set the VXI Shared RAM Size. parameter to program the */ +/* VXI interface registers to map cycles from the */ +/* VXI/VMEbus to the computer memory. It is recommended */ +/* that you set this to All System RAM. A16/A24 does not */ +/* usually allow you to select All System RAM */ +/* */ +/* 3. Set the Shared RAM Pool to the amount of RAM that you */ +/* actually need plus 1kB. The Shared RAM Pool indicates */ +/* the amount of physically contiguous memory that is */ +/* allocated on system startup. This reserved memory can */ +/* be shared to the VXI/VMEbus by the VISA MemAlloc call. */ +/* Remember that the OS will be denied access to this */ +/* memory, so take into account the memory requirements of */ +/* your OS and your applications with regard to the amount */ +/* of RAM in your system before setting this option. */ +/* If VISA MemAlloc fails, it may be because your system */ +/* could not provide for sufficient reserved memory for */ +/* the Shared RAM Pool. */ +/* If this happens, simply make the Shared RAM Pool */ +/* smaller until VISA MemAlloc returns successfully. */ +/* */ +/* T&M Explorer settings: */ +/* 1. Select the VXI controller, i.e. PCI-MXI-2. Right click */ +/* on the selection and choose Hardware Configuration. */ +/* Select the Shared Memory tab. Note that you can get */ +/* help on each step by right clicking on each setting. */ +/* */ +/* 2. Select Share RAM in A24 Space or Select Share RAM in */ +/* A32 Space (preferred). */ +/* */ +/* 3. Next set the VXI Shared RAM Size parameter to program */ +/* the VXI interface registers to map cycles from the */ +/* VXI/VMEbus to the computer memory. */ +/* It is recommended to set this to All System RAM */ +/* (usually not available if you have Share RAM in A24 */ +/* selected above). */ +/* */ +/* 4. Set the Reserve Physical Memory to the amount of RAM */ +/* that you actually need plus 1kB. The Reserve Physical */ +/* Memory indicates the amount of physically contiguous */ +/* memory that is allocated on system startup. This */ +/* reserved memory can be shared to the VXI/VMEbus by */ +/* the VISA MemAlloc call. */ +/* Remember that the OS will be denied access to this */ +/* memory, so take into account the memory requirements of */ +/* your OS and your applications with regard to the amount */ +/* of RAM in your system before setting this option. */ +/* If VISA MemAlloc fails, it may be because your system */ +/* could not provide for sufficient reserved memory for the */ +/* Reserve Physical Memory. */ +/* If this happens, simply make the Reserve Physical Memory */ +/* smaller until VISA MemAlloc returns successfully. */ +/* */ +/* Now, you are ready to run this example. Keep in mind, */ +/* that if VISA MemAlloc fails, request less memory in the */ +/* Shared RAM Pool or Reserve Physical Memory settings. */ +/* Obviously, the Size parameter passed into VISA MemAlloc */ +/* must be made correspondingly smaller. */ +/* */ +/* The general flow of this code is: */ +/* Open Resource Manager */ +/* Open a session to LA 0 */ +/* Allocate the shared memory */ +/* Use viGetAttribute to determine the offset of the shared */ +/* memory. */ +/* Use viOut16 to write a value into shared memory */ +/* Use viIn16 to read the value to see if the data was */ +/* written correctly. */ +/* Use viMemFree to free the shared memory buffer. */ +/* Close VISA sessions */ +/**************************************************************/ + +#include +#include + +#include "visa.h" + +static ViSession instr, defaultRM; +static ViAddr local_address; +static ViBusAddress offset; +static ViBusSize size; +static ViUInt16 addrspace, value; +static int base; +static ViStatus status; + +int main (void) +{ + /* + * First we must call viOpenDefaultRM to get the manager + * handle. We will store this handle in defaultRM. + */ + status=viOpenDefaultRM (&defaultRM); + if (status < VI_SUCCESS) + { + printf("Could not open a session to the VISA Resource Manager!\n"); + exit (EXIT_FAILURE); + } + + /* + * Note: at this point it would be proper programming procedure to + * to call viFindRsrc to find available instruments to which we can + * open a session. The viFindRsrc function returns the descriptor + * for the first of these instrument. viFindNext can then be used to + * get descriptors for the other instruments. These descriptors + * are then used to open a session to the desired instrument. + * For simplicity, we will assume there is a controller + * at Logical Address zero and open a session to this address. + */ + + /* + * Now we will open a VISA session to the device at logical + * address zero. We must use the resource manager handle + * from viOpenDefaultRM. We must also use a string which will + * indicate which instrument to open. This is called the + * instrument descriptor. The format for this string can + * be found in the NI-VISA User Manual. After opening a session to the + * device, we will get a handle to the instrument which we + * will use in later VISA functions. The remaining two parameters + * in this function are reserved for future functionality. + * They are given the values VI_NULL. + */ + status = viOpen (defaultRM, "VXI0::0::INSTR", VI_NULL, VI_NULL, &instr); + if (status < VI_SUCCESS) + { + printf ("Cannot open a session to the device.\n"); + viClose (defaultRM); + exit (EXIT_SUCCESS); + } + + /* Now we will allocate the first 100 bytes of shared + * memory by the device at LA 0 using the viMemAlloc function. + * This function is only valid on sessions to the local controller. + * This function will return a pointer to local memory and + * we will store this in the variable "offset." + */ + + /* This is how much memory we are going to set aside + * in our local RAM. Even though we have possibly many + * megs requested in VXI space, we are only going to + * use 0x100 bytes. This value is arbitrary for this example. + */ + size = 0x100; + status = viMemAlloc (instr, size, &offset); + if (status < VI_SUCCESS) /* an error occurred */ + { + printf("Failed to successfully allocate system RAM.\n"); + viClose (defaultRM); + printf("\nPress any key to exit..."); + fflush(stdin); + getchar(); + exit (EXIT_SUCCESS); + } + + /* We will determine in which address space the shared memory is located. */ + viGetAttribute (instr, VI_ATTR_MEM_SPACE, &addrspace); + + /* We will also find the base address of our controller so another */ + /* bus master can access our shared memory. */ + viGetAttribute (instr, VI_ATTR_MEM_BASE, &base); + + /* + * Now we will try to do a cycle of high level In's and Out's + * to show how the shared memory can be accessed. + */ + + /* Now let's write a value into this memory. */ + status = viOut16 (instr, addrspace, offset, 0xBEEF); + if (status < VI_SUCCESS) + printf ("Could not write into the shared memory.\n"); + + + /* At this point, you can use another bus master to access + * the shared memory at the Base + Offset. + * You may notice that you will not be able to self-access + * this memory from another application such as VIC or VISAIC. + * The hardware is not capable of allowing self-accesses. + * But the viIn16 and viOut16 in this example works because + * VISA keeps track of the actual memory buffer that is allocated + * and allows direct access to the memory. + * This allows viIn16 and viOut16 to work without accessing the VXI/VME bus. + */ + printf("The shared memory is located at absolute address 0x%08lX",base + offset); + switch (addrspace) + { + case VI_A16_SPACE: + printf(" in A16 address space.\n\n"); + break; + case VI_A24_SPACE: + printf(" in A24 address space.\n\n"); + break; + case VI_A32_SPACE: + printf(" in A32 address space.\n\n"); + break; + default: + break; + } + + /* Now let's read back from this location and see if it is */ + /* the correct value. */ + status = viIn16 (instr, addrspace, offset, &value); + if (status < VI_SUCCESS) + printf ("Could not read from shared memory.\n"); + else if (value == 0xBEEF) + printf ("Value written = value read; sharing is successful!\n"); + else + printf ("We wrote 0xBEEF, but read back 0x%04hX\n", value); + + /* + * At this point we have to clean up after ourselves by freeing + * the shared memory. + * This will be done using the viMemFree function. + */ + status = viMemFree (instr, offset); /* free the allocated memory */ + if (status < VI_SUCCESS) + printf("An error occurred in freeing the local memory.\n"); + + /* + * Now we will close the session to the instrument using + * viClose. We will tell VISA what to close using the + * instrument handle "instr" + */ + + status = viClose (instr); + status = viClose (defaultRM); + printf("\nHit Enter to continue."); + fflush(stdin); + getchar(); + + return 0; +} + diff --git a/NI-VISA/Examples/C/Vxi-vme/ShareSys_MSVC.dsp b/NI-VISA/Examples/C/Vxi-vme/ShareSys_MSVC.dsp new file mode 100644 index 0000000..c1d4301 --- /dev/null +++ b/NI-VISA/Examples/C/Vxi-vme/ShareSys_MSVC.dsp @@ -0,0 +1,115 @@ +# Microsoft Developer Studio Project File - Name="ShareSys" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=ShareSys - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ShareSys_MSVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ShareSys_MSVC.mak" CFG="ShareSys - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ShareSys - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "ShareSys - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ShareSys - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /machine:I386 /out:"Release/ShareSys.exe" + +!ELSEIF "$(CFG)" == "ShareSys - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /debug /machine:I386 /out:"Debug/ShareSys.exe" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "ShareSys - Win32 Release" +# Name "ShareSys - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\ShareSys.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visa.h +# End Source File +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visatype.h +# End Source File +# End Group +# Begin Group "Library Files" + +# PROP Default_Filter "lib" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\lib\msc\visa32.lib +# End Source File +# End Group +# End Target +# End Project diff --git a/NI-VISA/Examples/C/Vxi-vme/ShareSys_MSVC_VS2005.vcproj b/NI-VISA/Examples/C/Vxi-vme/ShareSys_MSVC_VS2005.vcproj new file mode 100644 index 0000000..81d0589 --- /dev/null +++ b/NI-VISA/Examples/C/Vxi-vme/ShareSys_MSVC_VS2005.vcproj @@ -0,0 +1,501 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NI-VISA/Examples/C/Vxi-vme/WaitIntr.c b/NI-VISA/Examples/C/Vxi-vme/WaitIntr.c new file mode 100644 index 0000000..6676a42 --- /dev/null +++ b/NI-VISA/Examples/C/Vxi-vme/WaitIntr.c @@ -0,0 +1,144 @@ +/**********************************************************************/ +/* Synchronous Interrupt Events Example */ +/* */ +/* This example is written using VISA. */ +/* This code opens a session to a controller at Logical Address zero */ +/* Then configures an event queue to receive interrupts. */ +/* The program can be exercised by running it and then asserting an */ +/* interrupt with VIC, the VXI Interactive Control program. */ +/* */ +/* The general flow of this code is: */ +/* Open Resource Manager */ +/* Open VISA session to an instrument */ +/* Enable Signal Processing Events To Be Queued */ +/* Wait For An Interrupt Event */ +/* [Assert an Interrupt from VIC - AssertVXIint( 0, 1, 0xFD00 )] */ +/* Check The Status ID Of The Interrupt Event */ +/* Close the VISA session */ +/**********************************************************************/ + +#include +#include + +#include "visa.h" + +static ViSession defaultRM; +static ViSession instr; +static ViUInt32 WaitTimeout; +static ViEvent event; +static ViEventType etype; +static ViUInt16 intrID; +static ViStatus status; + +int main (void) +{ + /* + * First we must call viOpenDefaultRM to get the manager + * handle. We will store this handle in defaultRM. + */ + status=viOpenDefaultRM (&defaultRM); + if (status < VI_SUCCESS) + { + printf("Could not open a session to the VISA Resource Manager!\n"); + exit (EXIT_FAILURE); + } + + /* + * Note: at this point it would be proper programming procedure to + * to call viFindRsrc to find available instruments to which we can + * open a session. The viFindRsrc function returns the descriptor + * for the first of these instrument. viFindNext can then be used to + * get descriptors for the other instruments. These descriptors + * are then used to open a session to the desired instrument. + * For simplicity, we will assume there is a controller + * at Logical Address zero and open a session to this address. + */ + + /* + * Now we will open a VISA session to the device at logical + * address zero. We must use the resource manager handle + * from viOpenDefaultRM. We must also use a string which will + * indicate which instrument to open. This is called the + * instrument descriptor. The format for this string can + * be found in the NI-VISA User Manual. After opening a session to the + * device, we will get a handle to the instrument which we + * will use in later VISA functions. The remaining two parameters + * in this function are reserved for future functionality. + * They are given the values VI_NULL. + */ + status = viOpen (defaultRM, "VXI::0::INSTR", VI_NULL, VI_NULL, &instr); + if (status < VI_SUCCESS) + { + printf ("Cannot open a session to the device.\n"); + viClose (defaultRM); + exit (EXIT_SUCCESS); + } + + /* + * Now we will enable signal processing events so the program can + * receive them into the event queue. We will use the queuing method + * instead of setting up a handler. See the other interrupt example to + * see how things would differ if a handler was set up. The default + * queue size is 50. This can be changed with the viSetAttribute + * function but it must be done before calling viEnableEvent(). + */ + printf("Waiting for an event...\n"); + status = viEnableEvent (instr, VI_EVENT_VXI_SIGP, VI_QUEUE, VI_NULL); + if (status < VI_SUCCESS) + { + printf("Error enabling events.\n"); + viClose (instr); + viClose (defaultRM); + exit (EXIT_SUCCESS); + } + + /* + * Next we must use the viWaitOnEvent function to check the queue + * for a signal processing event. This function can be given a timeout + * after which it will return if no event has been received. The + * timeout can be set to VI_TMO_IMMEDIATE to just pull the oldest event + * off the queue. To test this example an interrupt can be asserted + * using VIC, the VXI Interactive Control program. + * Call AssertVXIint with these arguments: AssertVXIint( 0, 1, 0xFD00 ) + * to use the default controller to assert an interrupt on level 1 with a + * StatusID of 0xFD00. Note that most VXI interrupters will place its + * logical address in the lower byte of the StatusID. + */ + printf("Waiting for an interrupt. Use VIC to assert an interrupt with\n "); + printf("these parameters: AssertVXIint( 0, 1, 0xFD00 )\n"); + + WaitTimeout = 8000; /* Wait 8 seconds for an event */ + status = viWaitOnEvent (instr, VI_EVENT_VXI_SIGP, WaitTimeout, &etype, &event); + if (status < VI_SUCCESS) + { + printf ("No event was received in the designated period.\n"); + } + else + { + /* + * Now we will use the event handle returned by viWaitOnEvent to + * check the Status ID attribute. Only interrupts from LA 0 + * will be seen because it was set up in a session to LA 0. + */ + status = viGetAttribute (event, VI_ATTR_SIGP_STATUS_ID, &intrID); + printf ("The Status/ID was 0x%hX\n", intrID); + + /* + * Now we will close the session for the event using viClose. + */ + status = viClose (event); + } + + /* + * Now we will close the session to the instrument. + */ + + status = viClose (instr); + status = viClose (defaultRM); + printf ("\nHit Enter to continue."); + fflush (stdin); + getchar(); + + return 0; +} + diff --git a/NI-VISA/Examples/C/Vxi-vme/WaitIntr_MSVC.dsp b/NI-VISA/Examples/C/Vxi-vme/WaitIntr_MSVC.dsp new file mode 100644 index 0000000..f305575 --- /dev/null +++ b/NI-VISA/Examples/C/Vxi-vme/WaitIntr_MSVC.dsp @@ -0,0 +1,115 @@ +# Microsoft Developer Studio Project File - Name="WaitIntr" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=WaitIntr - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "WaitIntr_MSVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "WaitIntr_MSVC.mak" CFG="WaitIntr - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "WaitIntr - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "WaitIntr - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "WaitIntr - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /machine:I386 /out:"Release/WaitIntr.exe" + +!ELSEIF "$(CFG)" == "WaitIntr - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /debug /machine:I386 /out:"Debug/WaitIntr.exe" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "WaitIntr - Win32 Release" +# Name "WaitIntr - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\WaitIntr.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visa.h +# End Source File +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visatype.h +# End Source File +# End Group +# Begin Group "Library Files" + +# PROP Default_Filter "lib" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\lib\msc\visa32.lib +# End Source File +# End Group +# End Target +# End Project diff --git a/NI-VISA/Examples/C/Vxi-vme/WaitIntr_MSVC_VS2005.vcproj b/NI-VISA/Examples/C/Vxi-vme/WaitIntr_MSVC_VS2005.vcproj new file mode 100644 index 0000000..eba06dd --- /dev/null +++ b/NI-VISA/Examples/C/Vxi-vme/WaitIntr_MSVC_VS2005.vcproj @@ -0,0 +1,501 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NI-VISA/Examples/C/Vxi-vme/WaitTrig.c b/NI-VISA/Examples/C/Vxi-vme/WaitTrig.c new file mode 100644 index 0000000..ce6f444 --- /dev/null +++ b/NI-VISA/Examples/C/Vxi-vme/WaitTrig.c @@ -0,0 +1,158 @@ +/**********************************************************************/ +/* Synchronous Trigger Events Example */ +/* */ +/* This code opens a session to a device at Logical Address two. */ +/* The programs sets up an event queue to receive triggers on TTL */ +/* Trigger line three. The program can be tested easily by */ +/* running the program and then asserting a trigger in VIC, the VXI */ +/* Interactive Control program. The program is written using VISA. */ +/* */ +/* The general flow of this code is: */ +/* Open Resource Manager */ +/* Open VISA session to an instrument */ +/* Enable a particular trigger line using the Trigger Attribute */ +/* Enable Trigger Events To Be Queued */ +/* Wait For A Trigger Event */ +/* [Source TTL Trigger line 3 using VIC - SrcTrig( -1, 3, 4, 1000 );]*/ +/* Check The ID Of Received Trigger Event To See If It Was Line 3 */ +/* Close The Event */ +/* Close the VISA session */ +/**********************************************************************/ + +#include +#include + +#include "visa.h" + +static ViSession defaultRM; +static ViSession instr; +static ViUInt32 WaitTimeout; +static ViInt16 trig_line; +static ViEvent event; +static ViEventType type; +static ViStatus status; + +int main (void) +{ + /* + * First we must call viOpenDefaultRM to get the manager + * handle. We will store this handle in defaultRM. + */ + status=viOpenDefaultRM (&defaultRM); + if (status < VI_SUCCESS) + { + printf("Could not open a session to the VISA Resource Manager!\n"); + exit (EXIT_FAILURE); + } + + /* + * Note: at this point it would be proper programming procedure to + * to call viFindRsrc to find available instruments to which we can + * open a session. The viFindRsrc function returns the descriptor + * for the first of these instrument. viFindNext can then be used to + * get descriptors for the other instruments. These descriptors + * are then used to open a session to the desired instrument. + * For simplicity, we will assume there is a controller + * at Logical Address zero and open a session to this address. + */ + + /* + * Now we will open a VISA session to the device at logical + * address two. We must use the resource manager handle + * from viOpenDefaultRM. We must also use a string which will + * indicate which instrument to open. This is called the + * instrument descriptor. The format for this string can + * be found in the NI-VISA User Manual. After opening a session to the + * device, we will get a handle to the instrument which we + * will use in later VISA functions. The remaining two parameters + * in this function are reserved for future functionality. + * They are given the values VI_NULL. + */ + status = viOpen (defaultRM, "VXI::2::INSTR", VI_NULL, VI_NULL, &instr); + if (status < VI_SUCCESS) + { + printf ("Cannot open a session to the device.\n"); + viClose (defaultRM); + exit (EXIT_SUCCESS); + } + + /* + * Now we will set the VI_ATTR_TRIG_ID. This ID determines which trigger + * lines will generate events in a particular session. By default, + * it is set to software triggers. This attribute can only be changed + * before trigger events are enabled. After they are enabled it is a + * read-only attribute. We will set the ID to look for TTL triggers + * on line 3. + */ + status = viSetAttribute (instr, VI_ATTR_TRIG_ID, VI_TRIG_TTL3); + if (status < VI_SUCCESS) + { + printf ("Error setting the TTL trigger level to monitor\n"); + viClose (instr); + viClose (defaultRM); + exit (EXIT_SUCCESS); + } + + /* + * Now we will enable trigger events so this example can receive them + * into its event queue. It will only receive events for triggers on + * TTL line 3. We will use the queuing method instead of + * setting up a handler. Refer to the interrupt handler example to see how + * things would differ if a handler was set up. The default queue size + * is 50. This can be changed with the viSetAttribute function but it + * must be done before calling viEnableEvent(). + */ + status = viEnableEvent (instr, VI_EVENT_TRIG, VI_QUEUE, VI_NULL); + if (status < VI_SUCCESS) + { + printf("Error enabling the trigger events\n"); + viClose (instr); + viClose (defaultRM); + exit (EXIT_SUCCESS); + } + + /* + * Next we will use the viWaitOnEvent function to check the queue + * for a trigger event. This function can be given a timeout after + * which it will return if an event has not been received. The + * timeout can be set to VI_TMO_IMMEDIATE to just pull the oldest + * event off the queue. To test this example, a trigger can be sourced + * on TTL line three using VIC, the VXI Interactive Control program. + * Call SrcTrig with these arguments: SrcTrig( -1, 3, 4, 1000 ) to + * generate a Sync trigger pulse on TTL line 3 with a 1000msec timeout. + */ + printf ("Waiting for a trigger event...\n"); + + WaitTimeout = 8000; /* Wait 8 seconds for an event */ + status = viWaitOnEvent (instr, VI_EVENT_TRIG, WaitTimeout, &type, &event); + if (status < VI_SUCCESS) + { /* error (possibly timeout?) */ + printf ("An error occurred waiting for the trigger.\n"); + printf ("No event was received.\n"); + viClose (defaultRM); + printf("\nHit Enter to continue."); + fflush(stdin); + getchar(); + exit (EXIT_SUCCESS); + } + else /* successfully received an event */ + { + printf ("The trigger was successfully received.\n"); + /* Always call viClose on the event whenever viWaitOnEvent is successful. */ + status = viClose (event); + } + + /* + * Now we will close the event context, the session to the instrument, and the + * resource manager session, all using viClose. + */ + status = viClose (instr); + status = viClose (defaultRM); + + printf("\nHit Enter to continue."); + fflush(stdin); + getchar(); + + return 0; +} + diff --git a/NI-VISA/Examples/C/Vxi-vme/WaitTrig_MSVC.dsp b/NI-VISA/Examples/C/Vxi-vme/WaitTrig_MSVC.dsp new file mode 100644 index 0000000..faefab7 --- /dev/null +++ b/NI-VISA/Examples/C/Vxi-vme/WaitTrig_MSVC.dsp @@ -0,0 +1,115 @@ +# Microsoft Developer Studio Project File - Name="WaitTrig" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=WaitTrig - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "WaitTrig_MSVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "WaitTrig_MSVC.mak" CFG="WaitTrig - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "WaitTrig - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "WaitTrig - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "WaitTrig - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /machine:I386 /out:"Release/WaitTrig.exe" + +!ELSEIF "$(CFG)" == "WaitTrig - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /debug /machine:I386 /out:"Debug/WaitTrig.exe" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "WaitTrig - Win32 Release" +# Name "WaitTrig - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\WaitTrig.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visa.h +# End Source File +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\include\visatype.h +# End Source File +# End Group +# Begin Group "Library Files" + +# PROP Default_Filter "lib" +# Begin Source File + +SOURCE=$(VXIPNPPATH)\WinNT\lib\msc\visa32.lib +# End Source File +# End Group +# End Target +# End Project diff --git a/NI-VISA/Examples/C/Vxi-vme/WaitTrig_MSVC_VS2005.vcproj b/NI-VISA/Examples/C/Vxi-vme/WaitTrig_MSVC_VS2005.vcproj new file mode 100644 index 0000000..c5e22a7 --- /dev/null +++ b/NI-VISA/Examples/C/Vxi-vme/WaitTrig_MSVC_VS2005.vcproj @@ -0,0 +1,501 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NI-VISA/Examples/VB6/General/FindRsrc.frm b/NI-VISA/Examples/VB6/General/FindRsrc.frm new file mode 100644 index 0000000..dcf710b --- /dev/null +++ b/NI-VISA/Examples/VB6/General/FindRsrc.frm @@ -0,0 +1,105 @@ +VERSION 5.00 +Begin VB.Form Form1 + Caption = "Form1" + ClientHeight = 405 + ClientLeft = 255 + ClientTop = 10470 + ClientWidth = 1800 + LinkTopic = "Form1" + PaletteMode = 1 'UseZOrder + ScaleHeight = 405 + ScaleWidth = 1800 +End +Attribute VB_Name = "Form1" +Attribute VB_GlobalNameSpace = False +Attribute VB_Creatable = False +Attribute VB_PredeclaredId = True +Attribute VB_Exposed = False + +Private Sub Form_Initialize() + MsgBox ("This program finds all of the resources present in the system and displays the instrument descriptor for each resource. The program displays the status of each command in the debug window when run.") +End Sub + +Private Sub Form_KeyPress(KeyAscii As Integer) + End +End Sub + +' +' In Visual Basic 5 the VISA library can be referenced by choosing Project >> References +' and selecting Visa Library from the list (you may first need to browse for visa32.dll). +' This allows the VISA functions and VISA data types to be used in a program. +' +' This code finds all of the resources in the system and displays +' the instrument descriptor for each resource. +' This code uses only VISA functions. The status of each VISA function +' is displayed in the debugging window along with the data read +' by the instrument. +' +' The general flow of the code is: +' Open Resource Manager +' Find the first available resource and display its descriptor +' Display the descriptors for each additional resource +' Close the VISA session +' Close the Resource Manager + +Private Sub Form_Load() + +Dim defaultRM As ViSession +Dim status As ViStatus +Dim response As String * VI_FIND_BUFLEN +Dim descriptor As String * VI_FIND_BUFLEN +Dim nlist As ViFindList +Dim count As ViUInt32 +Dim x As Long + +' First we must call viOpenDefaultRM to get the manager handle +' We will store this handle in defaultRM. The function viStatusDesc +' returns a text description of the status code returned by viOpenDefaultRM + +status = viOpenDefaultRM(defaultRM) +status = viStatusDesc(defaultRM, status, response) +Debug.Print "viOpenDefaultRM", Hex(status), response + +' Next we use the viFindRsrc command to tell VISA to search for all +' available resources in the system. The instrument descriptor for the +' first resource is returned along with the number of resources found. + +status = viFindRsrc(defaultRM, "?*INSTR", nlist, count, descriptor) +status = viStatusDesc(defaultRM, status, response) +Debug.Print "viFindRsrc", Hex(status), response +Debug.Print "The number of resources found was", count + +If (count = 0) Then + Debug.Print "No resources were found" +Else + Debug.Print "The first resource is", descriptor +End If + +' Now we will use the viFindNext command to retrieve each of the +' instrument descriptors for the remaining resources. +x = 1 + +While (x < count) + status = viFindNext(nlist, descriptor) + status = viStatusDesc(defaultRM, status, response) + Debug.Print "viFindNext", Hex(status), response + Debug.Print "The next resource is", descriptor + x = x + 1 +Wend + +' Now we will close the VISA Resource Manager and the +' list of found resources. + +status = viClose(nlist) +status = viStatusDesc(defaultRM, status, response) +Debug.Print "viClose", Hex(status), response + +status = viClose(defaultRM) +status = viStatusDesc(defaultRM, status, response) +Debug.Print "viClose", Hex(status), response + +Debug.Print "Hit any key to quit" + +End Sub + + diff --git a/NI-VISA/Examples/VB6/General/FindRsrc.vbp b/NI-VISA/Examples/VB6/General/FindRsrc.vbp new file mode 100644 index 0000000..e3762b7 --- /dev/null +++ b/NI-VISA/Examples/VB6/General/FindRsrc.vbp @@ -0,0 +1,34 @@ +Type=Exe +Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#c:\windows\system32\stdole2.tlb#OLE Automation +Reference=*\G{39C32428-25DB-11D0-85B4-0020AF33DEAE}#0.0#0#c:\windows\system32\visa32.dll#VISA Library +Form=FindRsrc.frm +Startup="Form1" +HelpFile="" +Command32="" +Name="Project1" +HelpContextID="0" +CompatibleMode="0" +MajorVer=1 +MinorVer=0 +RevisionVer=0 +AutoIncrementVer=0 +ServerSupportFiles=0 +VersionCompanyName="NI" +CompilationType=-1 +OptimizationType=0 +FavorPentiumPro(tm)=0 +CodeViewDebugInfo=0 +NoAliasing=0 +BoundsCheck=0 +OverflowCheck=0 +FlPointCheck=0 +FDIVCheck=0 +UnroundedFP=0 +StartMode=0 +Unattended=0 +Retained=0 +ThreadPerObject=0 +MaxNumberOfThreads=1 + +[MS Transaction Server] +AutoRefresh=1 diff --git a/NI-VISA/Examples/VB6/Vxi-vme/visahigh.frm b/NI-VISA/Examples/VB6/Vxi-vme/visahigh.frm new file mode 100644 index 0000000..cbda9b0 --- /dev/null +++ b/NI-VISA/Examples/VB6/Vxi-vme/visahigh.frm @@ -0,0 +1,135 @@ +VERSION 5.00 +Begin VB.Form Form1 + Caption = "Form1" + ClientHeight = 285 + ClientLeft = 1125 + ClientTop = 10350 + ClientWidth = 1725 + LinkTopic = "Form1" + PaletteMode = 1 'UseZOrder + ScaleHeight = 285 + ScaleWidth = 1725 +End +Attribute VB_Name = "Form1" +Attribute VB_GlobalNameSpace = False +Attribute VB_Creatable = False +Attribute VB_PredeclaredId = True +Attribute VB_Exposed = False +Private Sub Form_Initialize() + MsgBox ("This program writes to and reads from the configuration registers of a VXI device at logical address zero. It requires the vpptype.bas and visa32.bas modules to be included in the project to run. The program displays the status of each command in the debug window when run.") +End Sub + +Private Sub Form_KeyPress(KeyAscii As Integer) + End +End Sub + +' +' For this code to run, the files visa32.bas and vpptype.bas +' must be added to the project. These files should have been +' installed with VISA. +' +' This code reads and writes the offset register of the +' device at logical address 0. To do this, the code reads +' the register at 0xC006 in A16 space, the writes the value +' back to the same register. Then it moves the first four +' configuation registers into local RAM and displays this +' in the Debug.Print window. This code uses only VISA functions. +' +' The general flow of the code is: +' Open Resource Manager +' Open VISA session to the instrument at LA 0 +' Read the offset register +' Write the same value back to the offset register +' Move in the first 4 configuration registers +' Close VISA session +' +Private Sub Form_Load() + +Dim defaultRM As Long +Dim status As Long +Dim vinstr As Long +Dim response As String * 256 +Dim offset As Long +Dim value As Integer +Dim count As Long +Dim data(0 To 3) As Integer + +' First we must call viOpenDefaultRM to get the manager handle +' We will store this handle in defaultRM + +status = viOpenDefaultRM(defaultRM) +status = viStatusDesc(defaultRM, status, response) +Debug.Print "viOpenDefaultRM", Hex(status), response + +' To open a session we must use the resource manager handle from +' viOpenDefaultRM, and we must use a string which will +' indicate which instrument to open. This is called the +' instrument descriptor. The format for this string can be +' found in the NI-VISA programmers reference manual. After +' opening a session to the device, we will get a handle to the +' instrument which we will use in later VISA functions. The +' two parameters in this function which are 0 are reserved +' for future functionality. + +status = viOpen(defaultRM, "VXI0::0::INSTR", 0, 0, vinstr) +status = viStatusDesc(defaultRM, status, response) +Debug.Print "viOpen", Hex(status), response + +' Now we will read in the offset register and display it on +' the screen. We must use the session handle to the instrument +' from the viOpen function. We will be reading 16 bits by using +' the viIn16 function. + +offset = 6 ' offset in A16 space from the base of device memory + +' Note that the offset is relative to the base of the device's +' memory space, not the base of the entire address space. + +status = viIn16(vinstr, VI_A16_SPACE, offset, value) +status = viStatusDesc(defaultRM, status, response) +Debug.Print "viIn16", Hex(status), response +Debug.Print "Register at offset 6", Hex(value) + +' Now we will write out the value just read with the viOut16 +' function. We will write this to the offset register for the device at +' logical address 0 using the instrument handle we acquired +' from viOpen. + +status = viOut16(vinstr, VI_A16_SPACE, offset, value) +status = viStatusDesc(defaultRM, status, response) +Debug.Print "viOut16", Hex(status), response + +' Now we will move the first 4 configuration registers into local +' memory. This will be done using viMoveIn16. We will move all +' data into memory starting at the base address specified by "data(0)" + +offset = 0 ' we want to get data from 0xC000-0xC007 +count = 4 ' move 4 16-bit pieces of data + +status = viMoveIn16(vinstr, VI_A16_SPACE, offset, count, data(0)) +status = viStatusDesc(defaultRM, status, response) +Debug.Print "viMoveIn16", Hex(status), response + +Debug.Print "Register at offset 0", Hex(data(0)) +Debug.Print "Register at offset 2", Hex(data(1)) +Debug.Print "Register at offset 4", Hex(data(2)) +Debug.Print "Register at offset 6", Hex(data(3)) + +' Now we must close the session to the instrument using +' viClose. We must tell VISA what to close by use of the +' instrument handle, "vinstr". We will also close the VISA +' Resource Manager. + +status = viClose(vinstr) +status = viStatusDesc(defaultRM, status, response) +Debug.Print "viClose", Hex(status), response + +status = viClose(defaultRM) +status = viStatusDesc(defaultRM, status, response) +Debug.Print "viClose", Hex(status), response + +Debug.Print "Hit any key to quit." + +End Sub + + diff --git a/NI-VISA/Examples/VB6/Vxi-vme/visahigh.vbp b/NI-VISA/Examples/VB6/Vxi-vme/visahigh.vbp new file mode 100644 index 0000000..7438c5a --- /dev/null +++ b/NI-VISA/Examples/VB6/Vxi-vme/visahigh.vbp @@ -0,0 +1,43 @@ +Type=Exe +Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\system32\STDOLE2.TLB#Standard OLE Types +Reference=*\G{EE008642-64A8-11CE-920F-08002B369A33}#1.0#0#C:\WINDOWS\system32\MSRDO20.DLL#Microsoft Remote Data Object 1.0 +Reference=*\G{39C32428-25DB-11D0-85B4-0020AF33DEAE}#3.1#0#C:\WINDOWS\system32\visa32.dll#VISA Library +Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; comdlg32.ocx +Object={BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0; TABCTL32.OCX +Object={3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0; richtx32.ocx +Object={6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0; comctl32.ocx +Object={FAEEE763-117E-101B-8933-08002B2F4F5A}#1.1#0; DBLIST32.OCX +Object={00028C01-0000-0000-0000-000000000046}#1.0#0; DBGRID32.OCX +Object={F6125AB1-8AB1-11CE-A77F-08002B2F4E98}#2.0#0; MSRDC20.OCX +Form=visahigh.frm +IconForm="Form1" +Startup="Form1" +HelpFile="" +Command32="" +Name="Project1" +HelpContextID="0" +CompatibleMode="0" +MajorVer=1 +MinorVer=0 +RevisionVer=0 +AutoIncrementVer=0 +ServerSupportFiles=0 +VersionCompanyName="National Instruments" +CompilationType=0 +OptimizationType=0 +FavorPentiumPro(tm)=0 +CodeViewDebugInfo=0 +NoAliasing=0 +BoundsCheck=0 +OverflowCheck=0 +FlPointCheck=0 +FDIVCheck=0 +UnroundedFP=0 +StartMode=0 +Unattended=0 +Retained=0 +ThreadPerObject=0 +MaxNumberOfThreads=1 + +[MS Transaction Server] +AutoRefresh=1 diff --git a/TC01App/TC01App.sln b/TC01App/TC01App.sln new file mode 100644 index 0000000..e4a77f4 --- /dev/null +++ b/TC01App/TC01App.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29613.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TC01App", "TC01App\TC01App.csproj", "{EAEF2B5D-DC99-459B-930A-1BC05CD2B98F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {EAEF2B5D-DC99-459B-930A-1BC05CD2B98F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EAEF2B5D-DC99-459B-930A-1BC05CD2B98F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EAEF2B5D-DC99-459B-930A-1BC05CD2B98F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EAEF2B5D-DC99-459B-930A-1BC05CD2B98F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {838A9BEF-8003-4D48-8463-4A9918907C0E} + EndGlobalSection +EndGlobal diff --git a/TC01App/TC01App/App.config b/TC01App/TC01App/App.config new file mode 100644 index 0000000..8324aa6 --- /dev/null +++ b/TC01App/TC01App/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/TC01App/TC01App/Form1.Designer.cs b/TC01App/TC01App/Form1.Designer.cs new file mode 100644 index 0000000..961112f --- /dev/null +++ b/TC01App/TC01App/Form1.Designer.cs @@ -0,0 +1,128 @@ +namespace TC01App +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this._Voltage0 = new System.Windows.Forms.TextBox(); + this._Voltage1 = new System.Windows.Forms.TextBox(); + this._Voltage2 = new System.Windows.Forms.TextBox(); + this._Voltage3 = new System.Windows.Forms.TextBox(); + this._Voltage4 = new System.Windows.Forms.TextBox(); + this._Voltage5 = new System.Windows.Forms.TextBox(); + this._Voltage6 = new System.Windows.Forms.TextBox(); + this._Voltage7 = new System.Windows.Forms.TextBox(); + this._GetData = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // _Voltage + // + this._Voltage0.Location = new System.Drawing.Point(50, 34); + this._Voltage0.Name = "_Voltage0"; + this._Voltage0.Size = new System.Drawing.Size(200, 20); + this._Voltage0.TabIndex = 0; + // + this._Voltage1.Location = new System.Drawing.Point(50, 64); + this._Voltage1.Name = "_Voltage1"; + this._Voltage1.Size = new System.Drawing.Size(200, 20); + this._Voltage1.TabIndex = 0; + // + this._Voltage2.Location = new System.Drawing.Point(50, 94); + this._Voltage2.Name = "_Voltage2"; + this._Voltage2.Size = new System.Drawing.Size(200, 20); + this._Voltage2.TabIndex = 0; + // + this._Voltage3.Location = new System.Drawing.Point(50, 124); + this._Voltage3.Name = "_Voltage3"; + this._Voltage3.Size = new System.Drawing.Size(200, 20); + this._Voltage3.TabIndex = 0; + // + this._Voltage4.Location = new System.Drawing.Point(50, 154); + this._Voltage4.Name = "_Voltage4"; + this._Voltage4.Size = new System.Drawing.Size(200, 20); + this._Voltage4.TabIndex = 0; + // + this._Voltage5.Location = new System.Drawing.Point(50, 184); + this._Voltage5.Name = "_Voltage5"; + this._Voltage5.Size = new System.Drawing.Size(200, 20); + this._Voltage5.TabIndex = 0; + // + this._Voltage6.Location = new System.Drawing.Point(50, 214); + this._Voltage6.Name = "_Voltage6"; + this._Voltage6.Size = new System.Drawing.Size(200, 20); + this._Voltage6.TabIndex = 0; + // + this._Voltage7.Location = new System.Drawing.Point(50, 244); + this._Voltage7.Name = "_Voltage7"; + this._Voltage7.Size = new System.Drawing.Size(200, 20); + this._Voltage7.TabIndex = 0; + // + // _GetData + // + this._GetData.Location = new System.Drawing.Point(264, 274); + this._GetData.Name = "_GetData"; + this._GetData.Size = new System.Drawing.Size(75, 23); + this._GetData.TabIndex = 1; + this._GetData.Text = "Get Data"; + this._GetData.UseVisualStyleBackColor = true; + this._GetData.Click += new System.EventHandler(this._GetData_Click); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(400, 332); + this.Controls.Add(this._GetData); + this.Controls.Add(this._Voltage0); + this.Controls.Add(this._Voltage1); + this.Controls.Add(this._Voltage2); + this.Controls.Add(this._Voltage3); + this.Controls.Add(this._Voltage4); + this.Controls.Add(this._Voltage5); + this.Controls.Add(this._Voltage6); + this.Controls.Add(this._Voltage7); + this.Name = "_Form"; + this.Text = "NI USB-6009"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox _Voltage0; + private System.Windows.Forms.TextBox _Voltage1; + private System.Windows.Forms.TextBox _Voltage2; + private System.Windows.Forms.TextBox _Voltage3; + private System.Windows.Forms.TextBox _Voltage4; + private System.Windows.Forms.TextBox _Voltage5; + private System.Windows.Forms.TextBox _Voltage6; + private System.Windows.Forms.TextBox _Voltage7; + private System.Windows.Forms.Button _GetData; + } +} + diff --git a/TC01App/TC01App/Form1.cs b/TC01App/TC01App/Form1.cs new file mode 100644 index 0000000..b7a6b8a --- /dev/null +++ b/TC01App/TC01App/Form1.cs @@ -0,0 +1,81 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Windows.Forms; +using NationalInstruments.DAQmx; + +namespace TC01App +{ + public partial class Form1 : Form + { + + private AnalogSingleChannelReader _AnalogSingleChannelReader0; + private AnalogSingleChannelReader _AnalogSingleChannelReader1; + private AnalogSingleChannelReader _AnalogSingleChannelReader2; + private AnalogSingleChannelReader _AnalogSingleChannelReader3; + private AnalogSingleChannelReader _AnalogSingleChannelReader4; + private AnalogSingleChannelReader _AnalogSingleChannelReader5; + private AnalogSingleChannelReader _AnalogSingleChannelReader6; + private AnalogSingleChannelReader _AnalogSingleChannelReader7; + + public Form1() + { + InitializeComponent(); + + Task task0 = new Task(); + AIChannel aiChannel0 = task0.AIChannels.CreateVoltageChannel("dev1/ai0", "myAIChannel", AITerminalConfiguration.Differential, 0, 5, AIVoltageUnits.Volts); + _AnalogSingleChannelReader0 = new AnalogSingleChannelReader(task0.Stream); + + Task task1 = new Task(); + AIChannel aiChannel1 = task1.AIChannels.CreateVoltageChannel("dev1/ai1", "myAIChannel", AITerminalConfiguration.Differential, 0, 5, AIVoltageUnits.Volts); + _AnalogSingleChannelReader1 = new AnalogSingleChannelReader(task1.Stream); + + Task task2 = new Task(); + AIChannel aiChannel2 = task2.AIChannels.CreateVoltageChannel("dev1/ai2", "myAIChannel", AITerminalConfiguration.Differential, 0, 5, AIVoltageUnits.Volts); + _AnalogSingleChannelReader2 = new AnalogSingleChannelReader(task2.Stream); + + Task task3 = new Task(); + AIChannel aiChannel3 = task3.AIChannels.CreateVoltageChannel("dev1/ai3", "myAIChannel", AITerminalConfiguration.Differential, 0, 5, AIVoltageUnits.Volts); + _AnalogSingleChannelReader3 = new AnalogSingleChannelReader(task3.Stream); + + Task task4 = new Task(); + AIChannel aiChannel4 = task4.AIChannels.CreateVoltageChannel("dev1/ai4", "myAIChannel", AITerminalConfiguration.Rse, 0, 5, AIVoltageUnits.Volts); + _AnalogSingleChannelReader4 = new AnalogSingleChannelReader(task4.Stream); + + Task task5 = new Task(); + AIChannel aiChannel5 = task5.AIChannels.CreateVoltageChannel("dev1/ai5", "myAIChannel", AITerminalConfiguration.Rse, 0, 5, AIVoltageUnits.Volts); + _AnalogSingleChannelReader5 = new AnalogSingleChannelReader(task5.Stream); + + Task task6 = new Task(); + AIChannel aiChannel6 = task6.AIChannels.CreateVoltageChannel("dev1/ai6", "myAIChannel", AITerminalConfiguration.Rse, 0, 5, AIVoltageUnits.Volts); + _AnalogSingleChannelReader6 = new AnalogSingleChannelReader(task6.Stream); + + Task task7 = new Task(); + AIChannel aiChannel7 = task7.AIChannels.CreateVoltageChannel("dev1/ai7", "myAIChannel", AITerminalConfiguration.Rse, 0, 5, AIVoltageUnits.Volts); + _AnalogSingleChannelReader7 = new AnalogSingleChannelReader(task7.Stream); + } + + private void _GetData_Click(object sender, EventArgs e) + { + + double voltage0 = _AnalogSingleChannelReader0.ReadSingleSample(); + double voltage1 = _AnalogSingleChannelReader1.ReadSingleSample(); + double voltage2 = _AnalogSingleChannelReader2.ReadSingleSample(); + double voltage3 = _AnalogSingleChannelReader3.ReadSingleSample(); + double voltage4 = _AnalogSingleChannelReader4.ReadSingleSample(); + double voltage5 = _AnalogSingleChannelReader5.ReadSingleSample(); + double voltage6 = _AnalogSingleChannelReader6.ReadSingleSample(); + double voltage7 = _AnalogSingleChannelReader7.ReadSingleSample(); + + _Voltage0.Text = string.Concat(voltage0.ToString("0.0")); + _Voltage1.Text = string.Concat(voltage1.ToString("0.0")); + _Voltage2.Text = string.Concat(voltage2.ToString("0.0")); + _Voltage3.Text = string.Concat(voltage3.ToString("0.0")); + _Voltage4.Text = string.Concat(voltage4.ToString("0.0")); + _Voltage5.Text = string.Concat(voltage5.ToString("0.0")); + _Voltage6.Text = string.Concat(voltage6.ToString("0.0")); + _Voltage7.Text = string.Concat(voltage7.ToString("0.0")); + } + } +} diff --git a/TC01App/TC01App/Form1.resx b/TC01App/TC01App/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/TC01App/TC01App/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/TC01App/TC01App/Program.cs b/TC01App/TC01App/Program.cs new file mode 100644 index 0000000..85d4b3f --- /dev/null +++ b/TC01App/TC01App/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace TC01App +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/TC01App/TC01App/Properties/AssemblyInfo.cs b/TC01App/TC01App/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..84b3f35 --- /dev/null +++ b/TC01App/TC01App/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("TC01App")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("TC01App")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("eaef2b5d-dc99-459b-930a-1bc05cd2b98f")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/TC01App/TC01App/Properties/Resources.Designer.cs b/TC01App/TC01App/Properties/Resources.Designer.cs new file mode 100644 index 0000000..1c4ad8b --- /dev/null +++ b/TC01App/TC01App/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace TC01App.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TC01App.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/TC01App/TC01App/Properties/Resources.resx b/TC01App/TC01App/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/TC01App/TC01App/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/TC01App/TC01App/Properties/Settings.Designer.cs b/TC01App/TC01App/Properties/Settings.Designer.cs new file mode 100644 index 0000000..7e578dd --- /dev/null +++ b/TC01App/TC01App/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace TC01App.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/TC01App/TC01App/Properties/Settings.settings b/TC01App/TC01App/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/TC01App/TC01App/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/TC01App/TC01App/TC01App.csproj b/TC01App/TC01App/TC01App.csproj new file mode 100644 index 0000000..cd6a9ac --- /dev/null +++ b/TC01App/TC01App/TC01App.csproj @@ -0,0 +1,92 @@ + + + + + Debug + AnyCPU + {EAEF2B5D-DC99-459B-930A-1BC05CD2B98F} + WinExe + TC01App + TC01App + v4.6 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\..\..\Program Files (x86)\National Instruments\Measurement Studio\DotNET\v4.0\AnyCPU\NationalInstruments.Common 19.0.40\NationalInstruments.Common.dll + False + + + False + ..\..\..\..\..\Program Files (x86)\National Instruments\MeasurementStudioVS2010\DotNET\Assemblies\Current\NationalInstruments.DAQmx.dll + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + \ No newline at end of file