FIRST Tech Challenge Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview: Multiple Controllers Specified Error

Solved!
Go to solution

Complete newbie to labview programming environment.  The robot functions nicely when using the game controller.  We've trying to code the autonomous mode of the challenge.  We've got the robot driving around controlling the 2 wheel motors.  All is good.  However, now we want to be able to control a 3rd motor in autonomous mode.  When we add the 3rd motor we are getting the error "Motors:  Multiple Controllers Specified".  How can we control motors from more than 1 controller in the autonomous mode?

Any help would be appreciated.

Thanks!

program.JPGerror.JPG

schmatic.JPG

0 Kudos
Message 1 of 7
(4,802 Views)
Solution
Accepted by jwalberg67

Your Schematic Editor is fine.

This is what we have found works. In your autonomy vi: add an additional instance of the DC Motor block for your third motor. You can wire the same power to it, but each DC Motor instance can only handles 2 motors, and they need to be the ones on the same Motor Controller. (So your Motor 1 & 2 can be on one DC Motor block, and Motor 3 & 4 on another. The same error will occur if you try to put Motor 1 & 3 on the same DC Motor block. Try it.)

I've attached 4 screen shots that tell the story - number 4 shows hypothetical code (Time blocks are place holders) - There may be other ways to do this.

Also, try keeping ctl-H on when you explore your code, 'it really HELPS'   I always have the kids make lots of experimental 'generated code', and self-teach with ctl-H as they explore the RC case structures. It really improves their autonomy skills in fun dynamic way.

Hope THIS helps! Don't be afraid to ask if you need more...

0 Kudos
Message 2 of 7
(3,663 Views)

Thanks Mathterizer.  However, if I do that how can I control the 3rd motor in parallel with the other 2?

Example, drive forward (2 wheel motors).  Raise Arm (3rd motor)  Then Back-up (2 wheel motors)

Thanks.

0 Kudos
Message 3 of 7
(3,663 Views)

See attachment 4 that I just added to my answer

Of course you can wire unique power values to each motor.

If you want to run each motor for different time periods, then each motor would need it's own TIME block and DC Motor Block. The pink stranding is what controls the 'linear' aspect for the NXT (I compare it to the 'LEGO beam' that linked the NXT-G blocks together when the kids programmed in FLL days.)

0 Kudos
Message 4 of 7
(3,663 Views)

jwalberg67:

I noticed an error in your first screen shot of the OP. Your autonomy code will not run unless you link that 'pink block' in the top Flat Sequence Structure (FSS) to the first block you would like to have execute. (See how it's done in the bottom FSS that shuts things down.)

I have a screen shot that I worked up for you, but no longer have the 'attach file' option for my post   UPDATE: upon 'edit' I was able to attach the file for you The ? is there since I can't see all your code, but it appears to be the place you will wire it.

Feel free to email me directly if you would like. The forum is clumsy for sharing screen shots and sometimes slow (delayed). I will issue a friend request. We can always post final results back to the forum for community viewing.

Happy coding..

0 Kudos
Message 5 of 7
(3,663 Views)

Thanks Mathterizer!!!!

That all worked.  Really appreciate your prompt and comprehensive replies.

Message 6 of 7
(3,663 Views)

jwalerg67:

My pleasure! Thanks for the kind words.

I like providing visuals whenever possible, the kids respond so much better to them. After all, that's why we use LabVIEW in the first place.

0 Kudos
Message 7 of 7
(3,663 Views)