Go to Post We are all insane aren't we? I just want to build a robot now. :P - Lowfategg [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 06-02-2010, 17:36
robotic321's Avatar
robotic321 robotic321 is offline
Registered User
FRC #1793
 
Join Date: Jan 2010
Location: Norfolk, VA
Posts: 24
robotic321 is an unknown quantity at this point
Arrow Issue with Solenoid Timing. VI Included.

Hi. I made my own SubVI to shutoff a solenoid after X amount of time, problem is, the robot stops for X amount of time. What i want to do is to set a solenoid to on/ off if its off already, but if its on, wait 0.5 secs and then shut it off for 1.5 secs. Can anyone help me achieve this without turning off the robot for X amount of time?
Attached Files
File Type: vi Check Set.vi (14.9 KB, 53 views)
Reply With Quote
  #2   Spotlight this post!  
Unread 06-02-2010, 18:39
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,557
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: Issue with Solenoid Timing. VI Included.

Your VI looks reasonable to me. How are you calling it?
Reply With Quote
  #3   Spotlight this post!  
Unread 08-02-2010, 12:11
robotic321's Avatar
robotic321 robotic321 is offline
Registered User
FRC #1793
 
Join Date: Jan 2010
Location: Norfolk, VA
Posts: 24
robotic321 is an unknown quantity at this point
Question Re: Issue with Solenoid Timing. VI Included.

Yes. Should i post the teleop vi too since it is where my VI is?
Reply With Quote
  #4   Spotlight this post!  
Unread 11-02-2010, 14:47
robotic321's Avatar
robotic321 robotic321 is offline
Registered User
FRC #1793
 
Join Date: Jan 2010
Location: Norfolk, VA
Posts: 24
robotic321 is an unknown quantity at this point
Re: Issue with Solenoid Timing. VI Included.

Bump..Please assist in this matter. 1793 will greatly aprreciate it.
__________________
=-=-=-=-=-=-=-=-=-=-=-=-=-=


1793 FTW
=-=-=-=-=-=-=-=-=-=-=-=-=-=
Reply With Quote
  #5   Spotlight this post!  
Unread 11-02-2010, 15:17
OSU_Springer OSU_Springer is offline
Diamond Power International - R&D
AKA: Bill Springer
FRC #0677 (Murphy's Outlaws)
Team Role: Engineer
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Columbus, Ohio
Posts: 10
OSU_Springer is an unknown quantity at this point
Re: Issue with Solenoid Timing. VI Included.

I'm guessing, since you have your timed sequence built within your teleop, what is happening is that your teleop VI gets to the timed sequence and executes that loop. The problem is, while the loop is executing, the system never runs another iteration until that loop is done. That being said, what you need to do is move the timed sequence outside of the teleop vi. You will have to pull information from either the periodic tasks from main.vi, or have some way to pull time data from the cRio and compare the start time of the solenoid to the current time, and based on that have the solenoid go false if the time is greater than the period you're looking for.

Hope this is helpful.
Reply With Quote
  #6   Spotlight this post!  
Unread 11-02-2010, 16:19
Ziaholic's Avatar
Ziaholic Ziaholic is offline
Elec/SW Mentor
AKA: Marc
FRC #1164 (Project NEO)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2002
Location: Las Cruces, NM
Posts: 194
Ziaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the rough
Re: Issue with Solenoid Timing. VI Included.

I'm at work and don't have access to your VI.

Does your VI have either a shift-register or a feedback node? In order to perform tasks that take longer than a standard loop-time (20 msec), you have to insert loop-to-loop memory. Typically this is done with a shift register.

When you enter the first state, you capture the current time, add an offset (your 0.5 or 1.5 seconds become 500 or 1500 msec) and store that in the shift register. Then, every time through the loop, you look at the current time, compare it to the stored/offset time, and once you exceed the timer, you exit the state and enter into the new state on the next go-round.

I posted a somewhat-related example in another thread ... (clicky) ... I have a couple diagrams in post #11 that show a 30 msec example ... and there are other posts above and below mine that also have some good advice when performing timed tasks.

G/L.
__________________
----
There are 10 types of people. Those who understand binary, and those that do not.
Team #1164 - Project NEO Robotics
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
solenoid with compressor vi ElanaC NI LabVIEW 42 29-12-2010 13:38
Solenoid Programming Issue. Dr. Manhattan Pneumatics 2 10-02-2009 17:42
Issue with Color Tracking Example (C/C++) and with Counters, Encoders, and Ultrasonic BradAMiller Programming 3 19-01-2009 21:24
Timing with the Driver Station Zorkinian Programming 6 10-01-2009 09:42
Playbook now included with Team 340 database archiver 2001 0 24-06-2002 01:33


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

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