Go to Post So every 3 years robots have to lift robots? There's yet another pattern to consider. :p - ruacubfan2 [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 21-01-2013, 18:52
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Scaling motor speed in LabVIEW

The attached image shows how to do it using a feedback node.

A feedback node is a very local variable that keeps the value from the last iteration. This allows execution N be based on the values of execution N-1.

Replace the button with the one you want to read, replace the 0.1 with the delta you want to add, and don't forget to connect the refnum to the joystick and motor VIs.

Ask questions if some portion of it doesn't make sense.

Greg McKaskle
Attached Thumbnails
Click image for larger version

Name:	Clipboard 1.png
Views:	57
Size:	25.3 KB
ID:	13612  
Reply With Quote
  #2   Spotlight this post!  
Unread 21-01-2013, 22:43
propionate's Avatar
propionate propionate is offline
Team co-lead and LabVIEW programmer
AKA: Stephen
FRC #1732 (Hilltopper Robotics)
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Milwaukee
Posts: 93
propionate is on a distinguished road
Re: Scaling motor speed in LabVIEW

Quote:
Originally Posted by Greg McKaskle View Post
The attached image shows how to do it using a feedback node.

Greg McKaskle
Ah, there is always an easier way!
Reply With Quote
  #3   Spotlight this post!  
Unread 23-01-2013, 14:41
Team3763 Adam Team3763 Adam is offline
Lead Programmer
FRC #3763 (4H WildCards)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2010
Location: North Carolina
Posts: 157
Team3763 Adam can only hope to improve
Re: Scaling motor speed in LabVIEW

Quote:
Originally Posted by Greg McKaskle View Post
...and don't forget to connect the refnum to the joystick and motor VIs.

Ask questions if some portion of it doesn't make sense.

Greg McKaskle
When you say this, what exactly do you mean? Sort've a noob at LabVIEW still, but I understand some of it. When you say connect the refnum to the joystick and motor VIs, do you mean connect the button portion with the current joystick running our drive motors?
Reply With Quote
  #4   Spotlight this post!  
Unread 23-01-2013, 15:00
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Scaling motor speed in LabVIEW

Quote:
don't forget to connect the refnum
One of the inputs to the Joystick and Motor blocks, the one on the top left, is called a refnum. Refnum is shorthand for Reference Number. It tells the block which joystick or motor to operate on.

The refnum is created by the Open block and can be stored and retrieved by name.

Take a look at Begin to see some being opened and saved, and Teleop to see them being retrieved and used for RobotDrive and Joystick.

Greg McKaskle
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 10:52.

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