Tuesday, May 1, 2012

Arduino Mega 2560 driver could not be found on Windows 7

Issue: Arduino Mega 2560 driver could not be found on Windows 7
Solution: Simply go to Start - right click on Computer - Properties - Device Manager -  Under Other Devices, Find Arduino Mega 256 - right click and choose update driver - Choose Browse computer for driver software - Click Browse and Navigate to your Arduino home folder(where you installed Arduino) and choose drivers folder and  click Next. The windows 7 would find the right driver inside the folder.

Happy coding with Arduino :-)

Thursday, April 19, 2012

Breaking a loop in Rapid ABB

To break an infinite loop in Rapid ABB try the following code:

WHILE (TRUE)
      Counter = Counter + 1;
      IF (Counter = 5) THEN
           Return;
     ENDIF
ENDWHILE

Wednesday, April 11, 2012

Visual Studio shortcut for commenting program lines

Ctrl-K, Ctrl-C – Comments selected text
Ctrl-K, Ctrl-U – De-Comment selected text

Tuesday, March 27, 2012

Reseting program pointer, ABB PC SDK


ResetProgramPointer method
Using ResetProgramPointer you can set the program pointer to the main entry point of the task.
VB:
aTask.ResetProgramPointer()

C#:
aTask.ResetProgramPointer();

Stop [ \NoRegain ], ABB RAPID



MoveL point_1, v1000, z10, tool1;
TPWrite “Jog the robot to the position for pallet corner 1”;
Stop \NoRegain;
p1_read := CRobT();
MoveL point_2, v500, z50, tool1;

Program execution stops with the robot at point_1. The operator jogs the robot to p1_read. For the next program start, the robot does not regain to point_1, so the position p1_read can be stored in the program

Wednesday, February 22, 2012

3pi robot LCD from Arduino


What is a 3pi robot ?
What is an Arduino board ?

----------------

#include

OrangutanLCD lcd;

void setup()               // run once, when the sketch starts
{

}

void loop()                // run over and over again
{
  // avoid clearing the LCD to reduce flicker
  lcd.gotoXY(0, 0);
  lcd.print("Line 1");
  lcd.print("  ");              // overwrite any left over digits
 
  lcd.gotoXY(0, 1);

  lcd.print("Line 2");
  lcd.print("  ");              // overwrite any left over digits

}

3pi motor control from Arduino

What is a 3pi robot ?
What is an Arduino board ?
What is an AVR Atmel Micro-controller ?
----------------
#include

OrangutanMotors motors;

void setup()               // run once, when the sketch starts
{

}

void loop()                // run over and over again
{
  // note that the following line could also be accomplished with:
  // int pot = analog.read(7);
  //int pot = analog.readTrimpot();    // determine the trimpot position
  int motorSpeed1 = 25;  // turn pot reading into number between -256 and 255
  int motorSpeed2 = 0;  // turn pot reading into number between -256 and 255

// Minus - Zero -> back to right (turn around one point)
// Zero - Minus -> Back to leftt (turn around one point)
// Positive - Zero -> front to right (turn around one point)
// Zero - Positive -> front to left (turn around one point)

// Speed1 < Speed2 -> back to right
// Speed1 > Speed2 -> Back to leftt
// Speed1 > Speed2 -> front to right
// Speed1 < Speed2 -> front to left
// looking at robot from back ->  left number goes to left motor & right goes to right motor
motors.setSpeeds(motorSpeed1,motorSpeed2);
}
---------------