View unanswered posts | View active topics It is currently Wed Jun 26, 2019 8:36 pm






Reply to topic  [ 4 posts ] 
Motor Regulation 
Author Message
Rookie

Joined: Mon Dec 21, 2015 10:28 pm
Posts: 2
Post 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!


Mon Dec 21, 2015 10:36 pm
Profile
Moderator
Moderator

Joined: Tue May 19, 2015 3:07 pm
Posts: 91
Post 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.


Tue Dec 22, 2015 7:27 am
Profile
Rookie

Joined: Mon Dec 21, 2015 10:28 pm
Posts: 2
Post 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?


Tue Dec 22, 2015 8:44 am
Profile
Moderator
Moderator

Joined: Tue May 19, 2015 3:07 pm
Posts: 91
Post 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)


Sun Dec 27, 2015 5:56 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


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

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.