Error with Motor refnum

Hi, I need some help with a Labview error code.
Here it is: ERROR <Code> -44007 occurred at WPI_MotorControlRefNum Registry Get.vi>>Periodic Tasks.vi>>Robot Main.vi
<time>13:37:37 02/12/2011
FRC: The RefNum you are trying to Get does not exist in this RefNum Registry.

I checked and all my refnum names are correct when I set them and get them.

This error means that you are trying to Get something that has not been opened.

This could mean that your open code failed to run. If you have other errors in Begin and you chain the errors together, a subVI that is sent an input error typically skips.

This could mean that your Open code works, but the Motor is being Closed before the Get.

This could mean that there is a race condition and the Get is called before the Open.

Of course this often means that the names are different. You may want to copy the Open name and paste it in the Get.

Greg McKaskle

Yesterday I found someone who mixed incompatible open and sets that generated this error.

They used Open 2 Motor, then tried Motor Set Output.
Even though the name matches it wasn’t the same thing.

You should check your ‘periodic’ loop also, it refers to the Joystick 1 and Drive Motors by their default name. Change to whatever your using or get rid of them if not required.

I rechecked the code and noticed I had deleted the error cluster in Begin.vi. So I think the periodic tasks in Main.vi was not waiting to run until Begin.vi finished and the motors I was referencing weren’t set yet. I fixed this and I’ll see tomorrow if it works out. Thanks for the help.