Go to Post This is an Internet forum- if you want to relax, sit next to a pool and sun bathe. However, the rest of us will have a mature discussions and debates on the CD forums. - MikeDubreuil [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-03-2012, 15:17
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,112
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: How to make sequence happen ONCE, Period!

Your limit switch code looks like it will do what you want, but without having the live VI to look at closely I'm not going to guarantee anything.

You're doing a lot of stuff with case structures that I think can be implemented more simply using other tools. For example, I typically suggest using "select" nodes and "in range and coerce" functions for limit switches. This isn't the time or place to be making major changes to your code, though.
Reply With Quote
  #2   Spotlight this post!  
Unread 09-03-2012, 07:24
JChavis's Avatar
JChavis JChavis is offline
Team 3490's "Pro./Electrician"
FRC #3490 (Vyper Drive)
Team Role: Leadership
 
Join Date: Jan 2012
Rookie Year: 2007
Location: Summerville, SC
Posts: 52
JChavis is an unknown quantity at this point
Thumbs up Re: How to make sequence happen ONCE, Period!

Quote:
Originally Posted by Alan Anderson View Post
Your limit switch code looks like it will do what you want, but without having the live VI to look at closely I'm not going to guarantee anything.
I don't know if this will help greatly, but with what you said, I will provide you the teleop VI.

Oh, and sorry about those arrows I placed, I just looked at them and noticed that they both touch a text box to the same case structure.

When you look at the diagram, just know that I placed the text boxes right next to the corresponding case structure.

Thanks David for that complement, I learned how to place a description of what "should" be going on in the code when I worked with MultiSim and Xilinx in my Digital Electronics class. That way, anyone who looks at the code can see (and hopefully understand) what that part does and what physically goes on.

Oh, and about the resulting "spaghetti code," I am not in any worry about what leads to where, for I made the program one section at a time and organized it as I went along...again something I learned from DE when I worked with programmable breadboards...
Attached Files
File Type: vi Teleop.vi (52.0 KB, 2 views)
__________________
Hmmm....I wonder if I can create a robot lawnmower with the knowledge I have gained from FRC.....
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 19:46.

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