04-06-2022 04:37 PM
Hi LabVIEW community,
I am trying to integrate a limit switch to a motor using LabVIEW. So far I was able to run the motor and change its direction using the code attached below. Now I am trying to integrate the limit switch so that when the switch is pressed the motor stops and instantly changes its direction. I need some help with the code attached below.
Thank you
04-06-2022 08:31 PM
I haven't looked at your code, but might I suggest that you begin by simply stopping the motor when the limit switch has been set? I realize that doing this means you'd need to "manually" move the motor away from the limit, but this might be a way to start. You might couple this with another VI that moves the motor "a small distance" even if the limit switch is set, and a third VI that programs the motor to move in the "opposite direction".
I'm going to leave it to you to figure out how to get these three simple-to-write and simple-to-test VI to work together to accomplish the "reverse from the limit" behaviour you mentioned.
Bob Schor