Go to Post Design is iterative, right? - 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 25-01-2012, 20:54
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
Setting motor output based on gyro angle

Hello -

Here's the logic behind what I want to do. Note that all of this code is within a while loop inside Periodic Tasks.vi. I want to use the rangefinder and gyro to help one of the drivers shoot.

I want to get the distance from the rangefinder, and if it falls between a certain range, make a case structure true. Within this structure, I can then press button 1 on a joystick to make the next case structure true. Within this next case structure, I'm getting the Gyro angle and seeing if it falls within a range of angles. If it's false, I want to set the motor output of a motor to 0.25 until the angle falls within a range of angles. Download the VI to see what I've drafted.

Do you think this will do what I want it to do?

Thanks.

Last edited by DominickC : 25-01-2012 at 21:12.
Reply With Quote
  #2   Spotlight this post!  
Unread 25-01-2012, 21:11
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
Re: Setting motor output based on gyro angle

New attempt. I think this one is cleaner and is easier to read. See attached VI.
Attached Files
File Type: vi Test.vi (13.3 KB, 16 views)
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 22: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