Go to Post Don't let Dean's homework assignment enter into the equation; his homework is about spreading his organization and has nothing to do with you doing what you want to do. - jonathan lall [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 15-02-2011, 16:06
Littlemarks2 Littlemarks2 is offline
Registered User
FRC #2016
 
Join Date: Feb 2011
Location: ewing
Posts: 6
Littlemarks2 is an unknown quantity at this point
need help rookie

i need to make a code in labview for our gripper and i can figure out how when you press the button it's true and when you release it's false need help please ahahahahahahahah!
Reply With Quote
  #2   Spotlight this post!  
Unread 15-02-2011, 16:20
vhcook's Avatar
vhcook vhcook is offline
Reader of Things
AKA: Victoria
FRC #1939 (Kuh-nig-its)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Kansas City, MO
Posts: 546
vhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond repute
Re: need help rookie

First, don't panic. Secondly, can you describe in physical terms what you want to happen and where you're stuck? I'm having trouble figuring out where to start helping you.

Are you trying to get one or more motors to spin in a specific direction when you push a button and stop when you let go, or something more complicated? Are you having trouble figuring out how to read a button from the joystick in Labview?
__________________


Reply With Quote
  #3   Spotlight this post!  
Unread 15-02-2011, 16:35
Littlemarks2 Littlemarks2 is offline
Registered User
FRC #2016
 
Join Date: Feb 2011
Location: ewing
Posts: 6
Littlemarks2 is an unknown quantity at this point
Re: need help rookie

here is the vi and the motor i need it to just move one way true and the other false but it happens with like button 6
Attached Files
File Type: vi cripper.vi (9.1 KB, 8 views)

Last edited by Littlemarks2 : 15-02-2011 at 16:38.
Reply With Quote
  #4   Spotlight this post!  
Unread 16-02-2011, 01:50
vhcook's Avatar
vhcook vhcook is offline
Reader of Things
AKA: Victoria
FRC #1939 (Kuh-nig-its)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Kansas City, MO
Posts: 546
vhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond repute
Re: need help rookie

Here's what I see...

- You are opening an analog port inside the while loop, which is not generally a good idea as it's going to try to open it again every time the loop goes around.

- If your boolean is False, you are setting the motor output to 0, which is a stop.

- If the boolean is true and the voltage on the analog port is greater than 5, you are setting the motor to go forward (probably, depending on how it's wired and physically mounted) at half speed.

- If the boolean is true and the voltage on the analog port is less than 5, you are setting the motor output to 0, which is stop.

Here is some useful information for looking at this problem:

- Analog ports supply a 5V source, so I would generally expect the signal to be less than 5V all the time.

- Motor speeds have a range of -1 to 1, with 0 being stop.

Here is what I would change:
- Move the AI Open outside the while loop

- I'm not quite sure what the analog input is measuring, but you're going to want to change your logic a little so that cases that are likely to happen have a non-zero speed.

I hope this helps. If not, please some more questions and I'll try again.
__________________


Reply With Quote
  #5   Spotlight this post!  
Unread 16-02-2011, 10:33
Egg 3141592654's Avatar
Egg 3141592654 Egg 3141592654 is offline
Now a mentor, always a student
FRC #0810 (Mechanical Bulls)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Long Island
Posts: 53
Egg 3141592654 is on a distinguished road
Re: need help rookie

I believe Driver Stations automotically pull high, if so, the button reads values true until false (when pushed).

You can check this by running the code direct off of labview and probing the wires in the teleop and looking at what it reads. Do this by opening the driver station in developer, opening Main.vi in the project list and pushing the little arrow at the top left of the front pannel and running as normal. While the code is running, you can click on wires in your other vis and see the values they read.
__________________
"The answers to the book of life are not found in the back." Charlie Brown

Software Mentor - Team Apex Robotics 5803

Lead Programmer - Team 810 Mechanical Bulls '09-'11
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 09:21.

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