01-28-2010 12:47 PM
Hi,
I'm trying to create a graphical user interface in Visual C++ 2008 to control a three axis milling machine through NI PCI 7356 Motion Controller; also, I have the NI Motion 8.1 sotfware driver installed in my PC. I have tested the C code that comes in the examples folder of NI Motion succesfully, but it's only written for console app (I was thinking in something more interactive). I will list you the problems I have had in creating a GUI in visual C++:
* First, I tried to build a GUI using Windows Form App in Visual C++ 2008. It is something simple: a window with a push button. Nonetheless, if I simply write the header #include "flexmoth.h" in the code section of the widows form app, I get many errors (102 errors) after compiling. The error text is:
C:\...\flexmoth.h(180) : error C3389: __declspec(dllexport) cannot be used with /clr : pure or clr/:safe
* Second, I build a GUI with two buttons using Microsoft Foundation Classes (MFC's), and it seems it works, but I think it would be easier programming using Windows Form App, because I have to add more controls (push buttons, radio buttons, combo boxes, etc...).
I'm not an expert using visual C++ and it will be helpful for me if you give me some advice.
Thanks,
Arturo
02-08-2010 06:49 PM
Hi Arturo;
Working with Visual Studio .NET 2003 or later versions such as Visual Studio 2005 is not currently supported by NI-Motion Driver, however here's a link where you can find an example that can help you visualize the way the driver can be used with later versions of Visual Studio.
http://digital.ni.com/public.nsf/allkb/67253305A52EFB1986256E94005945D2
I hope the information is useful.
Good Luck