Runaway Robot
Page 1 of 1

Author:  homer [ Thu Feb 16, 2012 2:22 am ]
Post subject:  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.


Robotics Merit Badge Team

Author:  MHTS [ Thu Feb 16, 2012 5:58 am ]
Post subject:  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.

Author:  magicode [ Thu Feb 16, 2012 1:50 pm ]
Post subject:  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.

Author:  Dick Swan [ Sat Feb 18, 2012 10:46 am ]
Post subject:  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.

Author:  homer [ Tue Feb 21, 2012 10:34 pm ]
Post subject:  Re: Runaway Robot

Thanks Dick. I did not know that.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group