Go to Post I know I exaggerated a bit, but NASA put a man on the moon with less processing than some FRC bots. Think about that for a minute. - JesseK [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 Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-02-2014, 15:02
DarthMaulCIS DarthMaulCIS is offline
Registered User
FRC #4607
 
Join Date: Jan 2014
Location: Becker, Minnesota
Posts: 24
DarthMaulCIS is an unknown quantity at this point
Case Structure

This is going into Teleop. I didn't use a Select block because I only want it to go Reverse when I push it. Would this accomplish what I want? Or am I breaking my robot?
Attached Files
File Type: vi Restraint-Teleop.vi (12.3 KB, 28 views)
Reply With Quote
  #2   Spotlight this post!  
Unread 08-02-2014, 15:05
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,579
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Case Structure

The way you have it now, it will always go in reverse, no matter whenther the button is pressed or not.
Reply With Quote
  #3   Spotlight this post!  
Unread 08-02-2014, 15:11
DarthMaulCIS DarthMaulCIS is offline
Registered User
FRC #4607
 
Join Date: Jan 2014
Location: Becker, Minnesota
Posts: 24
DarthMaulCIS is an unknown quantity at this point
Re: Case Structure

What do I need to do to change that?
Reply With Quote
  #4   Spotlight this post!  
Unread 08-02-2014, 20:52
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Case Structure

Change one of the cases (True or False) from "Reverse" to "Forward"

Right now both cases set the solenoid to Reverse.

BTW, a Select block can do the same thing.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #5   Spotlight this post!  
Unread 10-02-2014, 17:57
DarthMaulCIS DarthMaulCIS is offline
Registered User
FRC #4607
 
Join Date: Jan 2014
Location: Becker, Minnesota
Posts: 24
DarthMaulCIS is an unknown quantity at this point
Re: Case Structure

Quote:
Originally Posted by Mark McLeod View Post
BTW, a Select block can do the same thing.
But won't it go back to forward after I let go of the button?
Reply With Quote
  #6   Spotlight this post!  
Unread 10-02-2014, 18:39
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Case Structure

That's what your code does now.
It will revert when you let go of the button.

The Select is just a special 2-case Case.

There are easy ways to make the button toggle for either approach.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #7   Spotlight this post!  
Unread 10-02-2014, 18:48
DarthMaulCIS DarthMaulCIS is offline
Registered User
FRC #4607
 
Join Date: Jan 2014
Location: Becker, Minnesota
Posts: 24
DarthMaulCIS is an unknown quantity at this point
Re: Case Structure

Quote:
Originally Posted by Mark McLeod View Post
That's what your code does now.
It will revert when you let go of the button.

The Select is just a special 2-case Case.

There are easy ways to make the button toggle for either approach.
The toggle vi I found here
https://www.google.com/url?q=https%3...-XtvmfI_oiGQqA

Would that work? And I can code into periodic tasks a solenoid position switch without breaking the togglability right?
Reply With Quote
  #8   Spotlight this post!  
Unread 10-02-2014, 18:54
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Case Structure

That Toggle example would work fine, and it'll work in Periodic Tasks.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #9   Spotlight this post!  
Unread 11-02-2014, 16:55
DarthMaulCIS DarthMaulCIS is offline
Registered User
FRC #4607
 
Join Date: Jan 2014
Location: Becker, Minnesota
Posts: 24
DarthMaulCIS is an unknown quantity at this point
Re: Case Structure

So if i have code in Periodic that resets the position to forward, the toggle will still work right?
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 20:59.

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