User Defined Records in RAPID
Hi, <?: prefix = o ns = "urn:schemas-microsoft-com:office:office" />
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?
Comments
-
Hello Neohcs.
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
fear of GOD is the beginning of wisdom0 -
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)<?: prefix = o ns = "urn:schemas-microsoft-com:office:office" />
I have to store information about different products, (size, location, ect ect)
I can save them using a Record.
RECORD Productpos size;pos location;pos target;num weight;num productID;ENDRECORDif 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 ......0 -
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,
Shane0 -
Hello,Attached is the Rapid Overview manual and the Rapid Kernal Manual. These have information on Record syntax.BrJim Proulx
0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings