Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Relay Problems (http://www.chiefdelphi.com/forums/showthread.php?t=133811)

Team3220 31-01-2015 21:47

Relay Problems
 
We are having some trouble coding some relays. We want to use window motors attached to spike relays to raise and lower an arm (kinda like the front of a tractor) to lift the totes for this year"s game. We need help coding the relays and motors, and assigning buttons to stuff. Do you need to use some comparison code or something? We are total rookies, and some help or links to other forum posts with the same issue would be greatly appreciated. I can post pictures of stuff we have tried / are trying, if you guys think it will help.

ATannahill 31-01-2015 22:00

Re: Relay Problems
 
Can you tell us more what how you expect this to be controlled?

Will you have two positions (up and down)? three? Or do you want to be able to stop anywhere in the path?

Do you want a button that drives it up and one that drives it down? Do you want a button that sends it to the top most position and one for the bottom position?

How will you know when it is at the end of the movement? are the limit switches?

Team3220 31-01-2015 22:23

Re: Relay Problems
 
We're trying to keep it simple- hold a button to raise, hold a button to lower. I guess that would be 2 positions. We want it to stop whenever the driver stops pressing the button. The arm is powered by a winch/pulley type of deal, so as of right now it's up to our driver to not raise the arm too high and bog down the motor (unless we can figure out a way to limit the motor's rotation. We plan on doing stuff like that once we have the main robot working how we like it.)

SuperBK 01-02-2015 22:13

Re: Relay Problems
 
What language? Labview, C++, or java?

GeeTwo 01-02-2015 22:54

Re: Relay Problems
 
Quote:

Originally Posted by SuperBK (Post 1437134)
What language? Labview, C++, or java?

I'd presume LabView, since it's on the LabView forum.

Alan Anderson 01-02-2015 23:08

Re: Relay Problems
 
This thread probably has what you want. See post #6 for sample code.

Team3220 06-02-2015 14:56

Re: Relay Problems
 
1 Attachment(s)
Here's our code- it's giving us an error in TeleOp saying that the Relay DevRef needs to be wired. Also, we fixed the Set/Get issue

Alan Anderson 06-02-2015 15:23

Re: Relay Problems
 
Quote:

Originally Posted by Team3220 (Post 1439372)
Here's our code- it's giving us an error in TeleOp saying that the Relay DevRef needs to be wired.

You see your Relay RefNum Get? Yeah, what you have there is actually a Relay RefNum Set. Replace it with the right one and that error will be gone.

Team3220 06-02-2015 17:54

Re: Relay Problems
 
We got it mostly fixed. Still an error on the second comparison. I'll post a picture when I get home.


All times are GMT -5. The time now is 10:21.

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