Go to Post There MUST BE room for mistakes. That’s one of the best ways to learn. - Ken Leung [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Spotlight this post!  
Unread 05-02-2009, 02:11
DarKCroNo's Avatar
DarKCroNo DarKCroNo is offline
Registered User
FRC #2670
 
Join Date: Dec 2007
Location: Toronto
Posts: 37
DarKCroNo is an unknown quantity at this point
Re: Limit Switchers Logic Problem

Your problem is that your not toggling your buttons, we had this problem too in labview. If you look at the wiring, u said that if button 1 is true than such happens (set motor speed) but that action is within the case box, and it only executes if and only when button 1 is true. The only time button 1 is constantly true is if ur holding the button. Try holding ur buttons and see if the motors are moving the way u'd like.
Now if that doesn't work, i don't know if its also the values ur inputting to the motors which are affecting it but... when I was programming it i didn't realize u cud put values -1 -> 1 to indicate full speed rev and full speed forward, and so i used 127 and -127 and i'm not sure if that makes a difference. Because I tried 127 first i don't know if thats the default pwm values for the program to read.

Now about the limit switching, I have just finished a program where for our robot, a gate will be drawn up and down to let balls roll out of our basket. We used limit switches to trigger the stoppingmotion of the gate. I wouldn't mind giving it to u if you want but the problem is I don't understand it much to explain. I spent a whole night doing it and got it working through debugging, but if you were to ask me how each block works i would have no clue haha...
Oh and I can give you a toggling vi as well if you'd like.

If this gives you too much trouble there is another thing you can do which makes it a whole lot simpler. Since your motion is rotating you can use a potentiometer and use a PID control loop to control how it spins... but i guess if you constantly want to spin left u can't since theres a max and min value for a pot. You can also try an encoder, I dunno much so just suggesting.

Last edited by DarKCroNo : 05-02-2009 at 02:16.
 


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
Fuzzy Logic? skidmarks NI LabVIEW 1 25-01-2009 09:36
Limit Switch Problem Boydean Programming 3 13-02-2008 16:32
Using a limit switch to limit motion ManicMechanic Programming 16 20-12-2007 00:54
Logic Question aubinhick990 Website Design/Showcase 2 11-03-2006 16:45
Why I hate Logic EnderofDragon Chit-Chat 2 19-02-2002 21:02


All times are GMT -5. The time now is 01:23.

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