Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Why is my autonomous code still not working? (http://www.chiefdelphi.com/forums/showthread.php?t=114651)

eruiz22 04-03-2013 18:27

Why is my autonomous code still not working?
 
1 Attachment(s)
I posted about this code already.
I fixed it, yet our robot doesn't do anything when we enable autonomous. Teleop is working fine.

Is there still something wrong with the program?

:eek:

Thanks!

Alan Anderson 04-03-2013 22:53

Re: Why is my autonomous code still not working?
 
The robot doesn't do anything? It doesn't even "twitch" the motors slightly when you enable Autonomous, or ten seconds later?

Are there any messages showing on the Driver Station diagnostic display that might point to a cause?

Mark McLeod 04-03-2013 23:00

Re: Why is my autonomous code still not working?
 
Maybe you enabled a Motor Safety in Begin.vi for each of these and you shouldn't have?

eruiz22 05-03-2013 13:52

Re: Why is my autonomous code still not working?
 
2 Attachment(s)
When I enable autonomous, the motors do not flash. They stay a solid orange.

I noticed that it says "autonomous disabled" under the Robot Global Data VI. Does that make a difference?

P.S I attached the errors that are shown on the Driver Station.


Thanks!

Mark McLeod 05-03-2013 14:41

Re: Why is my autonomous code still not working?
 
A solid orange status on the motor controller would mean that the code successfully opened the device.

The code error listed on your Driver Station probably means the name you are using for your Get in Autonomous Independent.vi does not match EXACTLY the name you Opened in Begin.vi.
I suggest that you
  1. Highlight then name box in Begin.vi
  2. Cntl-C to copy the name box
  3. Go to Autonomous Independent.vi
  4. Cntl-V to paste the name box
  5. Delete the previous name box
  6. wire in the name box you copied from Begin.vi
Quote:

Error -44007 occurred at an unidentified location
Possible reason(s):
FRC: The RefNum you are trying to Get does not exist in this RefNum Registry.

In the future, instead of taking a snapshot of the Driver Station Diagnostic window, it would be more complete if you highlighted all the errors in the Diagnostic window and cut/paste them into WordPad. The screen shot only got the top of the error and the scroll bar shows that there are a lot more messages that you haven't looked at.

Joe Ross 05-03-2013 14:55

Re: Why is my autonomous code still not working?
 
Here's two other issues you should resolve before your regional:

Your Driver Station Software is out of date, see R90. You can download the update here: http://joule.ni.com/nidu/cds/view/p/id/2263
The battery voltage needs to be displayed on the Driver Station. See R71 for how to set up the hardware to do that.

team2830prgrmr 17-03-2013 17:41

Re: Why is my autonomous code still not working?
 
The main reason is because those are "wait" functions, so instead of running the code for 10 seconds, its running it once, then moving on. What you want to do is remove the sequence structure, and put each "command" in its own for loop. Set a time delay for about 1ms, and set it to iterate 10000 times. You also want to check that that the refnums are the same as they are in the Begin.vi, down to captitalized/uncapitalized, and spacing. I don't know what to tell you about the autonomous disabled part, I know for a fact its supposed to default to disable in the Begin.vi, but if the framework got messed up somewhere else I couldn't be quite sure what to tell you.

Alan Anderson 17-03-2013 21:15

Re: Why is my autonomous code still not working?
 
Quote:

Originally Posted by team2830prgrmr (Post 1249206)
The main reason is because those are "wait" functions, so instead of running the code for 10 seconds, its running it once, then moving on...

There's absolutely nothing wrong with the flat sequence structure being used this way. The use of wait functions in sequential frames of a flat sequence isn't likely to be "the main reason" for the problem. Given the -44007 error, it probably is a spelling mismatch in the refnum names, as Mark suggests.

eruiz22 18-03-2013 14:04

Re: Why is my autonomous code still not working?
 
Thanks :)

I checked the name that I used in the begin.vi and I noticed that I wrote "SWING" and in the autonomous independent.vi I wrote "swing"

I have yet to deploy the code, so I was wondering if the capitalization made the difference?

Joe Ross 18-03-2013 14:33

Re: Why is my autonomous code still not working?
 
Quote:

Originally Posted by eruiz22 (Post 1249709)
I have yet to deploy the code, so I was wondering if the capitalization made the difference?

Yes, it's case sensitive.

eruiz22 19-03-2013 02:49

Re: Why is my autonomous code still not working?
 
That was the problem all along!
The name I was using for my Get in Autonomous Independent.vi did not match the name I Opened in Begin.vi.

Thank you all very much! :D


All times are GMT -5. The time now is 12:07.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi