Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

error 1097 occurs when i try to run my vi

hi,
 
i am trying to run two stepper motors simultaneously using a joystick.. i was able to do the same without any problems until i defined a threshold and sensor in order to limit the stepper motor motion.. what i wanted to do is when the value of sensor surpasses the threshold value the motor should stop. but when i try to run the vi it gives me a 1097 error at the call library function node.. i am unable to figure out the cause for that error since it occurs only when i attach the sensor and threshold formula node.
i am using labview 8.2, MID 7602, PCI 7344
 
for reference i am hereby attaching both VIs..
steppermotor1.vi works fine.. steppermotor2.vi does not.. i would appreciate if someone could help me out with the issue..
 
thanks,
 vijay
Download All
0 Kudos
Message 1 of 15
(5,491 Views)
Hi Vijay,

I have tried running the code that you attached on my machine, and was unable to reproduce any error.  I notice that you have a Call Library Function node in your code, but there is also one in each of the motion subVIs that are called in the VI.  It is possible that the error is happening at one of those.  You could try placing motion error handlers at the end of each of the motion calls.  You can find this by going to the Vision and Motion»NI-Motion»Error and Utility Palette.  Placing this error handler here might help determine if the error is ocurring in one of the motion VIs or not.
Wes Pierce
Principal Engineer
Pierce Controls
0 Kudos
Message 2 of 15
(5,479 Views)
Hi Mr.wes,

        Thank you for the help, i appreciate your speedy reply.. i was able to solve the issue with the solution that you prescribed.. its running fine now... just out of curiosity wanted to know what was the reason behind the problem?

vijay
0 Kudos
Message 3 of 15
(5,475 Views)
Hi Vijay,

I'm glad your system is running.  In general, it is not a good idea to initialize your motion board every loop iteration.  However, using the motion error handler can help terminate the motion session on your card, and this may be what happened in your case.  This is the most likely case.
Wes Pierce
Principal Engineer
Pierce Controls
0 Kudos
Message 4 of 15
(5,454 Views)
hi wes,

                i have one more problem in my Vi. everytime i stop the vi  the motor stops but when i go to the MAX it shows me that the motor is still running and i need to manually press halt to stop the velocity and position count and reset it. i wonder why this is happening and do i need to include a halt in the vi? what and how would you suggest me to do that? Also i needed to display the velocity reading of the motor from MAX in my vi. how do i do that? please let me know if you have any suggestions.
0 Kudos
Message 5 of 15
(5,374 Views)
Hi Vijay,

You should not have to include a halt in the VI.  What do you mean that MAX shows that the motor is still running?  To read in the velocity of your motor, you can use the Read Velocity.flx.  I would also take a look at some of the motion examples, which can be found by going to Help »Find Examples... and search Motion.  Also, if you have a support contract, you can create a service request with an engineer online by going to www.ni.com/support, and clicking on Request Support from an engineer.

Good Luck!
Wes Pierce
Principal Engineer
Pierce Controls
0 Kudos
Message 6 of 15
(5,362 Views)
hi wes,
                Thanks for the reply. what i meant was when i stop the vi, the MAX shows that the motion is not complete and current direction is forward. when i press halt in the MAX the "motion is complete" light is activated and the velocity comes to zero. i was just wondering if this could cause any problems.
0 Kudos
Message 7 of 15
(5,340 Views)
Hi Vijay,

There are a number of potential causes.  Are you operating in Opn-Loop or Closed-Loop?  Also, are you encountering following error?  Is a limit switch or home switch being activated?
Wes Pierce
Principal Engineer
Pierce Controls
0 Kudos
Message 8 of 15
(5,309 Views)
hi wes,
                i am operating in the custom settings. and none of the limit switches or home switches are activated. also sometimes i get an error message saying that an internal error occured " fpsane.cpp line 392" and labview needs to shut down. this happens once in a while.

vijay
0 Kudos
Message 9 of 15
(5,302 Views)
Hi Vijay,

I believe the fpsane.cpp line is a code that checks the sanity of a front panel object.  What I would try in this situation would be deleting the control or indicator that is causing it and creating it again.  This could be related to the other odd motion issue we saw.
Wes Pierce
Principal Engineer
Pierce Controls
0 Kudos
Message 10 of 15
(5,282 Views)