|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 : 13-02-2002 at 19:50. |
|
#2
|
|||
|
|||
|
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
|
|||
|
|||
|
dont know
the one who programmed it decided to use those words for the heck of it
|
|
#4
|
|||
|
|||
|
oh yah
The code works!!!! It doesnt need any editing if you just wanted to know!!!
|
|
#5
|
|||
|
|||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Balance while turning? | sanddrag | Dean Kamen's Inventions | 8 | 26-09-2003 17:18 |
| Reflected Inertia? | archiver | 2001 | 9 | 24-06-2002 03:50 |
| Controlling Arm travel - Limit Switch or Mechanical Stop? | archiver | 2001 | 8 | 23-06-2002 23:55 |
| Correction for arm | skyfw | Programming | 6 | 06-04-2002 21:59 |
| telescoping arm & ten second rule | Ben Mitchell | Rules/Strategy | 4 | 18-02-2002 21:37 |