Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

can motion control module for measurement studio be used in VB.net

I am using VB.net to develop motion control. However, I have problem to
use flexmotion into VB.net. I can use it in VB6 though. Did anybody here
use motion control module for measurement studio in VB.net? I know that module is
not designed for .NET. But I want to know if I could get any luck from it.
The motion I need to do includes line,arc, 3-d contour and teaching modes.
I wonder if this module can give me this power.
0 Kudos
Message 1 of 4
(3,861 Views)
Please refer to this discussion forum thread that should answer your question.

Regards,

Jochen Klier
National Instruments Germany
0 Kudos
Message 2 of 4
(3,853 Views)
Hi did you get any answers regarding VB.net and flexmotion?
When I try to use the flex_read_pos_rtn function I keep getting error -70006
 
0 Kudos
Message 3 of 4
(3,722 Views)
Hey NiFo,
 
To answer your first question: "did you get any answers regarding VB.net and flexmotion?" You can refer to the discussion forum thread that Jochen mentioned in his post. Basically it says the following:
"There isn't a separate API for .NET for NI-Motion software. You will have to load the motion dll to call the functions that are supplied with the driver, available for download here: Motion Control Drivers and Updates. Here is a document that should get you started. If you have more questions, refer to Microsoft's help on calling functions from a dll. How to Import a DLL in Visual Studio .NET?"
 
As far as the error you are getting: "When I try to use the flex_read_pos_rtn function I keep getting error -70006". The error description for this specific error says the following: "An invalid axis number or other resource ID (vector space, encoder, I/O port, and so on) was used." I would suggest that you check to make sure that you are using the correct axis number and also the correct resource ID whatever it may be. You can also refer to the NI Motion Visual BASIC Reference Help document for more detailed information on the flex_read_pos_rtn function. You can find this document in the following directory: C:\Program Files\National Instruments\NI-Motion\Documentation.
 
I hope this helps. Please let us know if you have any further questions or concerns. Thanks, and have a great day.
 
Regards,
DJ L.
0 Kudos
Message 4 of 4
(3,707 Views)