Elevator going one way



My team is trying to set up an elevator using one motor using a and b on our Logitech f310 gamepad. We currently have it going down using b but we can’t get it to go up. Any suggestions on how to get it to raise would be amazing

I’m not used to LabView as I haven’t touched it in years, but it seems to me that you are assigning both to “-1”. Let me know if that’s not what that last node does.

No. That’s for something else It’s the upper section

The upper section only every gives the motor a value of “-0.5”. That being said I suppose you have another page with the opposite value? If so I’d like to see that because it seems like that’s were your issue is.

@Stephen_Wolf that would be in teleop too I assume, I’m not at the computer right now. We’re trying to weigh the hot

You really need to show all of your code for teleop if you want help with the issue. Otherwise we are all guessing what you have in the other cases of your code.

Why not use two select functions with three values (guessing -0.5, 0, 0.5), where -0.5 is down, 0 is off, and 0.5 is up?

Wire the 0 through the F of one select, -0.5 to the T in the same select. Wire the output of that select into the F of the next select, then 0.5 to the T in the second select. Then you only have one motor call and it’s completely shown to us.

Sorry, I don’t have LabVIEW on my work PC to show you.

Elevator Controller.vi (12.9 KB)

Try this vi to help you

You need to connect the limit switches and the joystick buttons. Connect the output to the motor controller for the elevator motor. I did notice that I left the motor speed at +/- 1. You may want to change that. It should take into account the limit switches. You may also need to invert the motor output if your motor is connected differently.

So to me your logic should be:
If button 1 is pressed and top limit is not hit. Go up.
If button 2 is pressed and bottom limit is not hit go down.

You can either use case structures or select statements either one works perfectly fine but unfortunately if you don’t post a snippet or something we can’t see the other cases in your case structure. Here is it done with select statements:
In this case if both are pressed it will go up but I recommend you just don’t do that

OK, making some assumptions based on the snipped and the code comment.
You have an elevator that is either all the way at the top or all the way at the bottom, no in between stops.
Assume button B = button 0, Button A = button 1 in Labview.

So let’s take your combination of the value of button 0 and the value of the top limit switch. The top limit switch is TRUE when depressed (elevator at the top).

Your screenshot only is showing the “FALSE” side of this combination. But the FALSE side only runs when the limit switch is depressed AND you are holding the B button. I assume the TRUE side of that case starts sending your elevator down. But the moment the elevator travels down far enough that the top limit switch is no longer depressed your code will switch to the FALSE outer case and FALSE on the inner case. Again, not seeing the code for that combination.
But since it is working going down I am guessing the “FALSE outer” - “FALSE inner” has code that is commanding the elevator to go down. But the code is working not because you have buttons pressed but because neither limit switch is depressed.
If I’m correct right now you are coded so that when neither limit is depressed the elevator is commanded to go down.
So, once it is in the down position the bottom limit switch is depressed but no button on the stick.
So your “FALSE outer” - “FALSE inner” code is running continuously. (if you do have motor commands in this case commanding the elevator down you risk stalling and burning out your elevator motor).

So when you press A and the bottom limit is depressed then your “FALSE outer” - “TRUE inner” runs and you should be commanding the motor with -.5 output which I assumes should make the elevator go up BUT the moment the bottom limit switch is no longer depressed then your “FALSE outer” - “FALSE inner” code will kick back in and based from my previous assumption will command your elevator to go down.

So is the goal to hold the button to make it go up or down and it will go up or down until the limit switch is pressed?

How do you hold the elevator in the up position? By just feeding the motor enough power to keep it up?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.