LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple sensors port problem

Hello everyone,

I am a electrical engineer student and am currently working on a project using labview with the NXT toolkit.
Now, I realize that this might be a very simple question, but there is hardly ANY documentation available!


ok, my problem:
Whenever I have 2 sensors of any type in my program, and I try to change the port number by hanging a integer to the port input, the other automatically changes to the same port number!
For example, when I have a touch and a color sensor, and I set the port of the touch sensor to 2, the color sensor is automatically changed to port 2 too! This even happens when I try to change the color sensor's port number with a integer to the port input!

What am I doing wrong?? Smiley Surprised

0 Kudos
Message 1 of 9
(7,571 Views)
Could you post a picture of your diagram? I think that would help reveal the problem.
Thanks.
Joel Sumner
NI-Shanghai
0 Kudos
Message 2 of 9
(7,552 Views)
sure, here it is:


Hope this helps..

I also had another question, as seen in the image, I have trouble with the integer input that is asked on, for example, the goal type input. Where is defined what input correspondents with what setting?



0 Kudos
Message 3 of 9
(7,549 Views)
Thanks. That's helpful.

When you say "I set the port of the touch sensor to 2, the color sensor is automatically changed to port 2 too", what is it you are seeing that makes you think that is happening? Do the color sensor values change? Also, from where did you get the color sensor block? I'd like to understand which revision it is.  Did it come from the FTC demonstration competition?


Finally, to explain the goal-type input.  Please open the front panel of the motor VI by double-clicking on its icon on a block diagram. You will see that the goal type is an enumerated type with 4 values: Unlimited, time, distance, stop. The easiest way to select one of these values would be to right click on the goal-type terminal and select create->constant.  Then select which value you wish.


Joel Sumner
NI-Shanghai
0 Kudos
Message 4 of 9
(7,545 Views)
Wow! that create constant is VERY helpful =D I never knew that!
And I send a email to the guys at Hitechnic to ask if they support their custom sensors in Labview.
And the create constant function also seems to work with the port assignment, although I dont have the means to test it at this time..
Complicated question, simple answer 😃  someone should really write a decent getting started tutorial for this toolkit 🙂
thanks a lot!

0 Kudos
Message 5 of 9
(7,543 Views)


Bramgozer wrote:
...someone should really write a decent getting started tutorial for this toolkit 🙂
...

Hi Bramgozer,
do you mean for the LEGO Toolkit? Smiley Happy
 
Mike


Message Edited by MikeS81 on 05-16-2008 11:22 PM
0 Kudos
Message 6 of 9
(7,539 Views)
Thanks! I already saw the getting started tutorial, but found it to be VERY basic.. now going to read through the advanced programming guide I think.
Another small question if you dont mind; I figured out how to turn a motor for a selected amount of degrees now, but is it possible to turn it TO a certain degree?
for example: If you have a round platform divided in 6 equal parts with a motor attached, can you make the motor turn to a specific part without having to make complex calculations based on its current position?

0 Kudos
Message 7 of 9
(7,515 Views)
I agree that the Documentation for the Labview Toolkit is quite basic and not particulary targeted for getting a robot up and running.
I think if someone went along and posted a few screenshots of their labview VIs for the default NXT setups that would be very helpful. 

Smiley Happy
0 Kudos
Message 8 of 9
(7,508 Views)
I think that would help a lot indeed.. or just some basic explanation about the working of most of the NXT toolkit blocks..
But to get back on my question; What exactly does the reset motor block do? I tried to use it to reset the motors internal tachometer, but it doesnt seem to work..
0 Kudos
Message 9 of 9
(7,500 Views)