Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

absolute position won'[t work

Solved!
Go to solution

I have a PCI 7332 card, driving two GE Fanuc Stepper cubes.  I am using LabVIEW 8.5.  I am using a joystick to move the two axes manually and this works great.  When I change the operation mode to ABSOLUTE POSITION, and try to type in a position for the motors to move to, the motors wont move.  I tried writing a test case using the same code and it doesn't move the motors either.  But, I can make a reference move with an offset to an absolute position (reference move, reset position to zero, make offset move to position) and this works everytime.

Here is the test case that won't run on its own.  Thanks for any help on this.

0 Kudos
Message 1 of 24
(7,751 Views)

One other thing I forgot to add, in MAX, I cannot make a move to an absolute position either through the 1D or 2D Interactive tab.

Sorry for the subject mangling

0 Kudos
Message 2 of 24
(7,750 Views)

Hi shalloras,

 

I have a few questions for you that might help track down the problem. Is any error given when you attempt moves by absolute position? If you reset the position in the 1D or 2D interactive interface and then a attempt a move to Target Postion 1000 counts, do you see no movement? Are any of the Axis Status LEDs in MAX indicating problems? Make sure to remember to save your settings and reinitialize the motion card after you make changes to the settings.

 

Thanks,

Matt
NI Community Team
National Instruments
0 Kudos
Message 3 of 24
(7,712 Views)

Thanks for the reply Matt.

No errors when trying to make a move in absolute position mode.  I watched in "slow-mo" and it goes right through all the subVI's into the while loop and then waits.

I have tried resetting position and making the move, checked velocity/accel/decel and nothing happens.  The MAX indicators in the interactive tab show that it is trying to make the move and that it has not finished the move.  The position does not change from zero but the status LEDs do change (see screenshots).  Nothing physically moves and the 'current trajectory data' does not change.  When I press HALT, the status LEDs go back to the first pic.

I have saved and reinitialized whenever changing settings in MAX.

It is strange that I can go back to a velocity move with no problem after trying an absolute position move. 

 

BEFORE MOVE IS ATTEMPTED

before.JPG

 

AFTER MOVE IS STARTED

after.JPG

0 Kudos
Message 4 of 24
(7,709 Views)

I tried using a different VI - "Axis Straight Line Move" which did not resolve the problem but it did return an error:  -70023 "One of the parameters passed into this function has an illegal value".  As far as I can tell, there is nothing illegal about the values I am passing but here they are for review.

 param.JPG

I have also tried using a while loop that encloses a VI "Read Axis Status" that waits for the axis to be stopped before trying a move.  This didn't help at all, either. 

Am I correct in assuming that the find reference move with an offset move at the end uses an absolute position move to make the offset move?

 

0 Kudos
Message 5 of 24
(7,698 Views)

Hi shalloras,

 

Just to confirm, you can perform a relative position move or velocity move in MAX successfully, but when attempting an absolute position move, the program just stalls and waits for the move to execute?

 

What is the reference that you are moving to in the reference move? When you mention an offset move are you making a relative move after the reference location is found? I think this problem may be related to encoder feedback. Are you using an encoder? If so, are you able to correctly read position from an encoder? The absolute position moves will require some awareness of current position, while velocity and relative moves will output pulses without consideration for feedback.

Matt
NI Community Team
National Instruments
0 Kudos
Message 6 of 24
(7,693 Views)

I am using steppers with no feedback, so open loop. 

When I execute a reference move, I call the "Find Reference" VI and look for the forward and reverse limits on both axes, then I call the "Find Reference" VI and look for the home switch on both axes.  When this is found, I reset the current position to zero on both axes and then perform an offset move from the 0,0 position.  When this is finished, I can now make velocity moves with no trouble on both axes. 

NOTE:  All of this is happening in the main program, not in MAX.  When I go to make an absolute move, it just waits.  To try to isolate the absolute move, I created the test VI posted here and found that I could not make an absolute move in the test VI either.  Then I tried to make the absolute move in MAX and failed there as well.  That is where I am at today.  I can try to make the velocity move in MAX if you think that would help, but they are using this program everyday for moving this stage using the velocity move as commanded from a joystick.  I just have not been able to get the functionality to move to a point.

 

0 Kudos
Message 7 of 24
(7,690 Views)

Hi shalloras,

 

Sorry for the delay. I wanted to setup a system to test this and confirm a few things. There is an area in MAX indicating 'Current Trajectory Data'. When you perform a velocity move in MAX, do the values for 'Position' and 'Velocity' appropriately update? What about if you perform a relative position move?

 

MAX should track the number of steps that have been moved and, eventhough there is no feedback to confirm position, we should be able to use an absolute position move to go to a specific target step.

 

Let me know what you find if you run these moves. Thanks!

Matt
NI Community Team
National Instruments
0 Kudos
Message 8 of 24
(7,663 Views)

Matt,

Tried the velocity move in MAX, same response as with the absolute move.  I can still make the velocity move in my program but not in MAX.  There is no indication of anything changing on the 'Current Trajectory Data' field.  Just to be clear, I have the VI running and MAX open.  I can make a move in the VI in velocity mode with no problem and MAX updates position.  If I then try to make the velocity move in MAX, it just hangs.  Maybe a problem with the driver?

Sean

0 Kudos
Message 9 of 24
(7,658 Views)

Hi Sean,

 

Sorry for the delay. This may be a problem with MAX. With open loop feedback, regardless of whether the motor is actually moved, MAX should track the number of pulses sent by the controller and then consider the move to be complete. Just to make sure, you are connected to Axis 1 of the controller, correct? Sometimes people will forget to change the default Axis in the 1D Interactive section of MAX away from Axis 1.

 

As you suggested, this may be a problem with the drivers, but it may be a problem with MAX. I would recommend performing a repair of both the NI Motion drivers and MAX. How to perform a repair on the software is described in the How Do I Uninstall or Repair National Instruments Software? knowledge base article.

 

Let us know if you have questions or updates.

Matt
NI Community Team
National Instruments
0 Kudos
Message 10 of 24
(7,625 Views)