Does OnFwd use regulation
-
- Posts: 323
- Joined: 29 Sep 2010, 05:03
Does OnFwd use regulation
Quick NXC question... When you use OnFwd in NXC will the resultant motor output be using any form of speed regulation or does it simply set a power level for the motor? I had a quick look at the doc, but the answer wasn't obvious (to me at least)...
Re: Does OnFwd use regulation
OnFwd winds up generating this code:
Based on this I would say that it is without regulation (OUT_REGMODE_IDLE).
John Hansen
Code: Select all
setout _ports, Power, _pwr, OutputMode, OUT_MODE_MOTORON+OUT_MODE_BRAKE, RegMode, OUT_REGMODE_IDLE, RunState, OUT_RUNSTATE_RUNNING, TurnRatio, 0, TachoLimit, 0, RegPValue, _p, RegIValue, _i, RegDValue, _d, UpdateFlags, UF_UPDATE_TACHO_LIMIT+UF_UPDATE_MODE+UF_UPDATE_SPEED+UF_UPDATE_PID_VALUES+_reset
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: Does OnFwd use regulation
No PID, just a PWM speed control.
Edit: sorry, John already said that.
Edit: sorry, John already said that.
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
-
- Posts: 323
- Joined: 29 Sep 2010, 05:03
Re: Does OnFwd use regulation
Thanks, I thought that was probably the case (I was looking at some nxc code and trying to work out what it did), but wasn't 100% sure...
Andy
Andy
Who is online
Users browsing this forum: Semrush [Bot] and 11 guests