Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Linear servomotor endlimit value reading

Hi

 

Im currently controlling linear servo motor with Labview and ran into a problem. I need to stop the motor immediately when it reaches the endlimit sensor. The problem is, that the endlimit sensor value is not as stable as I would like and sometimes has the same value, as it does when the motor has actually reached the endlimit. Therefore the motor stops without reaching the end.

I tried to use while and for loops to see if the value stays high long enough to be sure that the motor has truly reached the end.The problem I had with this was that while the for/while loop was checking the value, rest of the code was stopped and waiting for them to finish. Is there a possibility to get case structure and while/for loop running at the same time? Or is there a different way to solve the problem?

 

EDIT: I think its worth to mention I'm using Arduino UNO to measure the voltage of the endlimit sensor. It seems that the initilization seems to be the problematic part of it.

0 Kudos
Message 1 of 3
(2,413 Views)

How are you currently controlling the motor, and what logic do you have implemented with the end limit? In addition, could you elaborate on the endlimit sensor value not being stable? Attaching your code could be useful in this situation.

Brian.D
NI Product Owner
VeriStand
0 Kudos
Message 2 of 3
(2,372 Views)

Hi

 

Sorry for the late answer, but it seems that I have found a solution for my problem already using the event structure. Under the endlimit sensor value not being stable I meant it changing between 4-5V even when the limit was not reached.

0 Kudos
Message 3 of 3
(2,363 Views)