Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

.Net 2.0 Libraries for the 6503?

Where can I find the .Net 2.0 Libraries to support third party developement using the 6503?
 
 
0 Kudos
Message 1 of 8
(4,868 Views)

Hi Tim8w,

Assuming you are referring to the NI PCI-6503, the DAQmx drivers necessary to run the device natively support .Net 2.0. Note however, that you must make sure to install the .NET Framework support during the DAQmx driver installation. You may find more information in KnowledgeBase: Visual Studio .NET Applications Missing the NationalInstruments.DAQmx File

Once you have installed support for the .NET Framework, you may then simply call the drivers using your language's respective directive; such as Using, Import or Include.

- In VisualBasic:  Imports NationalInstruments.DAQmx
- In C#:  using NationalInstruments.DAQmx
- In C/C++:  #include <NIDAQmx.h>

If your interested in the DAQmx merge module, you may find it at: C:\Program Files\Common Files\Merge Modules\MStudioDAQmx.msm

The actual DAQmx .NET assemblies are commonly located at:
C:\Program Files\National Instruments\MeasurementStudioVS2005\DotNET\Assemblies\Current\NationalInstruments.DAQmx.dll

You may also find lots of examples at NI Developer Zone or on your local directory:
C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\DotNET2.0

Hope this helps Tim8w!



Message Edited by Nestor_G on 05-12-2008 10:13 AM
Nestor
0 Kudos
Message 2 of 8
(4,846 Views)
Nestor,
The problem is that the Library software that came with the 6503 won't let me install it. It keeps telling me the following:
 

Measurement Studio for VS2005 Integration not present

To use the NI-DAQmx .NET Support VS2005 Integration feature, you must install the Measurement Studio .NET 2.0 Languages Support>>Visual Studio Integration feature in the Measurement Studio installer.

 



Message Edited by Tim8w on 05-12-2008 10:46 AM
0 Kudos
Message 3 of 8
(4,838 Views)
You are correct Tim.

Attempting to install VS2005 Integration will request our Measurement Studio package; this option will essentially attempt to install the DAQ Assistant - which is a Measurement Studio feature.
 
Remove the VS2005 Integration, but leaving Examples and .NET Framework 2.0 Language Support enabled. This will dump the necessary assemblies.
Give this a try...
Nestor
0 Kudos
Message 4 of 8
(4,831 Views)

Nestor,

That worked! The problem I have now is that the functions under VB.Net apparantly aren't named the same as they were in VB6. In particular, what are the new VB.Net names for the following functions:

Init_DA_Brds(2, 7)

PortA

PortB

PortC

PortInput

PortOutput

DIG_Prt_Config

DIG_In_Port

DIG_Out_Port



Message Edited by Tim8w on 05-12-2008 01:31 PM
0 Kudos
Message 5 of 8
(4,827 Views)

These look like Traditional NI-DAQ function calls.

If so, then migrating from VB 6 to VB .NET with NI-DAQ (not NI-DAQmx) is not an easy transition. Please refer to the KnowledgeBase: Programming NI-DAQ in Microsoft Visual Studio .NET for further information. Essentially, National Instruments does not include native .NET libraries for Traditional NI-DAQ. You can use the Traditional NI-DAQ ActiveX controls to perform data acquisition. The ActiveX controls are provided with the Traditional NI-DAQ Driver and do not require Measurement Studio. Note that Traditional NI-DAQ (formally known as NI-DAQ) and NI-DAQmx are two different drivers - the newer being the latter.

It appears that the PCI-6503 supports NI-DAQmx. We strongly suggest to program in NI-DAQmx for future support; we are slowly fading support of Traditional NI-DAQ. The KnowledgeBase: What are the Terminology Changes in NI-DAQmx? discusses changes from Traditional NI-DAQ to NI-DAQmx.

Nestor
0 Kudos
Message 6 of 8
(4,814 Views)

The documentation is lousy and the examples don't run. All I want is to be able to do the following:

Initialize the 6503

Set PortA to Input

Set PortB and PortC to Output

Read PortA

Write to PortB and PortC

Is there no one at NI that can give me an example of how to do this?

 

0 Kudos
Message 7 of 8
(4,811 Views)

Hi Tim,

Do understand that we do not have Traditional NI-DAQ examples for the .NET Framework. All of our .NET examples make use of our DAQmx drivers. I created an example code that allows you to do what you desire, but with DAQmx. Give the attachment a try.

This five-part article further helps you with the Traditional NI-DAQ transition to NI-DAQmx.
Transition from Traditional NI-DAQ (Legacy) to NI-DAQmx using Microsoft Visual Basic .NET

In the attached example, I give you the basic architecture to read and write to different ports. Feel free to customize it as you need. You identify your device by the name registered under Measurement and Automation Explore; for example, if my PCI-6503 is registered as Dev1 in Measurement and Automation Explorer, then in the example program I will use Dev1/port0 to read or write to Port0.

Nestor
0 Kudos
Message 8 of 8
(4,806 Views)