04-04-2007 08:04 AM
04-05-2007 10:50 AM
Hi Chris,
The C reference help is the best list of functions that we have. But here are some Knowledge bases that will help you get started with Motion in C++. If you are using the Motion Assistant then this will help you convert your script to C code. I hope this helps.
Have a great day,
GG
04-12-2007 07:32 AM
Hi Chris,
The best reference for NI-Motion functions is the help file that you mention. You will find some basic and simple C examples in “\National Instruments\NI-Motion\Documentation\Examples\NI-Motion User Manual\C” directory. Those are examples written for console mode (DOS applications).
To use them
you will have to create in VC++ .NET
For Windows/MFC applications is basically the same, you just have to use the VC Wizard that creates an MFC application, include FlexMont.h file and set the compiler to link FlexMS32.lib import library.
Hope this help.
Best regards.
01-27-2010 12:13 AM
Hi I'm trying to develop an application in visual C++ using functions from NI Motion, to control linear motor guides through NI PCI 7356 Motion Controller.
I have written and compiled some of the C example programs that come in the NI Motion examples folder succesfully, but they are only written for Win32 Console Application. I would like to know if it's possible to define classes (to encapsulate code) and create Windows form applications (to create graphical user interfaces), in visual C++ 2008 or if it's only possible in console application. Also when I define a class in Visual C++ (Console application) and declare and object of that class (that contains NI Motion fucntions) I get some errors after compiling (This is not the case If I only define a routine and call it in the void main(void) method).
I hope you can help me or give some advice.
Thanks.
Arturo Marban
01-28-2010 11:32 AM
Hey Arturo,
What sort of errors are you getting after compiling. Also, your question might get a little more attention if you create your own thread and simply reference this one, as this thread has been idle for a few years.
01-28-2010 12:26 PM - edited 01-28-2010 12:28 PM
Hi Ben,
Now I'm trying to create and application (Win 32 Project) using Microsoft Foundation Classes (MFC) instead of Windows Form App. My purpose is to create a graphical user interface to control a three axis milling machine through NI PCI 7356 Motion Controller. I will list you the problems I have had:
* 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 MFC, 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
01-29-2010 02:09 AM
01-29-2010 12:15 PM
Hey Arturo,
Are you meaning to include 'flexmoth.h' and not 'flexmotn.h'?