RCX motor control
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
RCX motor control
In NQC, is there a way to set the power using the brake? What I want, is to do a brake PWM speed control. All I know how to do, is floating PWM. Brake PWM will allow a much better speed control, not just power.
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
Re: RCX motor control
All that you can do in NQC to control the RCX motors is documented in the NQC Programmer's Guide and the NQC help. There is nothing else that you can do other than what those docs say you can do. IIRC, anyway.
John Hansen
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: RCX motor control
Okay. I checked to see what the Opcode is for the motor control. It is opcode 0x21. Bits 6 and 7 are for float, brake, and run. NQC only supports 0, 1, and 2 (float, brake, and on). I thought that maybe writing it 3 (brake and on), is what I wanted. There is obviously no NQC command for the command, so I programmed it with machine code. I didn't do what I wanted though... It looks like it isn't supported. I guess I may just do it with HW. Thanks for the information.
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
Re: RCX motor control
With the RCX brake means off with power. It isn't a mask that you can add to either float or on. It would have been documented and supported in NQC (and via BricxCC tool windows) if it could have been done.
John Hansen
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
Who is online
Users browsing this forum: No registered users and 1 guest