Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Example Program
NI Supported: Yes
Publish Date: Sep 6, 2006


Feedback


Yes No

Related Categories

Products

Development Topic

Related Links - Developer Zone

Related Links - Products and Services

Initializing a FlexMotion Board with C

0 ratings | 0.00 out of 5
Print

Downloads

Filename: initialize.c
Requirements: View

Shows how to initialize a FlexMotion board using C

Requirements


Filename: initialize.c

Software Requirements


Language(s): C

Hardware Requirements


Hardware Group: Motion Control
Driver: NI-Motion 4.5

 
0 ratings | 0.00 out of 5
Print

Reader Comments | Submit a comment »

possible bug?
Dear Madam, Dear Sir, When I make a labWindows/CVI project with this file (flexmotion example initialize.c) and I execute it I get the following error: "61060 Unknown Error This is an unknown NI-Motion error. Please contact National Instruments." However, if I change the error handle code from: "void ErrorHandler(u16 errorCode, u16 commandID, u16 resourceID)" to: "void ErrorHandler(i32 errorCode, u16 commandID, u16 resourceID)" and if I remove the type casting from line 547 from: "ErrorHandler ((u16)status, 0, 0);" to: "ErrorHandler (status, 0, 0);" then I get the following error upon executing the program: -70012 (NIMC_badboradIDError) Illegal board Id. ... This seems to be the correct error message. For clarity's sake, the fact that I get the error was expected, because I executed the code on a computer without a motion controller. But I think there is a bug in the way the errors are handled. So I suggest that the code is revised. Kind Regards, Johan Verschraegen
- johan verschraegen, ELIS. johan.verschraegen@elis.ugent.be - Feb 24, 2006

 

Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).