icommand functionality

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: 99jonathan, roger, imaqine

icommand functionality

Postby socrates » Sat Nov 10, 2007 10:25 pm

I have a loop which is (supposedly) controlling the motor speed. Within the loop I have the commands

Motor.B.setSpeed((int)output);
Motor.C.setSpeed((int)output);
Motor.B.forward();
Motor.C.forward();

However, it is not quite acting as expected. Even thought the program exits the NXT continues operating and moving.

Are the icommands being queued in some way?

Regards,
Rupert
socrates
New User
 
Posts: 12
Joined: Sun Oct 28, 2007 7:36 pm

Postby WikiY » Sun Nov 11, 2007 7:02 am

Stop the motor before the program exits?
WikiY
New User
 
Posts: 4
Joined: Sun Oct 28, 2007 2:42 am

Postby socrates » Thu Nov 15, 2007 9:35 am

Thanks. I didn't appreciate that forward() turns the motor indefinitley.

Regards,
Rupert
socrates
New User
 
Posts: 12
Joined: Sun Oct 28, 2007 7:36 pm

Postby bbagnall » Thu Nov 29, 2007 6:02 pm

Thanks, I'm going to change iCommand to set all motors to float mode when close() is called.
User avatar
bbagnall
Site Admin
 
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 4 guests

more stuff