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!
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!
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?
Maybe you enabled a Motor Safety in Begin.vi for each of these and you shouldn’t have?
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!
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
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.
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.
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.
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.
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?
Yes, it’s case sensitive.
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!