Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Has anyone figured out limit switches for 2015 (http://www.chiefdelphi.com/forums/showthread.php?t=133065)

Intern 17-01-2015 15:32

Has anyone figured out limit switches for 2015
 
i do not know how to code limit switches in 2015 labview, can someone comment a picture and show me how to do it, i have it done in begin all i need is teleop

Alan Anderson 17-01-2015 16:02

Re: Has anyone figured out limit switches for 2015
 
What do you want the limit switch to do? Describe exactly what you want the robot to do when the switch is open and when it is closed, and we can help you program it to do that.

Intern 17-01-2015 16:13

Re: Has anyone figured out limit switches for 2015
 
when the limit switch is pressed i want the cim motor to stop going that direction so it doesn't de-rail

Alan Anderson 17-01-2015 16:35

Re: Has anyone figured out limit switches for 2015
 
1 Attachment(s)
That's a pretty typical use of a limit switch. Here's how I would do it, using an In Range and Coerce function. When the switch value is not true, the motor control is allowed to vary between -1 and +1. When the switch is true, the motor is only allowed to be between -1 and 0, keeping it from traveling any farther forward.

andboyer 18-01-2015 13:40

What motor controllers are you using? With the new controller you can connect the limit switch directly to the controller and it will function without any additional code. https://www.google.com/url?sa=t&sour...dAP2YN2BXa9lJQ

1uan 20-01-2015 17:37

Re: Has anyone figured out limit switches for 2015
 
How do you get the motor control dbl to show up

Alan Anderson 21-01-2015 00:59

Re: Has anyone figured out limit switches for 2015
 
Quote:

Originally Posted by 1uan (Post 1431165)
How do you get the motor control dbl to show up

In my snippet, that was just a placeholder to represent the value you want to send to the motor. How you come up with that value is up to you. You can get it from a joystick axis, or select between different values based on joystick buttons, or compute it using PID based on sensor feedback, or anything you want.

1uan 21-01-2015 09:54

Re: Has anyone figured out limit switches for 2015
 
thank you for the explanation

TheJuanRing 04-02-2015 18:15

Re: Has anyone figured out limit switches for 2015
 
hey this is kind of a followup, but has anyone figured out how to do it with c++???

ozrien 04-02-2015 19:18

Re: Has anyone figured out limit switches for 2015
 
This might help....the examples are in Java, but the class names are pretty similar.

http://wpilib.screenstepslive.com/s/...ommit=S earch

mshafer1 05-02-2015 16:16

Re: Has anyone figured out limit switches for 2015
 
Quote:

Originally Posted by ozrien (Post 1438437)
This might help....the examples are in Java, but the class names are pretty similar.

http://wpilib.screenstepslive.com/s/...ommit=S earch

Here are some more examples in LabVIEW, both the limit switch tutorial and the state machine tutorial use a limit switch scenario.
Website of LabVIEW Tutorials for FRC

TheJuanRing 05-02-2015 17:20

Re: Has anyone figured out limit switches for 2015
 
Quote:

Originally Posted by mshafer1 (Post 1438871)
Here are some more examples in LabVIEW, both the limit switch tutorial and the state machine tutorial use a limit switch scenario.
Website of LabVIEW Tutorials for FRC

Quote:

Originally Posted by ozrien (Post 1438437)
This might help....the examples are in Java, but the class names are pretty similar.

http://wpilib.screenstepslive.com/s/...ommit=S earch



thanks, both of you guys, for the examples, it is a huge amount better than what i had before
(•‿•)
Edit: In hind sight I really should have thought about searching for that on the WPILib website


All times are GMT -5. The time now is 08:57.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi