Go to Post If you never takes steps to solve problems you cannot just complain that they exist. - Wayne C. [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 17-02-2010, 09:11
johncap100 johncap100 is offline
Registered User
FTC #0658
 
Join Date: Aug 2009
Location: Capital High School
Posts: 95
johncap100 is an unknown quantity at this point
Re: sample code to move robot autonomously

Hey Luke i found out the problem i used Soleniod to call the solenoid in teleop but had used a small "s" in the autonpmous code .........gosh one littel letter makes a huge difference, maybe labview needs to have a watch dog for goofy programmers
thanks john for now i think i have it,
one more thing i believe should be able to add case structures as i want to add a few more moves in autonomous right????

thanks again John
Reply With Quote
  #2   Spotlight this post!  
Unread 17-02-2010, 09:26
Luke Pike's Avatar
Luke Pike Luke Pike is offline
Programmer
FRC #1501 (THRUST)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Huntington
Posts: 114
Luke Pike is a name known to allLuke Pike is a name known to allLuke Pike is a name known to allLuke Pike is a name known to allLuke Pike is a name known to allLuke Pike is a name known to all
Re: sample code to move robot autonomously

Yeah, gotta be careful with that reference registry.

Yep, all you need to do is add states (items) to your enum and add cases in the case structure to handle them. Just make sure to add a condition to move to the new state.

Also, check out FRCmastery (lvmastery.com too), they have a state machine video tutorial over there.
__________________
Twitter Profile

Last edited by Luke Pike : 17-02-2010 at 15:54. Reason: Added links
Reply With Quote
  #3   Spotlight this post!  
Unread 18-02-2010, 08:03
johncap100 johncap100 is offline
Registered User
FTC #0658
 
Join Date: Aug 2009
Location: Capital High School
Posts: 95
johncap100 is an unknown quantity at this point
Re: sample code to move robot autonomously

HI me again
In a step back we changed the enum into a type def, when that happens if you right click on the enum there is no way that i can see to add more states, an edit itme never shows up, i did go to properties and there an edit item there but it does not allow changes, i can go back and start from the beginning but add a number of states and then go thru and add all the case states, but it seems to me there must be an easier way, also if I do change the enum to a constant if i were to add any states then the pull down menu at the top of the case loop changes and does not reflect what is in the enum??
thanks again for your help, i do think i am getting way closer to what i want to do.
thanks John
Reply With Quote
  #4   Spotlight this post!  
Unread 18-02-2010, 09:03
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: sample code to move robot autonomously

If your enum is now a typedef, then when you want to add items, you need to open the typedef and perform the edits there.

Right-click the enum, open typedef. Right-click THAT enum and you'll be able to modify its properties. When you save/close that typedef, it'll update every instance for you.
__________________
----
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
sample code johncap100 NI LabVIEW 2 01-02-2010 08:18
Missing sample code ajdecker1022 Java 3 28-01-2010 19:39
Sample Code Belly Programming 1 21-01-2010 14:34
Sample Code Japper Programming 2 01-12-2008 22:36
Sample PID code??? EHaskins Programming 14 08-08-2006 14:18


All times are GMT -5. The time now is 15:48.

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