LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I turn off ultrasonic sensor or the ports?

Hi every one,

 

I'm a new user for Labview NXTToolkit.

Before this I just had used Robolab...

The question is:

If I use two ultrasonic sensors

in one NXT brick at the same time,

can I shut down one of them, or just

turn off the port?

They used to measure different direction,

but can't turn on at the same time.

How can I solve this problem?

Anyone would like to show me some hints,

Thanks a lot.

 

Billy

 

 

 

0 Kudos
Message 1 of 5
(6,991 Views)
No, I don't think that you can turn off the sensors or the ports. Just don't use them when you don't want to.
0 Kudos
Message 2 of 5
(6,909 Views)

LabViewEnthusiast wrote: Just don't use them when you don't want to.

It isn't that easy.  With most of the sensors, you can just skip reading the current value when you don't care about it.  But I think the ultrasonic sensors are always sending out pulses, so even if you aren't reading values from ultrasonic sensor 1, its pulses are still interfering with the readings from ultrasonic sensor 2.

 

Billy, have you considered using just one ultrasonic sensor and placing it on a turntable that you can pivot when you want to read data from a different direction?

------
James Blair
NI R&D
0 Kudos
Message 3 of 5
(6,900 Views)

Hello,

 

Thanks a lot to LabViewEnthusiast and James B.

I agree that all of your opinions here.

 

I tried to use these ultrasonic sensors to track distances from

different way in a very high frequency intervals (eg s3, s4 by loops and forks).

But they influenced each other when something very close to them!

Turntable is a good method but it's in a slow motion.

So I try to find a way to solve this problem, anyway thanks to everyone!

Hopefully Lego, NI and Robolab can update something to do this smoothly. 

 

Billy

0 Kudos
Message 4 of 5
(6,875 Views)

Note that this is a hardware limitation, not a software limitation.  To solve this problem, each ultrasonic sensor would have to emit a uniquely encoded signal and discard any signals it read that were not of its own encoding.  Personally, I don't know all the technical details of how the ultrasonic sensor works, so I'm not even sure if encoding the signals is feasible (or cost-effective).  Even if it were, I imagine only new ultrasonic sensors would do the encoding -- there probably wouldn't be a way to update all of your old sensors.  But I'm just speculating.

 

In any case, I have not heard any rumors about LEGO changing this behavior, so waiting for LEGO, NI, or RoboLab to solve this problem for you isn't a great idea.  I would recommend you explore alternate solutions.  Can you get enough data about distance in one direction using some other sensor (touch or light)?

------
James Blair
NI R&D
0 Kudos
Message 5 of 5
(6,860 Views)