User Defined Records in RAPID

Hi,

I am trying to build a user defined record (data object) in RAPID however, I cannot find any form of information regarding to the syntax in the ABB RAPID manuals.

Is there someone who has an example of a record for me?

Hello Neohcs.:wink:

A? A? If I’m not wrong to interprete your question, I have an example like this:

VAR pos home;

VAR pos pos1;

VAR num yvalue;

yvalue := home.y; A? A?!the axis-y component only

pos1 := home; A? A? A? A? !the whole position

A? A? A variable, persistent or constant declared as a record can be referenced to the whole record or a single component. A record component is referenced using the component name.

A? A? I hope this will help.

Best Regard

Dhyan

Indonesia

Hello Dhyan,

Thanks for the fast answer, but it is not what I was looking for. (I found it just a minute ago in the RAPID kernel manual 3HAC16585-1_revF_en.pdf)

I have to store information about different products, (size, location, ect ect)

I can save them using a Record.

RECORD Product

pos size;
pos location;
pos target;
num weight;
num productID;
ENDRECORD

if i need the pick the product i can use this statement.

VAR Product ProductA;
VAR robtarget pos10;


..
..

pos10.trans := ProductA.location;
pos10.trans.z := pos10.trans.z + ProductA.Size.z;
MOVEL pos10 …

Neochs,

I believe you may be wanting to do Rapid Developer Functions to create your own data types, this is a separate software option from ABB. I’m sure someone familiar with this can better explain it.

In the mean time, I can offer another solution. I would create a routine that you can pass parameters in and out of to assign the product information. This routine could then be used as an instruction, allowing you to input the information from the teach pendant through Proc Call. This can make for a very clean program if done right. Here is a crude example of what I mean:

PROC AssignProduct(pos size,pos location, pos target, num weight, num productID;)
!Assign your values here
ENDPROC

This can be taken to a higher level with IN/OUT, optional arguments, and switches.

Best Regards,

Shane

Hello,
Attached is the Rapid Overview manual and the Rapid Kernal Manual. These have information on Record syntax.

Br
Jim Proulx

webwiz/222/Rapid_Documents.zip