Go to Post I like my eyeballs where they are ::safety:: - ,4lex S. [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 19-01-2015, 21:01
ozrien's Avatar
ozrien ozrien is offline
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 522
ozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond repute
Re: Linear Actuator Programming Help

Since you're using Jags, would be easier to wire the limit switch inputs of the Jag to the Dart Actuator? Should work even in PWM mode. I know the Ri3d team did the same thing with Talon SRXs (which also have inherent limit switch inputs).
Reply With Quote
  #2   Spotlight this post!  
Unread 20-01-2015, 00:16
Zentx's Avatar
Zentx Zentx is offline
Registered User
AKA: Robert
FRC #3949
Team Role: Electrical
 
Join Date: Dec 2014
Rookie Year: 2014
Location: Canada
Posts: 15
Zentx is an unknown quantity at this point
Re: Linear Actuator Programming Help

Quote:
Originally Posted by ozrien View Post
Since you're using Jags, would be easier to wire the limit switch inputs of the Jag to the Dart Actuator? Should work even in PWM mode. I know the Ri3d team did the same thing with Talon SRXs (which also have inherent limit switch inputs).
I'm part of the electrical team. I was wondering how you would wire the limit switches to Jags. What we are trying to do is, toggle up and down when we want it to. So if i were to wire the limit switches to the Jags, if it clicks, would it automatically switch directions or wait for the next command? Would any coding be necessary?
Reply With Quote
  #3   Spotlight this post!  
Unread 20-01-2015, 23:23
Zentx's Avatar
Zentx Zentx is offline
Registered User
AKA: Robert
FRC #3949
Team Role: Electrical
 
Join Date: Dec 2014
Rookie Year: 2014
Location: Canada
Posts: 15
Zentx is an unknown quantity at this point
Re: Linear Actuator Programming Help

Basically what we want is to press a button and make it go forward until it hits the limit switch, we want it to stay stationary at that point until a command is given to go in the reverse direction where it should also hit another limit switch and stop. Our previous code did not allow us to move in the opposite direction until both switches have been released.

The wires have been already soldered onto PWM pins and connected to the DIO. I really don't want to cut the connections and rewire it to 2 pin connectors to hook it up to the Jags.If anyone has a solution i would be so grateful!
Reply With Quote
  #4   Spotlight this post!  
Unread 21-01-2015, 00:09
mshafer1 mshafer1 is offline
Programming Mentor
AKA: Matthew Shafer
FRC #3937 (Breakaway)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2008
Location: Arkansas
Posts: 55
mshafer1 is an unknown quantity at this point
Re: Linear Actuator Programming Help

I have attached a snippet (LabVIEW generated picture that can be dropped back in LabVIEW to turn back into code) that shows one way of doing this, if I understand what you are saying correctly, you need the linear actuators to stay on their course until either the the driver sends a different command, or the limit switches say to stop. I think I have shown that in this code, if you have any questions, you could send me a private message and I would be more than happy to help you get more figured out.

I attached my original snippet, then realized that I had a typo, when I went back to fix it, I also realized that it could be simplified a little. Using the shift register in this way is really the same as using the feedback node, just that some say that this way is cleaner.
Attached Thumbnails
Click image for larger version

Name:	linearActuators.png
Views:	52
Size:	67.2 KB
ID:	17915  Click image for larger version

Name:	linear2.png
Views:	42
Size:	56.9 KB
ID:	17916  
Reply With Quote
  #5   Spotlight this post!  
Unread 21-01-2015, 11:27
Zentx's Avatar
Zentx Zentx is offline
Registered User
AKA: Robert
FRC #3949
Team Role: Electrical
 
Join Date: Dec 2014
Rookie Year: 2014
Location: Canada
Posts: 15
Zentx is an unknown quantity at this point
Re: Linear Actuator Programming Help

Thanks For The Code! Going to test it out soon.
Reply With Quote
  #6   Spotlight this post!  
Unread 22-01-2015, 11:36
Luid101 Luid101 is offline
Registered User
FRC #3949
 
Join Date: Dec 2014
Location: Canada
Posts: 17
Luid101 is an unknown quantity at this point
Re: Linear Actuator Programming Help

Hey thanks for the code! But we are using digital inputs instead of switches and i think that should change the whole code.

Last edited by Luid101 : 22-01-2015 at 12:03.
Reply With Quote
  #7   Spotlight this post!  
Unread 22-01-2015, 13:01
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Linear Actuator Programming Help

Quote:
Originally Posted by Luid101 View Post
Hey thanks for the code! But we are using digital inputs instead of switches and i think that should change the whole code.
Digital inputs are what the code uses to read switches.
Reply With Quote
  #8   Spotlight this post!  
Unread 22-01-2015, 14:50
Luid101 Luid101 is offline
Registered User
FRC #3949
 
Join Date: Dec 2014
Location: Canada
Posts: 17
Luid101 is an unknown quantity at this point
Thumbs up Re: Linear Actuator Programming Help

OK. thanks for your help guys! we just wired it directly to the jaguars.
Reply With Quote
  #9   Spotlight this post!  
Unread 28-01-2015, 23:24
mshafer1 mshafer1 is offline
Programming Mentor
AKA: Matthew Shafer
FRC #3937 (Breakaway)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2008
Location: Arkansas
Posts: 55
mshafer1 is an unknown quantity at this point
Re: Linear Actuator Programming Help

Quote:
Originally Posted by Alan Anderson View Post
Digital inputs are what the code uses to read switches.
Thank you Mr. Anderson for pointing out what I was trying to say. For anyone new to this thread looking for help, I have used this scenario in a more detailed tutorial on state machines at this link

Last edited by mshafer1 : 28-01-2015 at 23:29. Reason: typo
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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