Category Archives: Programming

DFRobot Shield library for LCD Keypad Shield from DX

If you have ordered “LCD Keypad Shield for Arduino Duemilanove & LCD 1602” from DealExtreme and are wondering about how to get this thing working without datasheet, you are in the right place :-)

This product seems to be very similar(!) a product called “DFRobot LCD Keypad Shield for Arduino” and the Datasheet and even a library (LCD4bit_mod) for easy programming of it is available at following link, http://www.robotshop.com/dfrobot-lcd-keypad-shield-arduino.html, under useful links.

The only issue with the library is that this is built for old versions of Arduino and if one to make it work with newest version (Arduino 1.0), then some parts of the code should change. First you need to install the additional library in your Arduino on your computer (by copying the content of the zip file in the “libraries” folder of Arduino program). Afterwards one should change the content of LCD4bit_mod.cpp 

Continue reading

String to Double issues in C# .NET

If you are simply using

double test = Double.Parse(“12.45″);

and it doesn’t work due to formating issues, here is the right post for you. Almost certainly you’re using the wrong CultureInfo. Try specifying CultureInfo.InvariantCulture to parse in. I suspect it’s currently assuming that “.” is a thousands separator rather than a decimal point.

CultureInfo Invc = new CultureInfo(“”);
Invc = CultureInfo.InvariantCulture;
x1 = Double.Parse(“12.45″, Invc);

alternative:

x1 = Double.Parse(“12.45″, CultureInfo.InvariantCulture);

Reading input from ABB flexpendant

On ABB robots, one have access to a syntax in RAPID programming language called TPRead. TPRead allows the programmer to read live values from the user (operator) while your code is being run.

TPReadNum reg1,”Text”;

Code Example:
PROC readJNumFromPendant()
TPErase;
TPReadNum reg1,”Enter Input Number?”;
readValue := reg1;
TPWrite “Read Value is: ” + ValToStr(testRead);
ENDPROC

RAPID_refer4.0

Tab Order in C# Windows Form – MS Visual Studio 2010

Setting Tab order in C# (Visual Studio 2010):

1 – Select View – Tab Order. This activates the tab-order selection mode on the form. A number (representing the TabIndex property) appears in the upper-left corner of each control.

2-  Click the controls sequentially to establish the tab order you want.

3 – When you are done, click View – Tab Order to deactivate the indexing.

Source: http://msdn.microsoft.com/en-us/library/bd16a8cw.aspx

My ABB Robotstudio lectures at University of Oslo

This week I hold my first course in ABB Robotstudio for a course at university of Oslo (INF3480, introduction to robotics). I was a guest lecture and hold a 2 hours lecture about offline visual programming and simulation for industrial manipulators (with focus on ABB robots with Robotstudio). I would be also holding a course (introduction to ABB Robotstudio) for Robotica Osloensis at university of Oslo on Friday 27.04.12 which would be much more practical for senior university students who are entering the job market.

The lecture notes(in PDF format) could be downloaded from here.

Robotstudio course at UiO

Robotstudio lecture at Introduction to Robotics course

Robotstudio

Robotstudio Environment

Robotstudio workshop at Robotica Osloensis

Robotstudio workshop at Robotica Osloensis, UiO

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