09.12.2012 Views

Basic Characteristics RAPID

Basic Characteristics RAPID

Basic Characteristics RAPID

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CPos Reads the current position (pos) data<br />

Example<br />

CPos (Current Position) is used to read the current position of the robot.<br />

This function returns the x, y, and z values of the robot TCP as data of type pos. If the<br />

complete robot position (robtarget) is to be read, use the function CRobT instead.<br />

VAR pos pos1;<br />

pos1 := CPos(\Tool:=tool1 \WObj:=wobj0);<br />

The current position of the robot TCP is stored in variable pos1. The tool tool1<br />

and work object wobj0 are used for calculating the position.<br />

Return value Data type: pos<br />

Arguments<br />

The current position (pos) of the robot with x, y, and z in the outermost coordinate system,<br />

taking the specified tool, work object and active ProgDisp coordinate system into<br />

consideration.<br />

CPos ([\Tool] [\WObj])<br />

[\Tool] Data type: tooldata<br />

The tool used for calculation of the current robot position.<br />

If this argument is omitted the current active tool is used.<br />

[\WObj] (Work Object) Data type: wobjdata<br />

The work object (coordinate system) to which the current robot position returned<br />

by the function is related.<br />

If this argument is omitted the current active work object is used.<br />

When programming, it is very sensible to always specify arguments \Tool and \WObj.<br />

The function will always then return the wanted position, although some other tool or<br />

work object has been activated manually.<br />

<strong>RAPID</strong> Reference Manual 9-CPos-1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!