Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

On board program does not run the motor to new positions yet commands to state of digital I/O in the same program line.

I am controlling a stepper motor position via a PIC-7342 board. This part of the program has worked in the past. I have another program that does almost the same thing and it works as always. 

 

The program sets the speed and accelerations, then sets a position and tell the motor to run to the position. Then it sets a communication bit through the MCS register. Then it sets a new position and command the motor to run to the new position. It then delays a short time and commands an output to turn on. Then it sets a new position and commands the motor to run to the new position. After each command to run there is a wait for motion complete.  The code used to work correctly.  Now the motor runs to the first position and proceeds no further.  The finial position is sometimes a couple of steps past the setpoint, which is very unusual. The digital output is fired like the second position has been reached, even though the motor has not moved to the position. The actual path for the motor is clear, so there is not mechanical reason for the problem.  How would you troubleshoot an on board program?

 

   

0 Kudos
Message 1 of 4
(3,994 Views)

ITElearner,

 

What has changed since you last ran your system?  Can you move the motor in Measurement & automation explorer?  Are you getting any errors?  Is this program written in LabVIEW?  You may also find the following useful:

 

Configuring a Motion Control System

http://zone.ni.com/devzone/cda/tut/p/id/3126

 

Configure and Test a Stepper Motor

http://digital.ni.com/public.nsf/allkb/9675C83F037811F68625727C0002A4A5?OpenDocument

 

 

 

Regards,

 

Sam K

Applications Engineer

National Instruments

www.ni.com/support

0 Kudos
Message 2 of 4
(3,961 Views)

Of the 6 on board programs, only the one has the problem.  I got the program running by putting a .250 second delay after the wait for motion complete test. It seems the motion complete blocks are not wating.  Is there any way of troubleshooting what is happening on the board?

0 Kudos
Message 3 of 4
(3,959 Views)

ITElearner,

 

The NI-Motion User Manual is a good place to start troubleshooting any NI-Motion application.  Chapter 14 contains information about Onboard Programs with NI 73xxMotion Controllers. 

 

NI-Motion User Manual

http://www.ni.com/pdf/manuals/371242b.pdf

 

As far as troubleshooting what is happening "on the board" your using LabVIEW to monitor settings and values from the board is your best option.

 

Regards,

 

Sam K

Applications Engineer

National Instruments

www.ni.com/support

0 Kudos
Message 4 of 4
(3,941 Views)