Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Using NI-VISA with MFC C++ 6.0 in a Serial Application with a DMM

All,  has amnyone used NI-VISA alone with Microsoft C++ 6.0 for a simple control of serial application.  I could not find anything in NI's Knowledge base over a 1 hours search.   Any insight would help.  My goal is to use NI-VISA alone with MFC C++ App. Thanks, Andy
0 Kudos
Message 1 of 5
(4,437 Views)
Install NI-VISA and then go to C:\VXIPNP\WinNT\NIvisa\Examples\C\Serial to find the serial example. These examples use the C API which will of course work in C++. If you want a C++ class for NI-VISA you will need to purchase the Measurement Studio package.

-Josh
0 Kudos
Message 2 of 5
(4,429 Views)

Hi Andy,
What JoshuaP suggested is the best way to find examples for your application.  (Thanks, Joshua!) There are usually enough examples to look through to get your program to do what you need.  You may also want to check out www.ni.com/examples.  This is our example database and you can often find additional examples here that are not found in KnowledgeBase searches.  One tip is to limit your search criteria.  Only select Visual Studio and Serial, for example.  You will get more results to browse if you are not too specific.  Best of luck and let us know if you have any questions!

Chris R.
Applications Engineer
National Instruments

Chris R.
Applications Engineer
National Instruments
0 Kudos
Message 3 of 5
(4,422 Views)
Guys,  thanks, I found the C example in C:\VXIPNPWinNT\NIvisa\Examples\C\Serial\RDWrtSrl_MSCV.dsp. and I was able to run it as a Console App.  I just had to make sure that my box's serial settings matched the program defaults.  1) Question, do you know the licensing rights for NI-VISA?  2) Is it free distributable driver / API or does it have to come purchased as an add-in with with NI Software? The reason: to create a serial i/o layer out for Win32 API is extensive, although free.  NI-VISA allows a MS C/C++ user to leverage existing code and avoid the joys of programming Win32 API.  3) Finally, will NI-VISA be ported to Windows Vista and do you have any betas out yet?
0 Kudos
Message 4 of 5
(4,409 Views)
We don't have any betas available yet, but if you are interested you might be able to install the latest NI-VISA driver on Vista. I would expect a few errors and some things might not work. Also unselect the COM support (COM as in VB, not as in serial).

As far as licensing is concerned here is the best place to read up on them.

http://www.ni.com/visa/license.htm

-Josh
0 Kudos
Message 5 of 5
(4,397 Views)