View unanswered posts | View active topics It is currently Sat Aug 08, 2020 5:28 pm






Reply to topic  [ 1 post ] 
command for PID on NXTMMX 
Author Message
Rookie

Joined: Mon Jul 12, 2010 5:56 am
Posts: 2
Post command for PID on NXTMMX
Hi there,

I got the mindsensors NXTMMX. And, to be honest, i´am just very proud i managed to use working motorcommands for it.

But now i try to turn on PID-control. I read in the documentation about "registers for advanced PID-control". Sounds great, but i simply don't understand how to write a command for PID-control with this, it might be a bit to advanced for me. For an example, with 2 motors connect to the A and B port of the NXT...

nMotorPIDSpeedCtrl[motorA] = mtrSpeedReg;
nMotorPIDSpeedCtrl[motorB] = mtrSpeedReg;
nPidUpdateInterval = 20;

motor[motorA] = 30 ;
motor[motorB] = 30 ;
wait10Msec(2000);
motor[motorA] = 0 ;
motor[motorB] = 0 ;

...what would that be for 2 motors on the MMX?

???
???
???

MMX_Run_Unlimited( S3, MMX_ADDRESS, MMX_Motor_1, MMX_Direction_Forward, 30) ;
MMX_Run_Unlimited( S3, MMX_ADDRESS, MMX_Motor_2, MMX_Direction_Forward, 30) ;
wait10Msec(2000);
MMX_Stop( S3, MMX_ADDRESS, MMX_Motor_1, MMX_Next_Action_Float );
MMX_Stop( S3, MMX_ADDRESS, MMX_Motor_2, MMX_Next_Action_Float );

If anyone could give me an example, it would just be a great help for me.

Joost


Mon Jul 12, 2010 6:56 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron



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