Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-Motion 7.0 problems (Error # -70017)

Hi,

We have been using LabView for a while to control several stepper motors in my lab. The programs we have have been working flawlessly using a NI PXI-7334 motion controller and NI-motion 6.1.5. However, yesterday I updated the NI-motion drivers from version 6.1.5 to version 7.0, which also required a frimware upgrade of the PXI-7334 controller. After doing all this and recompiling the labview VIs problems started:

Since we use the stepper motors for several different operations, each program has an "initialization" subVI which configures the motors for the desired use. That way we don't have to go to MAX every time we want, for example, axis 1 or 3 to have active high polarity, or to disable limits, etc. These initialization programs worked perfectly fine as I said before. However, after the upgrade they stop working and the only thing I get is this error:

Error # -70017 occured at SetStepperLoopMode
Possible reasons:
Motion: -70017 (NIMC_stepperOnlyError)
This command is valid only on stepper axes.

Sometimes labview will crash showing a "pure virtual call C++ error).

I modified the initialization subVIs to follow the execution order shown here: http://zone.ni.com/devzone/conceptd.nsf/webmain/AE73B6CA4643F4ED86256857005F9418

But the result was the same as before.

Now, the most strange thing is that if I set the desired motors' configuration in MAX and initializate the PXI-7334 controller directly from MAX I get the following error when the initialization subVI runs:

Error # -70125 occured at EnableAxis
Possible reasons:
Motion: -70125 (NIMC_wrongModeError)
The function was not executed because it was attempted at an illegal time.

However, the rest of the Vl works perfectly fine and the stepper motors perform all the required operations as they should.

I already tried uninstalling ALL the NI software and install it again from scratch without any luck.

If somebody has an idea of what's going on, or how I can fix this problem I would really appreacite if you let me know.

Thanks!!!

                       Pedro Zapata.


0 Kudos
Message 1 of 15
(5,474 Views)
Hello Pedro,
 
What types of operations are you performing in your program?  Be sure that, in MAX, you are configuring your axes as stepper axes.  That could be the cause of the first error that you mentioned.  The axes may be defaulting to servo axes, which would cause problems if you use any functions that are specific to steppers. 
 
The most common cause for the second error is the use of a function at an inappropriate time.  For example, are you using the Enable Axis function in the middle of another move or while the controller is in the middle of another process (move, initialization, home, etc)?  Be sure that any previously executed moves or processes have finished before you try to run that function. 
 
Try those steps and let me know if you have any additional questions.
 
Regards,
Scott R.
Applications Engineer
National Instruments
 
Scott Romine
Course Development Engineer
National Instruments
0 Kudos
Message 2 of 15
(5,455 Views)
Hi Scott,

Thanks for your help!.

In my programs I'm just performing basic linear moves to position sensors in a high throughput array (nothing fancy like blending or vector space moves).

Strangely enough, in MAX the stepper/servo selector is locked in "stepper" and grayed out, so I'm not able to switch betwwen the 2 options. However, I added 2 extra instructions to my initialization subVIs, which involves disabling all the axes, setting them as stepper, and enabling again the axes that are going to be used. This way I managed get rid of error 70017.

However, I still have a waaaay bigger problem (which I mentioned before), and is that LabView has become incredibly unstable when using NI-Motion 7.0 (and I'm talking about a fresh install of ALL the national instruments software). On average 1 out of 3 times I try to run a VI that uses the stepper motors, and hence NI-Motion drivers, will crash labview with the following message:

Runtime error
c:\Program files\national instruments......\labview.exe
R6025
Pure virtual function call

I know the VIs crashed when running the initialization subVI because I made copies of all the VIs and replace this subVI with the "initializate controller.flx" VI, and so far I have opened and run all the VIs that used to crash more than 200 times Smiley Surprised without crashing labview even once.  As soon as I put back the initialization subVI labview starts crashing again. I know timing can be a problem as you said, however I'm 100% sure that 2 functions are NOT called simultaneously. As a matter of fact, the first command in all the VIs that involves the NI-7334 controller is wired after the initialization subVI.

I also created and named custom initialization files (xml setting files) under MAX for each VI, which I then wired to the "setting name" input of the "initializate controller.flx" VI, so that the steppers are configured properly for each VI (this is equivalent to what the initialization subVIs I wrote use to do....and should do without crashing labview, but still can figure out what's the problem).

I'm attaching a copy of one of my initialization subVIs to see if anybody can figure out what's going on. Besides, for me is more convenient to have these subVIs instead of the xml files since we are building other 3 machines equivalent to the ones we have, and is easier to move VIs that incorporate an "autoconfiguration" subVI from one machine to the other, instead of having to load the settings in the xml files under MAX prior to use each VIs.

Thanks a lot!!

                         Pedro Zapata.




0 Kudos
Message 3 of 15
(5,442 Views)

Pedro,

I attempted to open your subVI, but the block diagram is password protected.  Without the ability to look at the block diagram, my troubleshooting will be very limited.  What is the password that I can use to view your code?

Regards,
Scott R.
Applications Engineer
National Instruments

 

Scott Romine
Course Development Engineer
National Instruments
0 Kudos
Message 4 of 15
(5,428 Views)
Hi Scott,

I'm really really sorry. I thought I sent you the copy of the VI without password I had put on my computer's desktop (I have to password protect the VIs because sometimes other guys in my lab like to "play" with them and change settings Smiley Wink).
Attached is a copy of the same VI without password.

Thanks againg for your help.

Regards,

                  Pedro.
0 Kudos
Message 5 of 15
(5,424 Views)

Pedro,

Thanks for sending me the corrected VI.  I will take a look into its functions and let you know what I find out as soon as I can.

Regards,
Scott R.
Applications Engineer
National Instruments

 

Scott Romine
Course Development Engineer
National Instruments
0 Kudos
Message 6 of 15
(5,411 Views)

Pedro,

I would suggest that you try placing the Initialize Controller.flx function between your while loop and the Motion Error Handler.  The settings that you change in your initialization VI don't get written to the controller until you call the initialize function.  If the initialize function is not called, then the code will continue using the values that were set when the initialization function was last called.  This could be the source of the warning that you were getting.

Try placing the initialize function into your code and let me know if you have any additional questions.

Regards,
Scott R.
Applications Engineer
National Instruments

 

Scott Romine
Course Development Engineer
National Instruments
0 Kudos
Message 7 of 15
(5,394 Views)
Scott,

Thanks for your reply.

I think putting the Initializate controller.flx in the initialization subVI won't help, since, as long as I understand, the Initializate controller.flx initializes the specified controller according to the settings as configured in Measurement & Automation Explorer, not the ones I set in the subVI (actually I gave it a try and put the Initializate controller.flx after the while loop of my subVI as you suggested, and then make several changes to the stepper and limit polarities. Every single time the the controller was initializated to the settings present in MAX, not the ones I was changing).

Another thing I wanted to mention. I connected my setup (a PXI-1002 chassis with the PXI-7334 controller, a PXI-6031E DAQ, and a PXI-2501 multiplexer) to a new machine with a fresh install of labview 7.1 (I was using labview 7.0 previously), and labview will crash showing the exact same runtime error I was getting in my previous machine. So a problem with labview 7.0 can be ruled out. Now, I rolled back to NI-motion 6.15 (keeping the new 7.00.3001 firmware of the PXI-7334 installed by NI-motion 7.0) and everything works perfectly fine: I've run my VIs around 200 times wthout a single crash, besides when I make a change in my initialization subVI it will configure the steppers properly. So that, I'm pretty much convinced that the problem is directly related with NI-Motion 7.0.

Regards,

                   Pedro Zapata.
0 Kudos
Message 8 of 15
(5,378 Views)
Hi Archivaldo,
 
You could try placing the Initialize Controller.flx at the beginning of your subVI, then reconfiguring your axis as you wish.  The Initialize Controller.flx will configure your controller to the settings in MAX, then you can change the axis settings to the values you wish.  It's possible that Initialize Controler.flx in NI-Motion 7.0 is performing additional device identification and initialization than that performed in NI-Motion 6.15.
 
0 Kudos
Message 9 of 15
(5,370 Views)
Hi Michael,

Maybe you are right and NI-MOTION 7.0 is performing additional steps when configuring the PXI-7334. However, there must be something wrong going on since labview will totally crash and close 1 out of 3 times when the initialization subVI runs (showing the following error: Runtime error c:\Program files\national instruments......\labview.exe R6025 Pure virtual function call), and work properly configuring the PXI-7334 with the right parameters when it doesn't crash.
I guess for the moment I'll stay away from the unstable behavior I'm getting from NI-MOTION 7.0 and stick to NI-MOTION 6.1.5. with which everything is working wonderfully (no problems and no crashes at all after 3 days of continuos work). Maybe I'll give a try to a newer version of NI-MOTION when a revision of version 7.0 is released.

Thanks a lot for your help.

Regards,

                 Pedro Zapata.

PS: I will install visual studio soon in the same machine I'm working with NI-MOTION, so maybe later I can install NI-MOTION 7.0 and choose to debug the application when labview crashes. Of course I will not try to fix the code Smiley Wink, but I can send you the location of the problem.
0 Kudos
Message 10 of 15
(5,363 Views)