Chief Delphi

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

DarthMaulCIS 08-02-2014 15:02

Case Structure
 
1 Attachment(s)
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?

Joe Ross 08-02-2014 15:05

Re: Case Structure
 
The way you have it now, it will always go in reverse, no matter whenther the button is pressed or not.

DarthMaulCIS 08-02-2014 15:11

Re: Case Structure
 
What do I need to do to change that?

Mark McLeod 08-02-2014 20:52

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.

DarthMaulCIS 10-02-2014 17:57

Re: Case Structure
 
Quote:

Originally Posted by Mark McLeod (Post 1339827)
BTW, a Select block can do the same thing.

But won't it go back to forward after I let go of the button?

Mark McLeod 10-02-2014 18:39

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.

DarthMaulCIS 10-02-2014 18:48

Re: Case Structure
 
Quote:

Originally Posted by Mark McLeod (Post 1340865)
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?

Mark McLeod 10-02-2014 18:54

Re: Case Structure
 
That Toggle example would work fine, and it'll work in Periodic Tasks.

DarthMaulCIS 11-02-2014 16:55

Re: Case Structure
 
So if i have code in Periodic that resets the position to forward, the toggle will still work right?


All times are GMT -5. The time now is 09:50.

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