ROBOTC.net forums
http://robotc.net/forums/

Motor Regulation
http://robotc.net/forums/viewtopic.php?f=1&t=12923
Page 1 of 1

Author:  abrown [ Mon Dec 21, 2015 10:36 pm ]
Post subject:  Motor Regulation

I'm brand new to RobotC and I apologize if this has been covered already. For one application, I'd really like to turn off the motor regulation for a short portion of code. Is this possible? I cannot find anything in the EV3 documentation section. There is a bit in the NXT portion, it looks like you can enable the PID regulation with this:

nMotorPIDSpeedCtrl[motorA] = mtrSpeedReg; // enable PID on Motor A

but I couldn't find how to disable it. Further, do these NXT command work with the EV3 commands?

Thanks in advance!

Author:  Tabor473 [ Tue Dec 22, 2015 7:27 am ]
Post subject:  Re: Motor Regulation

abrown wrote:
I'm brand new to RobotC and I apologize if this has been covered already. For one application, I'd really like to turn off the motor regulation for a short portion of code. Is this possible? I cannot find anything in the EV3 documentation section. There is a bit in the NXT portion, it looks like you can enable the PID regulation with this:

nMotorPIDSpeedCtrl[motorA] = mtrSpeedReg; // enable PID on Motor A

but I couldn't find how to disable it. Further, do these NXT command work with the EV3 commands?

Thanks in advance!

So what you are looking for is mtrNoReg. This sets the PID control to be off on that motor. All these commands work for the EV3 or the NXT platform, I am not quite sure what you are asking so let me know if I didn't address something.

Author:  abrown [ Tue Dec 22, 2015 8:44 am ]
Post subject:  Re: Motor Regulation

That was exactly what I was looking for. Thanks! Where is this stuff normally documented? It isn't in the current version of the of ROBOTC for LEGO Mindstorms 4.X API documentation. Now that I know the command, I was able to search and find it in older versions of the documentation. Is there a master index floating around somewhere?

Author:  Tabor473 [ Sun Dec 27, 2015 5:56 pm ]
Post subject:  Re: Motor Regulation

abrown wrote:
That was exactly what I was looking for. Thanks! Where is this stuff normally documented? It isn't in the current version of the of ROBOTC for LEGO Mindstorms 4.X API documentation. Now that I know the command, I was able to search and find it in older versions of the documentation. Is there a master index floating around somewhere?

I would suggest in most cases right clicking something and click "Go to Definition/declaration". Finding where mtrSpeedReg was declared was how I quickly found the other options. (Things like this are stored as enum's which is a custom data type that can contain a very specific set of options)

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/