Go to Post 4 is kind of like 5 - Jaine Perotti [more]
Home
Go Back   Chief Delphi > Technical > National Instruments LabVIEW and Data Acquisition
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
  #5   Spotlight this post!  
Unread 24-01-2009, 20:25
Joshamuffin Joshamuffin is offline
Programmer
FRC #1723 (FBI)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Missouri
Posts: 24
Joshamuffin will become famous soon enough
Send a message via MSN to Joshamuffin
Re: Splitting RobotDriveDevRef into separate motor references.

I got it to work finally. I was having trouble with something else, also. Once I fixed the program, I ran out of the school with a chair above my head and shook it at passing cars for a couple minutes without a coat. I eventually went back in, frozen. It was something that shouldn't have made a difference. I was combining the values into a tank drive statement with the original Drive Reference connected. I went through at least 5 different methods of increasing complexity to get the motors to transition towards what the joystick was telling it to do. I eventually came up with a way that was far simpler than my first. It was unquestionably logically sound. I still couldn't get it to work. I decided it was LabVIEW's fault. I started messing around with other statements to make sure it was fine. It should have been. I eventually, in a fit of desperation, deleted the Tank Drive and replaced it with two Motor/Set-Speed's. It worked. The Tank Drive should have done the same thing.

Also, here is what I did in the C++ equivalent. I actually write it in C++ before I do it in LabVIEW because I pretty much think in C(++). Note that the variables are not copy/pasteable.

Code:
speedMax = speed + maxChange;
speedMin = speed - maxChange;

if(command > speedMax)
{
	motor = speedMax;
}
else
{
	if(command < speedMin)
	{
		motor = speedMin;
	}
	else
	{
		motor = command;
	}
}
Reply With Quote
 


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
Pointers/References? htwiz2002 Programming 7 29-01-2007 22:21
Separate Processor & Robot Rules JoeXIII'007 Control System 7 20-01-2006 19:59
Fisher Price Motor Into Drill Gearbox Chris Technical Discussion 11 21-04-2004 09:09
Please help asap.. Where do the victor motor 3 pin wires plug into 1166 Electrical 10 16-02-2004 12:07


All times are GMT -5. The time now is 03:39.

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