How to control NXT motor's rotation by using LabView NXT Direct Commands?

View: New views
8 Messages — Rating Filter:   Alert me  

How to control NXT motor's rotation by using LabView NXT Direct Commands?

by uownxt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hello,guys
 
I want to use labview NXT Direct Commands to control my NXT .
I connected PC and NXT through USB successfully, and also got the response form Sound Sensor.
 
The sound level is used to specify the rotational distance of NXT motor  in DEGREES, however I found that 'NXT Direct Commands >output>motor unlimited' can not accept a Degree input parameter.
 
I try to modify these subVIs, add Degree and Break(?) parameters. It seem that Degree parameter can be defind (also worked),but it worked in a incorrect way.
 
I read LabVIEW_for_NXT_Advanced_Programming_Guide, and try to add UpdataFlags for that VI. After analysis Motor Unlimited.vi in deep, I found that SendDirectCommand.vi can't be open,it's locked! So I have no idea about the structure of "Output Port Info".
 
Can anybody help?

Re: How to control NXT motor's rotation by using LabView NXT Direct Commands?

by Steve Hassenplug :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

At 10:24 AM 12/15/06, uownxt wrote:
>hello,guys
>
>I want to use labview NXT Direct Commands to control my NXT .
>I connected PC and NXT through USB successfully, and also got the response
>form Sound Sensor.
>
>The sound level is used to specify the rotational distance of NXT motor  in
>DEGREES, however I found that 'NXT Direct Commands >output>motor unlimited'
>can not accept a Degree input parameter.

The "motor unlimited" is designed to set the motor to run an
unlimited distance.  It's just a "turn motor on" type block.  I think
you want the "Motor Degrees" block, or something like that, don't
you?  (sorry, I don't have access to LV right now)

Steve

Re: How to control NXT motor's rotation by using LabView NXT Direct Commands?

by uownxt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The "motor unlimited" is designed to set the motor to run an
unlimited distance.  It's just a "turn motor on" type block.  I think
you want the "Motor Degrees" block, or something like that, don't
you?  (sorry, I don't have access to LV right now)

Steve

Yes, you are right. I cann't fnd "Motor Degrees" block in NXT ToolKit, so I have to modify the "motor unlimited" block. But it is very hard:(

Re: How to control NXT motor's rotation by using LabView NXT Direct Commands?

by Steve Hassenplug :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

At 11:06 AM 12/15/06, uownxt wrote:
>The "motor unlimited" is designed to set the motor to run an
>unlimited distance.  It's just a "turn motor on" type block.  I think
>you want the "Motor Degrees" block, or something like that, don't
>you?  (sorry, I don't have access to LV right now)
>
>Steve
>
>Yes, you are right. I cann't fnd "Motor Degrees" block in NXT ToolKit, so I
>have to modify the "motor unlimited" block. But it is very hard:(


Did you say you're using the bluetooth commands from Labview?  I
thought it had different motor blocks.  I'll have to look again.

Steve

Re: How to control NXT motor's rotation by using LabView NXT Direct Commands?

by mustang67 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi, i'm interested too to see how I can make an input port to the block of motor.
I want to make a rc controlled car, with two NXT. One will be the handwheel with the rotation sensor in one motor, I will send the number of degrees, and the RC car, will turn de steering or direction and the motor of it, will turn the same number of degrees.
How i can make it.


PD: Sorry of my vocabulary, and thanks if any answer me...

Re: How to control NXT motor's rotation by using LabView NXT Direct Commands?

by Steve Hassenplug :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


If I read this correctly, you should simply be able to read the
rotation sensors, using the rotation sensor block.  That will give you
the value you want.

Steve

On Mon, Mar 16, 2009 at 6:28 AM, mustang67 <lego-robotics@...> wrote:

>
> Hi, i'm interested too to see how I can make an input port to the block of
> motor.
> I want to make a rc controlled car, with two NXT. One will be the handwheel
> with the rotation sensor in one motor, I will send the number of degrees,
> and the RC car, will turn de steering or direction and the motor of it, will
> turn the same number of degrees.
> How i can make it.
>
>
> PD: Sorry of my vocabulary, and thanks if any answer me...
> --
> View this message in context:
> http://www.nabble.com/How-to-control-NXT-motor%27s-rotation-by-using-LabView-NXT-Direct-Commands--tp7893381p22535275.html
> Sent from the LEGO Robotics mailing list archive at Nabble.com.

Re: How to control NXT motor's rotation by using LabView NXT Direct Commands?

by mustang67 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


<Thanks, but is not the information that i need. I know that with the rotation sensor, I can read the value of the rotation of one motor, but what I want is that this number, I want to put by a wire to a motor block, and that will make this example:

Motor A- Controlled by me ( I 'm who turns the degrees)
Motor B- Controlled by the value of degrees of motor A.

If i turn the motor A 10 degrees, i send the value and the motor B turns 10 degrees as equal to motor A.

The question is, how I can put by a wire, and a motor block, control the degrees that the motor has to turn.  Lots of thanks!!!

Re: How to control NXT motor's rotation by using LabView NXT Direct Commands?

by Steve Hassenplug :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> Motor A- Controlled by me ( I 'm who turns the degrees)
> Motor B- Controlled by the value of degrees of motor A.

got it

>
> The question is, how I can put by a wire, and a motor block, control the
> degrees that the motor has to turn.  Lots of thanks!!!

There's not a super-easy way to do that.  But, what you need to do is:
1) Read rotation value & direction of motor A
2) Look at rotation value & direction of motor B
3) Subtract B from A
4) Move motor B distance & direction (sign) calculated in #3

Steve