Welcome, Guest. Please login or register.
Did you miss your activation email?
May 22, 2012, 05:24:36 AM
Home Help Login Register
News: Any Problems or Experience with Industrial Robots ?
Register and place your Question / Answer to worldwide Robotexperts right here !

+  Robotforum | Support for Robotprogrammer and Users
|-+  Industrial Robot Help and Discussion Center
| |-+  ABB Robot Forum (Moderators: Werner Hampel, Sven Weyer, Jim Tyrer, Napierian)
| | |-+  Rapid programming help!
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: Rapid programming help!  (Read 794 times)
loppie
Guest
« on: May 04, 2010, 12:11:33 PM »

Hi!

Im doing a program witch i have an array {10,10,10}. And i want to in the beginning choose som parameters for the operation, with then is saved in the array like this example.
After i did it once i want to, add some new parameters but this time not in the same array (area!?) so that i can ex enter ten different programs and then choose them from a question.



PROC init()

TPErase;

TPReadFK programID,"1 XXX 2 XXX","1","2","","","";

TPErase;

Test programID

case 1:

TPErase;

TPReadNum ProgramNR, "ProgramID"; !THE CHOOSE PART OF WICH PROGRAM!
TPErase;

case 2:

TPErase;

TPReadNum BorrData{1,1,1}, "XXXX";

TPErase;

TPReadNum BorrData{1,1,2}, "XXXX";

TPErase;

TPReadNum BorrData{1,1,3}, "XXX";

TPErase;

TPReadNum BorrData{1,1,4}, "XXXX ";

TPErase;

TPReadNum BorrData{1,1,5}, "XXXX";

TPErase;

TPReadNum BorrData{1,1,6}, "XXXX";

TPErase;

EndTest

EndProc

PROC CCC()

Speed.v_tcp:=BorrData{1,1,6};

ZZZZZ:=Borrdata{1,1,2};

 

WHILE AntalRakning < BorrData{1,1,5} DO

WHILE Klart < BorrData{1,1,2} DO

!**Manipulerar possitionen i Z led**

Start:=Offs(Start,(0),0,(BorrData{1,1,3}));


!**

MoveL StartBorr,BorrSpeed,z50,toolborr1\WObj:=wobjborr1;

!**

Add BorrningKlart, BorrData{1,1,3};


WaitTime 0.5;

ENDWHILE

!**

Start:=Offs(Start,(0),0,-nollLage);


MoveL start,Speed,z50,toolborr1\WObj:=wobjborr1;

WaitTime 2.0;

!**

INCR AntalRakning;

!**

Klart:=0;

!**

StartBorr:=Offs(StartBorr,0,(BorrData{1,1,4}),0);

!**RÖRELSE FRAM**

MoveL Start,Speed,z50,toolborr1\WObj:=wobjborr1;

WaitTime 2.0;

ENDWHILE

EndProc

´

Im greateful of any kind of help!

BR
Logged
ABB robter
Sr. Member
****
Offline Offline

Gender: Male
Posts: 267


« Reply #1 on: May 04, 2010, 06:59:47 PM »

So I understand, You have 10 elements that are needed for each program and you want to read and write this data based on 10 different programs?

My first thought is that you should build a new data type for the 10 elements which appear to be various basic data types then build a single array with the new data type as the element that you can call up based on program number or some type of product array.

Logged
luetin
Full Member
***
Offline Offline

Posts: 107


« Reply #2 on: May 05, 2010, 07:24:02 AM »

I think the use of an array in this case just makes the program harder to read. I would have used normal variables for each program instead and named them so they make sense.
Logged
Ztek
Jr. Member
**
Offline Offline

Posts: 57

Service engineer and programmer of ABB and Adept.


« Reply #3 on: May 19, 2010, 01:14:22 PM »

Seems like you are making a very difficult solution on a simple problem. As it looks like you are from sweden from the variable names in your program I sudgest that you write down a more detalied question in Swedish in the help in other languages part of the forum and I will try to ansver you there.
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!