Go to Post We also had a couple of student leaders emerge from this offseason Rumble, which can do nothing but help the team in the upcoming FRC season. - JesseK [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 07-02-2010, 23:16
zip100 zip100 is offline
Registered User
FRC #0640
 
Join Date: Feb 2010
Location: New York
Posts: 31
zip100 is an unknown quantity at this point
check code

I just want you guys to review a code that a teammate wrote. He told me to write that added to the code is allowing the motor to spin at half speed if button 1 is pressed.
Reply With Quote
  #2   Spotlight this post!  
Unread 07-02-2010, 23:45
Vikesrock's Avatar
Vikesrock Vikesrock is offline
Team 2175 Founder
AKA: Kevin O'Connor
no team
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 2007
Location: Manchester, NH
Posts: 3,305
Vikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond repute
Send a message via AIM to Vikesrock Send a message via MSN to Vikesrock Send a message via Yahoo to Vikesrock
Re: check code

This code currently does not do anything different when the button is pressed. You want the motor to run at half speed or half the speed that the joystick commands when the button is pressed? The following assumes that you wanted the first option.

The 0.5 constant in the case statement is not connected to anything.

For the false case of each case block the joystick axis value should pass through the case block.

For the true case the 0.5 constant should be wired to the small orange block on the right edge of the case that will appear when you wire the joystick value through the false case.
__________________


2007 Wisconsin Regional Highest Rookie Seed & Regional Finalists (Thanks 930 & 2039)
2008 MN Regional Semifinalists (Thanks 2472 & 1756)
2009 Northstar Regional Semifinalists (Thanks 171 & 525)
Reply With Quote
  #3   Spotlight this post!  
Unread 07-02-2010, 23:50
zip100 zip100 is offline
Registered User
FRC #0640
 
Join Date: Feb 2010
Location: New York
Posts: 31
zip100 is an unknown quantity at this point
Re: check code

edited to what I think you said.

Last edited by zip100 : 08-02-2010 at 00:00.
Reply With Quote
  #4   Spotlight this post!  
Unread 07-02-2010, 23:57
Vikesrock's Avatar
Vikesrock Vikesrock is offline
Team 2175 Founder
AKA: Kevin O'Connor
no team
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 2007
Location: Manchester, NH
Posts: 3,305
Vikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond repute
Send a message via AIM to Vikesrock Send a message via MSN to Vikesrock Send a message via Yahoo to Vikesrock
Re: check code

Quote:
Originally Posted by zip100 View Post
joystick axis value meaning ? the axis (y)
Correct, the orange wire coming out of each block that says "axis 2(y)" should pass through the false case instead of over the case block.
__________________


2007 Wisconsin Regional Highest Rookie Seed & Regional Finalists (Thanks 930 & 2039)
2008 MN Regional Semifinalists (Thanks 2472 & 1756)
2009 Northstar Regional Semifinalists (Thanks 171 & 525)
Reply With Quote
  #5   Spotlight this post!  
Unread 08-02-2010, 00:04
zip100 zip100 is offline
Registered User
FRC #0640
 
Join Date: Feb 2010
Location: New York
Posts: 31
zip100 is an unknown quantity at this point
Re: check code

after going through the case block, does it go to the tank drive vi

Last edited by zip100 : 08-02-2010 at 00:09.
Reply With Quote
  #6   Spotlight this post!  
Unread 08-02-2010, 00:07
Vikesrock's Avatar
Vikesrock Vikesrock is offline
Team 2175 Founder
AKA: Kevin O'Connor
no team
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 2007
Location: Manchester, NH
Posts: 3,305
Vikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond repute
Send a message via AIM to Vikesrock Send a message via MSN to Vikesrock Send a message via Yahoo to Vikesrock
Re: check code

Oops, looks like a forgot to ask something on my first pass.

Do you want both motors to run at 1/2 speed by pushing one trigger (button 1)?

Or do you want each side to run at 1/2 speed when the trigger is pressed on that sides joystick?

The second one is what the code currently does. So ,for example, if the left trigger is pressed the left side will run at a constant .5 and the right side will still run according to the joystick. If both triggers are pressed, both sides will run at constant speed.

Is that what you wanted?
__________________


2007 Wisconsin Regional Highest Rookie Seed & Regional Finalists (Thanks 930 & 2039)
2008 MN Regional Semifinalists (Thanks 2472 & 1756)
2009 Northstar Regional Semifinalists (Thanks 171 & 525)
Reply With Quote
  #7   Spotlight this post!  
Unread 08-02-2010, 00:13
zip100 zip100 is offline
Registered User
FRC #0640
 
Join Date: Feb 2010
Location: New York
Posts: 31
zip100 is an unknown quantity at this point
Re: check code

wanted to both joysticks pressed for half speed. So does the second pic look okay.
Reply With Quote
  #8   Spotlight this post!  
Unread 08-02-2010, 00:18
Vikesrock's Avatar
Vikesrock Vikesrock is offline
Team 2175 Founder
AKA: Kevin O'Connor
no team
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 2007
Location: Manchester, NH
Posts: 3,305
Vikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond repute
Send a message via AIM to Vikesrock Send a message via MSN to Vikesrock Send a message via Yahoo to Vikesrock
Re: check code

Quote:
Originally Posted by zip100 View Post
wanted to both joysticks pressed for half speed. So does the second pic look okay.
Yes, if you want each joystick and button #1 to control each side separately I believe the fixed code is correct.
__________________


2007 Wisconsin Regional Highest Rookie Seed & Regional Finalists (Thanks 930 & 2039)
2008 MN Regional Semifinalists (Thanks 2472 & 1756)
2009 Northstar Regional Semifinalists (Thanks 171 & 525)
Reply With Quote
  #9   Spotlight this post!  
Unread 08-02-2010, 00:44
zip100 zip100 is offline
Registered User
FRC #0640
 
Join Date: Feb 2010
Location: New York
Posts: 31
zip100 is an unknown quantity at this point
Re: check code

so i do not have to put in axis (y) in the true, only in the false. Also only one end is go9ng to the case structure of the constant. Does that look okay.
Reply With Quote
  #10   Spotlight this post!  
Unread 08-02-2010, 00:46
Vikesrock's Avatar
Vikesrock Vikesrock is offline
Team 2175 Founder
AKA: Kevin O'Connor
no team
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 2007
Location: Manchester, NH
Posts: 3,305
Vikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond repute
Send a message via AIM to Vikesrock Send a message via MSN to Vikesrock Send a message via Yahoo to Vikesrock
Re: check code

Correct, when the button is pressed (true case) you want the motor to run at a constant speed so you do not need the joystick value.

The constant originates in the case so it only goes out, no need for anything to come in.
__________________


2007 Wisconsin Regional Highest Rookie Seed & Regional Finalists (Thanks 930 & 2039)
2008 MN Regional Semifinalists (Thanks 2472 & 1756)
2009 Northstar Regional Semifinalists (Thanks 171 & 525)
Reply With Quote
  #11   Spotlight this post!  
Unread 08-02-2010, 00:49
zip100 zip100 is offline
Registered User
FRC #0640
 
Join Date: Feb 2010
Location: New York
Posts: 31
zip100 is an unknown quantity at this point
Re: check code

Thank you for the help, will test out tomorrow and reply on how it went.
Reply With Quote
  #12   Spotlight this post!  
Unread 08-02-2010, 00:53
Vikesrock's Avatar
Vikesrock Vikesrock is offline
Team 2175 Founder
AKA: Kevin O'Connor
no team
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 2007
Location: Manchester, NH
Posts: 3,305
Vikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond repute
Send a message via AIM to Vikesrock Send a message via MSN to Vikesrock Send a message via Yahoo to Vikesrock
Re: check code

If you need additional assistance and would like something more real-time, you can use the AIM, MSN, or Yahoo Messenger info in my profile or contact me on Gtalk (My gmail address is the same as my username here).

I'm not sure if I'm heading out to our shop tomorrow or not, so I may or may not be available by the above methods tomorrow afternoon/evening.
__________________


2007 Wisconsin Regional Highest Rookie Seed & Regional Finalists (Thanks 930 & 2039)
2008 MN Regional Semifinalists (Thanks 2472 & 1756)
2009 Northstar Regional Semifinalists (Thanks 171 & 525)
Reply With Quote
  #13   Spotlight this post!  
Unread 08-02-2010, 20:53
zip100 zip100 is offline
Registered User
FRC #0640
 
Join Date: Feb 2010
Location: New York
Posts: 31
zip100 is an unknown quantity at this point
Re: check code

I tried the revised code but it shows error on build process of a broken vi.
Can I get a second opinion? Also the Ethernet cable going from the classmate will not click into the Ethernet port of the classmate it just falls out. Anyone else having these problems
Reply With Quote
  #14   Spotlight this post!  
Unread 08-02-2010, 22:05
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 7,011
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: check code

The first problem, I can't help with.

The ethernet port: If another cable also doesn't click, look carefully at the classmate's connector, make sure it's not broken. If another cable clicks & locks, then it was the cable end.
__________________

I am N2IRZ - What's your callsign?
Reply With Quote
  #15   Spotlight this post!  
Unread 08-02-2010, 22:57
Vikesrock's Avatar
Vikesrock Vikesrock is offline
Team 2175 Founder
AKA: Kevin O'Connor
no team
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 2007
Location: Manchester, NH
Posts: 3,305
Vikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond repute
Send a message via AIM to Vikesrock Send a message via MSN to Vikesrock Send a message via Yahoo to Vikesrock
Re: check code

Quote:
Originally Posted by zip100 View Post
I tried the revised code but it shows error on build process of a broken vi.
Could be the floating multiply block on the left side of the picture.

You can click the broken grey arrow at the top of the block diagram and it will pull up a list of errors. Double clicking on an error in the list will highlight the offending VI.
__________________


2007 Wisconsin Regional Highest Rookie Seed & Regional Finalists (Thanks 930 & 2039)
2008 MN Regional Semifinalists (Thanks 2472 & 1756)
2009 Northstar Regional Semifinalists (Thanks 171 & 525)
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
Code Declaration Window - Check Team in Code DtD C/C++ 3 20-01-2009 07:09
May I get a steering wheel and pedal code check? windell747 Programming 1 11-02-2008 08:43
Site Check Sunny Thaper Chit-Chat 8 01-05-2002 19:03
Please CHECK IN !!!! RebAl General Forum 0 22-04-2002 17:21


All times are GMT -5. The time now is 22:37.

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