Go to Post Stop it with the "break the rules, just don't let anyone know" already! - Alan Anderson [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 22-01-2016, 11:21
Robodragons4630 Robodragons4630 is offline
CHS Robodragons Programming
AKA: Noah Jarnigan
FRC #4630 (Robodragons)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Clinton, Tennessee
Posts: 15
Robodragons4630 is an unknown quantity at this point
Toggling speed

I am trying to think of a way to toggle speed. What I am looking to do is make it so that I can choose a speed and then from that I have 5 seconds to move the joystick. While I am moving the joystick the case structure cant just go false. When the joystick isn't moving the case will be false and you have 5 seconds to move the joystick again before it goes false and you have to choose a speed again. I have a picture attached that shows my current vi.
http://i.imgur.com/y0bN7zo.png
Reply With Quote
  #2   Spotlight this post!  
Unread 22-01-2016, 11:40
adciv adciv is offline
One Eyed Man
FRC #0836 (RoboBees)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2010
Location: Southern Maryland
Posts: 478
adciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to all
Re: Toggling speed

Let me see if I have this correct

You want to set a speed.
If 5 seconds elapses, you want it to stop.
If the joystick is touched, you want it to reset the 5 second counter.

Ok, this uses the milli-second timer.
State 1: Speed Pass Through - When button is pressed, go to State 2 and maintain the speed setting (use a feedback node or shift register).
State 2: Have a 5 second counter in this state. If the counter expires, goto State 1. If the joystick exceeds a certain value, reset the counter.

I think that does what you want.

Milisecond timer counter:
Read the value from the millisecond timer and save it in a feedback node. Compare this to the present value of the millisecond timer. If the difference is greater than or equal to 5000, set the output to true. The reset button saves the current value of the timer to the feedback node.

Timer Embedded should do the trick I think
https://github.com/allancass/836-Lib...umatics/Common
__________________
Quote:
Originally Posted by texarkana View Post
I would not want the task of devising a system that 50,000 very smart people try to outwit.
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 13:13.

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