Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

using only ONE limit switch for limit and home?

Hi,
I use a motor (PCi 7344, Labview 7.1) and a pulley to establish a rotary motion of a ring with attached parts. This ring can rotate only about 220 degree and therefore I planed to install two limit switches. Unfortunately it is very hard to find positions for two switches and therefore I thought about using only one switch which can be triggered from both ends of the rotation. Moreover I want to use this switch as a reference point. When the ring rotates in the reverse direction the attached parts trigger the switch from one direction and a reference can be found. That idea seems to work good for my application. However, I have a problem.
First I wired the limit switch in the reverse switch input of the (UMI 7764). When I run the motor with MAX (1D-Interactive) the limit switch stopped the rotation in either direction when triggered. Also the find reference position in my LabVIEW program works. However, when I perform a move with the LabVIEW program, the switch only works in the reverse direction because no forward switch is pugged in. Since the motor rotates in the foward direction the system doesn't expect the signal from the reverse switch and it doesn't work.
Therefore I decided to wire the switch into both the reverse and the forward input of the UMI. When I trigger on of the switches MAX tells me that  "botch limit switches are active". So far so good. But now does the find reference.vi not work. The system expects the reverse switch to be activated but both are... it gets confused I suppose.
Now my question: Is there a way to use only one switch for two limits and as a reference? Or do I need an extra home switch? Since I don't really have space to mount another switch I would really appreciate it there is a solution for the problem.

Thank you very much!!!

Malte  
0 Kudos
Message 1 of 13
(5,314 Views)
Malte,

just wire your switch to the home input and configure the home switch correctly in MAX. The home switch will work like any other limit switch (the axis stops, when it hits the switch, even if no reference search is running) and it will work for both directions.

I hope this helps,

Jochen Klier
National Instruments
0 Kudos
Message 2 of 13
(5,305 Views)
Hi Jochen,
thanks for your reply and your help. The idea is good and I actually didn't try it this way. However, I tried it right now. The switch works to stop the axis moving in either direction in MAX and also the find home reference position in my LabVIEWprogram works. But when I perform a 1D move the switch doesn't stop the rotation. I checked the settings in MAX. Do I have to define that the home switch should react like a limit? I didn't find that option yet...

Thank you!

Malte
0 Kudos
Message 3 of 13
(5,296 Views)
Malte,

you may have come across a quite convenient feature called "Smart Enable". Smart Enable enables the limit switch only during reference moves. Please turn off Smart Enable in the Find Reference settings in MAX.

Jochen
0 Kudos
Message 4 of 13
(5,292 Views)
Hi,
thanks again. The smart enable was activated but it seems that it doesn't work anyway.  But I cannot really test it because now I have a really strange different problem. However I am not sure if it is related to the limit switches... The axis is rotating fast when the motor axis is killed. I closed all programs and when I initialize the controller in MAX the axis is first put in "halt", the motor has power. When I click on kill axis the axis start to move fast. I re-initialized the controller a couple of times and I also cut the complete power and I clicked on reset device in MAX in order to clear the buffer in the controller. Then I restarted MAX and closed LabVIEW. Then I powered the motor drivers and initialized the controller again. The axis was put in halt and when I kill the axis it still starts to move fast. What is wrong???
0 Kudos
Message 5 of 13
(5,289 Views)
Hi,

this issue is probably caused by not connecting the Inhibit output of your axis to your drive. The Inhibit output should be connected to the drive enable (or similar) input of your drive. If you configure it correctly (active high or active low), the drive should shutdown the power for your axis when the controller kills the axis. Without using the Inhibit output the kill command stops the PID loop on the controller but there might be a little offset at the controller's analog output. If your drive is configured in torque mode, a constant voltage at it's input means constant torque and without any external forces this means a constant acceleration, resulting in a fast spinning axis.
"Kill axis" should only be used with a properly cabled inhibit output.

I hope that helps,

Jochen
0 Kudos
Message 6 of 13
(5,263 Views)
Concerning the initial question:
Please make sure, that the home switch is enabled in MAX and that the polarity is correct. In 1D-Interactive in MAX you should be able to see the state of the switch.

Jochen
0 Kudos
Message 7 of 13
(5,262 Views)
Hi Jochen
tanks for the hint with the inhibit output. That solved the problem!
However, the configuration with ony one limit switch in the home input doesn't really work. The switch is wired to the home input and when I activate the switch the red light in MAX for the home switch turns on. Apparently the switch is enabled and the polarity is correct. When I start moving the motor with MAX I can stop the rotation by activating the limit switch. Both directions work. Also the find reference sequence (home) in my LabVIEW program works fine. However, when I use this program for move to a target position, an activeted limit switch doesn't  stop the rotation. The axis hesitates for a tenth of a second but it continues moving even though the switch is still active.
I actually found a position to install another limit switch but it would be great if it would work with only one.

Dankeschön!

Malte
0 Kudos
Message 8 of 13
(5,243 Views)
Hi Malte,

I don't know exactly, what's going on here, but I have some ideas:
  • You said, that the home switch works in both directions, but not in your application? Does that mean that you have done a test with a move in 1D-interactive in MAX? What's the difference between this move and your moves in your application? Does velocity play a role here? If you reduce the velocity does the axis stop then?

  • Is there a chance that your switch is bouncing? The 73xx boards have a devounce filter for limit switches, but maybe the switch is bouncing extremely with a long settling time. Could you check this (e. g. with a scope)?

  • Does the problem also occurr when using a very simple example (single axis move)?

Thanks,
Jochen
0 Kudos
Message 9 of 13
(5,229 Views)
Hi,
thanks again for your ideas. I tried a very simple 1d move in LabVIEW and that works fine. So I had a look again on my other (test) program and I found the problem. I placed my 1d move in a while loop so that the target position gets updated when the move is completed and stopped. In this loop is the start.flx so that the move would start and the motor would rotateif the target position is not equal to the current position (as long as a stop latch button is not activated). Therefore a limit switch would stop the move but the while loop would start the move again since target and current position are not the same. I actually didn't expect that behaviour since the limit switch is still activated when the move should start again. I thought that no power can be sent to the motor as long as a limit switch is pushed.
This problem is not really important any more because I have to write a niceer and cleaner program and I don't want to use this while loop anway. But I would like to know if/why a move can start as long as a limit switch is activated.

Thank you in advance!

Malte

PS: I attached the old program that doesn't work with the switches.
0 Kudos
Message 10 of 13
(5,224 Views)