Go to Post I've completely figured [the hint] out: Robots will have to move around, and also displace objects in order to score points. What do I win? - pfreivald [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 22-02-2016, 17:25
Team 5706 Team 5706 is offline
Registered User
FRC #5706
 
Join Date: Feb 2016
Location: Newberry, MI
Posts: 8
Team 5706 is an unknown quantity at this point
Question Questions?"?

We are programming using lab-view and were wondering if it is possible to set a toggle? Also how to program for a motor to go both forward and reverse?
  #2   Spotlight this post!  
Unread 23-02-2016, 06:49
olidem123 olidem123 is offline
Not a community manager
AKA: Olivier Demers
FRC #5618 (PLS)
Team Role: Leadership
 
Join Date: Feb 2016
Rookie Year: 2015
Location: Canada
Posts: 12
olidem123 is an unknown quantity at this point
Re: Questions?"?

I probably didn't understand your question but there is no way that a motor can go two ways at the same time.
What kind of toggle do you want to make? Plz give more info.
  #3   Spotlight this post!  
Unread 23-02-2016, 08:49
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,113
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: Questions?"?

I don't understand the questions either. Please put a little more effort into describing what you want to do, so I can be confident that my effort to give answers will be in the right direction.
  #4   Spotlight this post!  
Unread 23-02-2016, 09:40
cjl2625's Avatar
cjl2625 cjl2625 is offline
apel py
AKA: Cory Lynch
FRC #2067 (Apple Pi)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Guilford, CT
Posts: 412
cjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to behold
Re: Questions?"?

Here's a mockup of how I do toggle, as in push a button once to turn on, and push again to turn off. (Don't have access to real labview right now)
http://put.nu/files/yfTgg-h.jpg
Not sure if there's a more compact way, but this works. (The blocks with arrows are feedback nodes, and the thing on the left is the button input)
Since the feedback node stores information from a previous iteration, the first part says "button is currently pressed AND last iteration it wasn't," meaning the button was just pushed.
The exclusive or part causes it to flip between true and false when the button is pressed, due to its "either but not both" behavior.

Not sure what your second question is, but you can make a motor go forward by supplying a positive output value, and backwards with a negative output value. Switch between values with a case structure or select block.
__________________
Head Programmer / Driver

Last edited by cjl2625 : 23-02-2016 at 09:54.
Closed Thread


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 00:43.

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