


















































Estude fácil! Tem muito documento disponível na Docsity
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Esta página não é visível na pré-visualização
Não perca as partes importantes!



















































ABB Robotics Products AB DPT / MT S-72168 VÄSTERÅS SWEDEN Telephone: (0) 21 344000 Telefax: (0) 21 132592
Advanced Motion
Advanced Motion
Page Syntax ........................................................................................................................ 55 Related information ................................................................................................... 55
Index ................................................................................................................................... 57
Advanced Motion corrdescr
corrdescr Correction generator descriptor
Corrdescr (Correction generator descriptor) is used by correction generators. A correction generator adds geometric offsets in the path coordinate system.
Data of the type corrdescr contains a reference to a correction generator.
Connection to a correction generator is done by the instruction CorrCon and the descriptor (the reference to the correction generator) can be used to deliver geometric offsets in the path coordinate system with the instruction CorrWrite.
Offsets provided earlier can be removed by disconnecting a correction generator with the instruction CorrDiscon. All connected correction generators can be removed with the instruction CorrClear.
The function CorrRead returns the sum of all the delivered offsets so far (includes all connected correction generators).
VAR corrdescr id; VAR pos offset; ... CorrCon id; offset := [1, 2 ,3]; CorrWrite id, offset;
A correction generator is connected with the instruction CorrCon and referenced by the descriptor id. Offsets are then delivered to the correction generator (with reference id ) using the instruction CorrWrite.
Corrdescr is a non-value data type.
corrdescr Advanced Motion
Described in: Connects to a correction generator Instructions - CorrCon Disconnects from a correction generator Instructions - CorrDiscon Writes to a correction generator Instructions - CorrWrite Reads the current total offsets Functions - CorrRead Removes all correction generators Instructions - CorrClear Characteristics of non-value data types Basic Characteristics - Data Types
CorrCon Advanced Motion
Application example
An example of an application using path corrections is a robot holding a tool with two sensors mounted on it to detect the vertical and horizontal distances to a work object.
Figure 2 Path correction device.
Program example
CONST num TARGET_DIST := 5; CONST num SCALE_FACTOR := 0.5; VAR intnum intno1; VAR corrdesc hori_id: VAR corrdesc vert_id; VAR pos total_offset; VAR signalai hori_sig; VAR signalai vert_sig; VAR pos write_offset;
PROC PathRoutine()
! Connect to the correction generators for horizontal and vertical correction. CorrCon hori_id; CorrCon vert_id;
! Setup a 5 Hz timer interrupt. The trap routine will read the sensor values and ! compute the path corrections. CONNECT intno1 WITH ReadSensors; ITimer\singel 0.2, intno
X (^) P
Z (^) P
Y (^) P
Sensor for vertical correction
Sensor for horizontal correction.
Path coordinate system Tool
Advanced Motion CorrCon
! Position for start of contour tracking MoveJ p10,v100,z10,tool1;
! Run MoveL with both vertical and horizontel correction. MoveL p20,v100,z10,tool1\Corr; ! Read the total corrections added by all connected correction generators. total_offset := CorrRead(); ! Write the total vertical correction on the TeachPendant. TPWrite “The total vertical correction is: ”\Num:=total_offset.z; ! Disconnect the correction generator for vertical correction. ! Horizontal corrections will be unaffected. CorrDiscon vert_id; ! Run MoveL with only horizontel correction. MoveL p30,v100,z10,tool1\Corr;
! Remove all outstanding connected correction generators. ! In this case, the only connected correction generator is the one for horizontal ! correction. CorrClear;
! Remove the timer interrupt. IDelete intno1;
ENDPROC
TRAP ReadSensors
! Compute the horizontal correction values and execute the correction. write_offset.x := 0; write_offset.y := (hori_sig - TARGET_DIST)*SCALE_FACTOR; write_offset.z := 0; CorrWrite hori_id, write_offset;
! Compute the vertical correction values and execute the correction. write_offset.x := 0; write_offset.y := 0; write_offset.z := (vert_sig - TARGET_DIST)*SCALE_FACTOR; CorrWrite vert_id, write_offset;
!Setup interupt again IDelete intnol; CONNECT intno1 WITH ReadSensors; ITimer\singel 0.2, intno1;
ENDTRAP
Program explanation
Two correction generators are connected with the instruction CorrCon. Each correction generator is referenced by a unique descriptor ( hori_id and vert_id ) of the type corrdesc. The two sensors will use one correction generator each.
Advanced Motion CorrCon
CorrCon
Described in: Disconnects from a correction generator Instructions - CorrDiscon Writes to a correction generator Instructions - CorrWrite Reads the current total offsets Functions - CorrRead Removes all correction generators Instructions - CorrClear Correction generator descriptor Data types - corrdescr
CorrCon Advanced Motion
CorrWrite Advanced Motion
Described in: Connects to a correction generator Instructions - CorrCon Disconnects from a correction generator Instructions - CorrDiscon Reads the current total offsets Functions - CorrRead Removes all correction generators Instructions - CorrClear Correction generator descriptor Data types - corrdescr
Advanced Motion CorrRead
CorrRead Reads the current total offsets
CorrRead is used to read the total corrections delivered by all connected correction generators.
CorrRead can be used to:
VAR pos offset;
offset := CorrRead();
The current offsets delivered by all connected correction generators are available in the variable offset.
The total absolute offsets delivered from all connected correction generators so far.
See Instructions - CorrCon
A function with a return value of the data type pos.
Advanced Motion CorrDiscon
CorrDiscon Disconnects from a correction
generator
CorrDiscon is used to disconnect from a previously connected correction generator. The instruction can be used to remove corrections given earlier.
VAR corrdescr id;
CorrCon id;
CorrDiscon id;
CorrDiscon disconnects from the previously connected correction generator referenced by the descriptor id.
Descr Data type: corrdescr
Descriptor of the correction generator.
See Instructions - CorrCon
CorrDiscon
CorrDiscon Advanced Motion
Described in: Connects to a correction generator Instructions - CorrCon Writes to a correction generator Instructions - CorrWrite Reads the current total offsets Functions - CorrRead Removes all correction generators Instructions - CorrClear Correction descriptor Data types - corrdescr