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.