Go to Post Are you confused yet? - Andy Grady [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 02-02-2012, 20:39
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
Help debug automated shooting code?

Hello -

I've got this code which helps the drivers in aiming and shooting our "cannon". I'm using two sensors - the Rangefinder and Potentiometer (to measure the angle of our "cannon).

Basically, I want to evaluate the distance from the wall. If it falls within the range I want, a press of the trigger on a joystick will initiate the firing code. It'll evaluate the barrel angle, and adjust depending if it's too high or low. Then, it waits 100ms and fires the shooter motor for 500ms at full output.

I had this working just a few days ago, now it doesn't. When I run it normally, I'll have the potentiometer at an angle outside what it is looking for, to test the adjustment code. If the angle is too low, our Jag flashes green, denoting that we are supplying it a positive value less than 1. Once the potentiometer reaches the angle it wants, the shooter motors fail to fire. If the potentiometer is set to an angle below what it's looking for, our Jag flashes red, but it appears as if something is interfering with it. The orange/yellow Idle light cuts in and out. Then, the shooter motors fail to fire.

When I use the Show Execution feature in LV, I can easily follow the execution. It works flawlessly.

Any help? I've attatched a copy of the VI. Please note that all values are purely for testing.

Thanks.
Attached Files
File Type: vi debug.vi (30.0 KB, 19 views)

Last edited by DominickC : 02-02-2012 at 20:45.
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


All times are GMT -5. The time now is 11: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