Previous in Forum: Reduction in MDMT   Next in Forum: A Standby Barge Ready To Launch A Well Capping Module
Close
Close
Close
2 comments
Rate Comments: Nested
Participant

Join Date: May 2010
Posts: 1

ABB Program Using Arrays

05/04/2010 10:17 AM

Hi! I'm doing a program which i have an array {10,10,10}. And i want to in the beginning choose some 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

´

I'm grateful of any kind of help! BR

Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Associate

Join Date: Apr 2010
Posts: 27
Good Answers: 1
#1

Re: Abb rapid help!

05/04/2010 4:52 PM

I'd write the parameters to an ascii txt file and then append to EOF. Then read it all into an array and each group of say 3 is each seperate program mode such as {1,1,1,1,1,2,1,1,3,1,1,4} in which you have modes 111, 112, 113, and 114 by reading in every 3rd bracket to the EOF.

Register to Reply
Active Contributor

Join Date: Mar 2010
Posts: 11
#2

Re: ABB Program Using Arrays

05/05/2010 9:06 AM

If you have an "ACP" board you can do some neat stuff with arrays. In a controller without ACP (MP280 thru AC450), I would probably use multiplexers (MUX-N). You'll need one for each value in array. Which controller do you have?

Register to Reply
Register to Reply 2 comments

Previous in Forum: Reduction in MDMT   Next in Forum: A Standby Barge Ready To Launch A Well Capping Module

Advertisement