LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

NXT Output Node vs

We're trying to create our own Move block.  We hope to improve upon it, but first, we have to try to recreate what NI already did.  I'll apologize in advance for what are probably some dumb questions.
 
What is the advantage of using the Template Output Block and the associated NXT OutputMulti Refnum, rather than simply inserting a Sync Distance from the NXT Output Library?
 
Assuming there is an advantage to using the NXT OutputMulti Refnum, should we duplicate the port semaphore sub vi'sfor the second output port?  We noticed that Steve Hassenplug didn't do this in his Line Follower Block, but we don't understand why.
 
In the Template Output Block, the Motor port of the Motor Release vi is wired to the output Port of the NXT Output node.  If we substitute a NXT OutputMulti node, it needs an array for the Port input.  Therefore, we can't wire this back to the Motor Release vi.  How do we connect the Motor port of the Motor Release vi?
 
We want to be able to have the power increase in five percent increments.  We replaced the power slider in the configuration vi with a NXT Numeric control.  We then changed the Data Range to Minimum = 0, Maximum = 100, Increment = 5 and Ignore Out of range action for the Increment.  The first time we click on one of the arrows, the power changes by five.  However, after that, it only changes by one.  What do we need to do so it increments and decrements by five each time one of the arrows are clicked?
 
We would like to change the default ports for the right and left motors (Left = B and Right = C, which is the simplist physical connection assuming the NXT brick is facing forward).  We don't care about being able to change these values, so we created two U8 constants, wired them to a Build Array and wired this into the Port of the NXT MultiOutput node in the sub vi.  We then deleted the port control in the configuration vi (although we can't figure out how to delete the gray area where it used to be).  When we do this and then try to import the block into NXT-G, it is grayed out and can't be imported.  How do we go about deleting the control properly?  We didn't delete the case "Output Port": Value Change.  Is that part of our problem?
 
Finally (for now), is there any easy way to undo changes after we have saved the vi's?  Sometimes, we don't realize we screwed something up (like my last question) until we try to import the block into NXT-G.  At that point, it is hard to undo the changes.
 
Thanks for your patience.
0 Kudos
Message 1 of 2
(6,688 Views)
The Eagle...,
 
Hopefully I can share something that will be of use for you.  As far as the question concerning the advantage(s) of using the lower-level output blocks as opposed to using a Sync Distance type of function, anything that is at a lower level will be capable of executing faster and with less overhead than a high-level VI.  The Sync Distance will show range-checking, but they aren't able to run as quickly as low-level functions.
 
Regarding the Motor Release functions, I'd refer to the guts of the move blocks provided in the functions palette.  Most of what it sounds like you're looking to do is done within the currently-built motor and move VIs.
 
Best,
 
Pete
Peter L.
Applications Engineer
National Instruments
www.ni.com/support/
0 Kudos
Message 2 of 2
(6,614 Views)