From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Switch Hardware and Software

cancel
Showing results for 
Search instead for 
Did you mean: 

Using NI-DAQmx and Visual Basic.NET with switches

I'm trying to determine if it's worthwhile for me to a multiplexer like the PXI-2503, and a lot rides on wheter I can program it with Visual Basic.NET through NI-DAQmx. I've downloaded the NI-DAQmx help files and the switches help. When I lookup switches in the NI-DAQmx help, it just says "Refer to the NI Switches Help". When I lookup NI-DAQmx in the switches help, it just says "To program your switch module with the NI-DAQmx, refer to the NI-DAQmx Help." Can someone help me out of this conundrum? I also intend to get a DAQ board which will get it's input from the multiplexer, and I want to program that in VB.NET as well.
 
Thanks,
 
Tim
0 Kudos
Message 1 of 7
(10,016 Views)

Timothy,

if you are trying to program an NI switch with the NI-SWITCH API then all the information is in the NI Switches Help.


If you want to program it wi the DAQmx API then all the programming information is in the DAQmx help.


if you want to use .NET then there are information in the DAQmx readme and in the DAQmx help under Getting Started with your ADE>>.NET. Under the same section you will see Finding Example which will point you to the directory where the VB.NET examples are installed:

  • For Visual C# and Visual Basic .NET examples that do not require Measurement Studio, go to the following directory: <MeasurementStudio>\DotNET\Examples\DAQmx
  • NI-DAQmx examples for ANSI C are in the NI-DAQ\Examples\DAQmx ANSI C Dev directory.

     

    Guy Ferraro
    Switch Product Support Engineer
    NI - USA
    0 Kudos
    Message 2 of 7
    (10,013 Views)

    Guy,

    I found the DAQmx read me and the NI-DAQmx help under Getting Started with your ADE>>.NET. The .NET help titled "Creating a .NET Application without Measurement Studio" then directs me to Start»Programs»National Instruments»NI-DAQ»NI-DAQmx .NET Reference Help. However I don't have that last folder - NI-DAQmx .NET Reference Help on my Start menu. The .NET help also states "To get to the same help topics from within Visual Studio .NET 2003, go to Help»Contents. Select Measurement Studio from the Filtered By drop-down list and follow the previous instructions." However, I can't find it. I'm currently using Visual Basic 2005 Express Edition, and the DAQmx .NET help says "You need Microsoft Visual Studio .NET 2003 for the API documentation to be installed." Does that mean I won't find it in the VB 2005 Express Edition? Still, I would expect the NI-DAQmx .NET Reference Help to be in my Start menu, since I included the .NET Framework stuff during the DAQmx install.

    Tim

    0 Kudos
    Message 3 of 7
    (9,997 Views)
    Hi,
     
    I would try the suggestion listed in this KB:
     
     
    -Sal
    0 Kudos
    Message 4 of 7
    (9,951 Views)

    I got some more info on this...

    To install the DAQmx .NET help, the minimum requirement is just .NET, no Measurement Studio.

    The problem here is using VS 2005, which has a different help system than VS 2003. So if you don't have VS 2003 or the .NET 1.1 SDK, you do not get the Help viewer required. Just installing .NET is not enough.

    You can use a free help viewer to see the help files if he only has VS 2005 on his machine. See the last paragraph of this KB for more information about this.

    http://digital.ni.com/public.nsf/websearch/A4F2DC5A41CFA716862570BC00802DE8?OpenDocument

     

    I hope this helps,

    Sal

    0 Kudos
    Message 5 of 7
    (9,946 Views)
    I have two USB modules, USB-6501 Digital IO and a GPIB-USB-HS instrument controller.  Can I access these in Visual C# 2005 using the DAQmx API?  I have found some interface  documents under Programs - National Instruments - NI-DAQ, but these are for VB6 and ANSI C instructions.
    0 Kudos
    Message 6 of 7
    (9,529 Views)
    Hello Hector,

    You can access the USB-6501 Digital I/O device in Visual C# 2005 using the NI-DAQmx API.  Examples are installed with the NI-DAQmx driver under C:\Program Files\National Instruments\MeasurementStudioVS2005\DotNET\Examples\DAQmx\Digital.  If these examples don't exist, try reinstalling the latest version of the NI-DAQmx driver making sure to enable support for Visual Studio 2005.

    You can access the GPIB-USB-HS device through two methods: the native .NET API and the NI-488.2 wrapper interface.  For more information about these different methods, see readme.txt under C:\Program Files\National Instruments\NI-488.2.  You can also find examples in a variety of different programming languages under C:\Program Files\National Instruments\NI-488.2\Languages.

    I hope this helps and let us know if you have any further questions,

    Travis G.
    Applications Engineering
    National Instruments
    www.ni.com/support


    0 Kudos
    Message 7 of 7
    (9,506 Views)