OCCRA
Go to Post If you see Navy ships in port, you're going to be fine. If you see ships pulling out, or no ships at all, go East. Fast. - Matt Howard [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Events   CD-Media   CD-Spy   FRC-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 02-13-2002, 06:40 PM
Joelster Joelster is offline
Registered User
#0758 (Roboticats)
 
Join Date: Feb 2002
Location: Blenheim
Posts: 11
Joelster is an unknown quantity at this point
Cool Arm Turning (1 button programming)

ok......i have asked several questions about the turning of the arm......slowly but surely with all of your help our control team has figured out a simple program to make the arm turn with ONE BUTTON!!!! Thanx for everyone's help and please reply here or pm me if you have any questions!!! Our team will be glad to help out. Here is the code for everyone who needs it

'-----------------------------------------
'------------- Tbar Turn -----------------
'-----------------------------------------

'--------
'-- #1 --
'--------

if logged = 1 then hopskipjump:

if count1 = 1 then skippy:
if p1_sw_top = 0 then out:
if p1_sw_top = 1 then in:
in:
relay1_fwd = 1
relay1_rev = 0
count1 = 1
goto hopskipjump:
out:
skippy:


if count1 = 0 then jumpy:
if p1_sw_top = 0 then outy:
if p1_sw_top = 1 then iny:
iny:
relay1_rev = 1
relay1_fwd = 0
count1 = 0
outy:
jumpy:

hopskipjump:
logged = p1_sw_top

Last edited by Joelster : 02-13-2002 at 06:50 PM.
  #2   Spotlight this post!  
Unread 02-13-2002, 06:53 PM
OddOne OddOne is offline
Registered User
#0990
 
Join Date: Feb 2002
Location: Las Vegas, Nevada
Posts: 12
OddOne is an unknown quantity at this point
Send a message via AIM to OddOne
That's sweet.

But why did you use outy: and jumpy:? Couldn't you use hopskipjump: instead since it goes to the same place? It would save your memory and processor from having to process those lines.

Mike
The "Odd" one
  #3   Spotlight this post!  
Unread 02-13-2002, 06:57 PM
Joelster Joelster is offline
Registered User
#0758 (Roboticats)
 
Join Date: Feb 2002
Location: Blenheim
Posts: 11
Joelster is an unknown quantity at this point
dont know

the one who programmed it decided to use those words for the heck of it
  #4   Spotlight this post!  
Unread 02-13-2002, 07:01 PM
Joelster Joelster is offline
Registered User
#0758 (Roboticats)
 
Join Date: Feb 2002
Location: Blenheim
Posts: 11
Joelster is an unknown quantity at this point
oh yah

The code works!!!! It doesnt need any editing if you just wanted to know!!!
  #5   Spotlight this post!  
Unread 02-13-2002, 08:35 PM
758controls 758controls is offline
Registered User
#0758 (Roboticats)
 
Join Date: Jan 2002
Location: Blenheim. Ontario, Canada
Posts: 1
758controls is an unknown quantity at this point
Yeah.. Now that I look at it

Now that I look at it, it is the same address.. I don't think that they were the first time I wrote it .. but now that it has been edited..

Thanks.. I'll remove those two lines from the code.

I also probably wrote it that way because I'm use to nested "if" statements so I always want to end an "if" statement. I sure wish they would get away from using PBASIC as a programming language though, me and my team all hate it.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Balance while turning? sanddrag Dean Kamen's Inventions 8 09-26-2003 04:18 PM
Reflected Inertia? archiver 2001 9 06-24-2002 02:50 AM
Controlling Arm travel - Limit Switch or Mechanical Stop? archiver 2001 8 06-23-2002 10:55 PM
Correction for arm skyfw Programming 6 04-06-2002 08:59 PM
telescoping arm & ten second rule Ben Mitchell Rules/Strategy 4 02-18-2002 08:37 PM


All times are GMT -5. The time now is 04:07 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi