View Single Post
  #6   Spotlight this post!  
Unread 19-02-2013, 14:05
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: Motor in Autonomous?

The pic posted by Ben (BPtigers) had four sections with the last sections where he stops all the motors at the end (writes zeros).

To keep the shooter motors spinning in between disc you don't want to stop them until all 3 disc are shot.

So I instructed you to keep those outside of the for loop.
But you only used 3 sets of controls (which is perfectly OK) and did not use the last set after the For Loop (again no problem).

If you had done as I had suggested and wired up the thick pink Ref wire to VIs to right of the For Loop, the For Loop defaults to "Auto Indexing" and you would have gotten an Array of pink Ref. The "Motor Set Output" VI to right do not accept Arrays as input.

So you need to tell the For Loop not to Auto Index.

Try it! Put a "Motor Set Output" outside to the right of the For Loop and wire one of the pink Ref wires from inside the for loop to it. You should get a broken wire.

Then fix the broken wire by
Quote:
Right click on the Auto Indexing terminals on the right side of the For Loop where the wires are now broken and select "Tunnel Mode > Last Value
Do LabVIEW programmers everywhere a favor and vote for this ides on the LabVIEW idea Exchange
Smart autocorrecting autoindexing
__________________
Omar
Reply With Quote