View unanswered posts | View active topics It is currently Sun Apr 20, 2014 9:20 am






Reply to topic  [ 5 posts ] 
Runaway Robot 
Author Message
Rookie

Joined: Mon Mar 28, 2011 11:09 am
Posts: 2
Post Runaway Robot
Is there any code that can shutdown the motors when the WIFI link drops out? We are running the PWM outputs from the motorports to an amplifier to drive some cim motors. When the VEX WIFI link drops out ( frequently) the robot goes full throttle and crashes.

Thanks,

Robotics Merit Badge Team


Thu Feb 16, 2012 2:22 am
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1343
Post Re: Runaway Robot
Not sure if it is the same for Cortex but RobotC version 3.04 or newer for NXT is supposed to do that. When WiFi or Bluetooth connection is lost for a set period of time, RobotC is supposed to clear the fields in the joystick packet so that they read zero thus stopping the robot.


Thu Feb 16, 2012 5:58 am
Profile
Moderator
Moderator
User avatar

Joined: Tue Sep 14, 2010 9:19 pm
Posts: 496
Post Re: Runaway Robot
I've never had that happen on the Cortex. Every time our wifi dropped out, all the motors would lose power. I've never seen that happen to anybody else either, even looking at all of the robots that dropped out at worlds.

_________________
sudo rm -rf /


Thu Feb 16, 2012 1:50 pm
Profile
Creator
Creator

Joined: Fri Feb 09, 2007 9:21 am
Posts: 614
Post Re: Runaway Robot
VEX Cortex has two CPUs. A master CPU which manages competition status, controls all the Wi-Fi, and has override to enable/disable all motors. The "slave" CPU runs the user programs and the ROBOTC firmware.

The master firmware has two modes for motor operation when using Wi-Fi. These are set by the "Competition Control" menu on the "Robot" menu within ROBOTC.
The states are:
  • No Wi-Fi used. Direct USB A-to-A cable between robot and PC. Motors are always enabled.
  • Wi-Fi used for competition. I believe motors will be disabled if the Wi-Fi drops for longer than a brief interval.
  • Wi-Fi but not used for competition. Motors are always enabled regardless of Wi-FI state.

It sounds like you're set up for the 3rd state. You probably want to configure for the second state (even though you're not using it for a competition) to get the behavior you want.

There's a more complicated answer where your program would need to check the internal state of the Wi-Fi link and then manage the motor enable / disable within your program. I cannot remember whether the "internal state" variable is visible, on a read only basis, to user programs but I believe it is but probably not documented.


Sat Feb 18, 2012 10:46 am
Profile
Rookie

Joined: Mon Mar 28, 2011 11:09 am
Posts: 2
Post Re: Runaway Robot
Thanks Dick. I did not know that.


Tue Feb 21, 2012 10:34 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 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.