Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Software limits not working

Hello,

I am trying to use both Hardware and Software limits with my motion control system. In my VI, I have called the Enable Limits.vi and Read Limit Status.vi twice for both the Hardware and Software limits. The Hardware limits work as expected.  However, when the Software limits are reached, the indicator light will turn on, but they do not stop the motion.

I have read that I might need to use the Find Reference.vi along with Software limits, but I have no interest in moving the tables only until a software limit is reached. I only want to use them as a safety measure doing normal motion tasks before the hardware limits are reached.

I am attaching my VI for your reference. The GUI may look sloppy since I have customized my sub-VI indicators.

Thanks,
Kyle
---
College of Aerospace Engineering
Georgia Institute of Technology
Message 1 of 6
(4,208 Views)
 
 

Kyle,

In general software limits work fine. Have you tried if they work properly when you run a simple example?

I had a look at your code. You run all configuration steps in each loop iteration and there is no dataflow that makes sure that these function calls don't run inbetween your other vis. There is a good chance that this causes the trouble. You also should run the configuration vis only when you want to change some settings and not at each iteration.

This is from the flex_load_sw_lim_pos() help:

Even when disabled, you can poll the software limits by the host computer or use an onboard program to warn of an out of range position. Refer to the Read Axis Limit Status function for information about reading the software limit status.

The forward software limit is considered active if the current position is greater than or equal to the forward software limit position. The reverse software limit is considered active if the current position is less than or equal to the reverse software limit position.

Software limits are often used to restrict the range of travel and avoid hitting the hardware end-of-travel limit switches. For example, you can travel at a high velocity until hitting the software limit switch, and then move more slowly until hitting the hardware limit switch.

Caution  After an axis has stopped due to encountering a software limit switch, you can still move further in the same direction if you command the axis to do so. This behavior is not possible with hardware limits, but is appropriate for software limits.

So if you send a start command after the sw limit was hit, the axis still can travel into the same direction.

With your current application architecture it's hard to tell what's going on, as LabVIEW is designed to run all parts of the code in parllel if no dataflow or other sequencing methods are used. Please consider refacturing your application by following a more structured design pattern (e. g. an event driven state machine might be appropriate for your application).

 

State Machines


For the case that the limit switches really don't work, could you please provide some more information? Which type of motion board are you using? What types of axes do you control (servo, stepper (open or closed loop)?)

Best regards,

Jochen Klier
National Instruments

 

Message Edited by Jochen on 07-16-2007 02:16 PM

Message 2 of 6
(4,199 Views)
Jochen,

I will try to describe the situation as best as possible.

Setup:
MID-7604
PCI-7344
Stepper (Open Loop)

Let's say I attempt the following move:

Initial Position:            0 steps
Target Position:         100 steps
- With limits set at:
     Software Limit:     85 steps
     Hardware Limit:    95 steps

Begin the move:
Reaches 85 steps: Software Limit switch indicator light turns on, moves through SW limit position without halt.
Reaches 95 steps: Hardware Limit switch indicator light turns on (SW light still on from 85 steps trigger), motion halts at 95 steps.

This is the situation for both forward and reverse SW limits. I hope it is clearer this time.


Thanks for the help,
Kyle



- One off topic question: What is the difference between the PCI/FW-7344 cards? We are looking for a PCI-7344 card for a new system, but found a good deal on a FW-7344 and can't find any comparison information.
---
College of Aerospace Engineering
Georgia Institute of Technology
0 Kudos
Message 3 of 6
(4,180 Views)
Kyle,

thanks for the description. This makes it much clearer.
Software limits work a bit different than hardware limits. When a software limit is hit, the axis doesn't halt but it decelerates with the deceleration value that you have loaded before.
In many cases halting a fast running axis means a significant impact on the mechanical system and should be avoided if possible. Software limits help to do this but you need to make sure that the distance between the software limit and the hardware limit is big enough to decelerate the axis. Otherwise you will see the behavior that you have described. You may also want to load a higher value for the deceleration to bring the axis more quickly to a stop.

The FW-7344 is not a PCI plugin board but an external box that contains a 7344 controller. This box is connected to the PC through a firewire (IEEE-1394) interface. The FW-7344 is discontinued and I wouldn't recommend buying this device.

I hope this helps,

Jochen
0 Kudos
Message 4 of 6
(4,173 Views)
Thanks for the FW-7344 advice.


In my above description, had the SW limit been set at 50 steps it still would have behaved the same way. There is no sign of deceleration when it passes the switch, just an indicator light that says it has been triggered.

So in the VI, I tried the following:

Inserted an "EQUAL" operator for matching the current position and the Load Limit Position.vi position that is set using the control on the FP.
Inserted an "OR" operator to accept both the forward and reverse positions.
Inserted an "OR" operator to accept the above "OR" operator and the manual halt button from the FP which is connected to a state driven Stop Motion.vi.

When I did this, it did decelerate as you described above once it reached the set position. However, this seems like a crude way to do this, since I am just working around the software limit VI.

Thanks,
Kyle

---
College of Aerospace Engineering
Georgia Institute of Technology
0 Kudos
Message 5 of 6
(4,164 Views)
The behavior that you describe occurrs when you set software limit positions without enabling the software limits. In your code it looks like you have set and enabled the software limits but again: I don't know what happens if you run these configurations while moves are running, but that's what you are doing.

For a test you should configure all necessary settings in MAX and use the 1-D Interactive panel in MAX to test the functionality of the software limits. When this is working fine you should go back to your code in LabVIEW to debug and improve it following the hints that I gave you earlier.

Jochen
0 Kudos
Message 6 of 6
(4,155 Views)