I think I figured out how to do it for you. When stooping a motor, you need to define whether it will float or brake right before you do the action. You have to do this for each motor you want to operate differently from the previous motors. I made this code to demonstrate how to do it.

Hook a motor to port A and B and the code will alternately float and brake each motor.

I have an idea for the RobotC developers, could you change this command so you can define only once what ports to Brake/Float? This would make programing so much easier for everyone B-)

Unfortunately i think that the float vs brake is universal/global and when you try to change it it jams the arm motor. My program does alot of driving around with B and C motors, then when I want to use the arm I want to float the motor so that gravity can finish the job, thus avoiding a stalled motor if the arm gets hung up. When I try to float the motor with the code below, the motors squeals, if I take out the coast and brake statements then it works. The NXT-G language allows all the coasting/braking every time, so I don't get why this fails

I played with your code and I see the problem. When using the target encoder, it works allot better when the motor is in brake mode than in float mode. I think the reason is when in brake mode, the motor can alter the speed with great control, and with high accuracy. When the motor is in float, the control is hindered with the motors tendency to coast past its encoder target. The encoder is more likely to miss its target and have to backtrack to the specified target.

I made a program to demonstrate the difference in the motor encoder target with the float and brake options. Plug a motor into port A and make sure the motor is not hooked to anything and watch what happens. I set the target to 1000, that gets the motor up to speed and shows how different the two modes are. You will hear the motor squeal when in float mode, what is happening is it is really close to its target and mathematically, it needs to give it a little power to get to the target, but in reality the amount of power is to little to move the motor, causing it to stall and you hear the squeal.

I hope this helps a little bit, as for your arm i might ditch the encoder idea and just have the motor move for half a second and coast down.

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum