Docsity

Deskware - datatypes routines, Notas de estudo de Engenharia Elétrica

Toggle sidebar
bg1
ABB Flexible Automation
RAPID Reference Manual
System Data Types and Routines On-line
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Pré-visualização parcial do texto

Baixe Deskware - datatypes routines e outras Notas de estudo em PDF para Engenharia Elétrica, somente na Docsity!

ABB Flexible Automation

RAPID Reference Manual

System Data Types and Routines On-line

ABB Robotics Products AB DPT / MT S-72168 VÄSTERÅS SWEDEN Telephone: (0) 21 344000 Telefax: (0) 21 132592

The information in this document is subject to change without notice and should not be construed as a commit- ment by ABB Robotics Products AB. ABB Robotics Products AB assumes no responsibility for any errors that may appear in this document.

In no event shall ABB Robotics Products AB be liable for incidental or consequential damages arising from use of this document or of the software and hardware described in this document.

This document and parts thereof must not be reproduced or copied without ABB Robotics Products AB´s written permission, and contents thereof must not be imparted to a third party nor be used for any unauthorized purpose. Contravention will be prosecuted.

Additional copies of this document may be obtained from ABB Robotics Products AB at its then current charge.

© ABB Robotics Products AB

Article number: 3HAC 0966- Issue: For BaseWare OS 3.

ABB Robotics Products AB S-721 68 Västerås Sweden

Data Types

CONTENTS

System DataTypes and Routines 1-

bool Logical values byte Decimal values 0 - 255 clock Time measurement confdata Robot configuration data dionum Digital values 0 - 1 errnum Error number extjoint Position of external joints intnum Interrupt identity iodev Serial channels and files jointtarget Joint position data loaddata Load data mecunit Mechanical unit motsetdata Motion settings data num Numeric values (registers) orient Orientation o_jointtarget Original joint position data o_robtarget Original position data pos Positions (only X, Y and Z) pose Coordinate transformations progdisp Program displacement robjoint Joint position of robot axes robtarget Position data shapedata World zone shape data signalxx Digital and analog signals speeddata Speed data string Strings symnum Symbolic number tooldata Tool data tpnum Teach Pendant Window number triggdata Positioning events - trigg tunetype Servo tune type wobjdata Work object data wzstationary Stationary world zone data wztemporary Temporary world zone data zonedata Zone data System Data

Data Types bool

System DataTypes and Routines 1-bool-

bool Logical values

Bool is used for logical values (true/false).

Description

The value of data of the type bool can be either TRUE or FALSE.

Examples

flag1 := TRUE;

flag is assigned the value TRUE.

VAR bool highvalue; VAR num reg1; . highvalue := reg1 > 100;

highvalue is assigned the value TRUE if reg1 is greater than 100 ; otherwise, FALSE is assigned.

IF highvalue Set do1;

The do1 signal is set if highvalue is TRUE.

highvalue := reg1 > 100; mediumvalue := reg1 > 20 AND NOT highvalue;

mediumvalue is assigned the value TRUE if reg1 is between 20 and 100.

Related information

Described in: Logical expressions Basic Characteristics - Expressions Operations using logical values Basic Characteristics - Expressions

bool Data Types

1-bool-2 System DataTypes and Routines

byte Data Types

1-byte-2 System DataTypes and Routines

Data Types clock

System DataTypes and Routines 1-clock-

clock Time measurement

Clock is used for time measurement. A clock functions like a stopwatch used for tim- ing.

Description

Data of the type clock stores a time measurement in seconds and has a resolution of 0.01 seconds.

Example

VAR clock clock1;

ClkReset clock1;

The clock, clock1 , is declared and reset. Before using ClkReset , ClkStart , ClkStop and ClkRead , you must declare a variable of data type clock in your program.

Limitations

The maximum time that can be stored in a clock variable is approximately 49 days (4,294,967 seconds). The instructions ClkStart , ClkStop and ClkRead report clock overflows in the very unlikely event that one occurs.

A clock must be declared as a VAR variable type, not as a persistent variable type.

Characteristics

Clock is a non-value data type and cannot be used in value-oriented operations.

Related Information

Described in: Summary of Time and Date Instructions RAPID Summary - System & Time Non-value data type characteristics Basic Characteristics - Data Types

Data Types confdata

System DataTypes and Routines 1-confdata-

confdata Robot configuration data

Confdata is used to define the axis configurations of the robot.

Description

All positions of the robot are defined and stored using rectangular coordinates. When calculating the corresponding axis positions, there will often be two or more possible solutions. This means that the robot is able to achieve the same position, i.e. the tool is in the same position and with the same orientation, with several different positions or configurations of the robots axes.

To unambiguously denote one of these possible configurations, the robot configuration is specified using four axis values. These values define the current quadrant of four robot axes. The quadrants are numbered 0, 1, 2, etc. (they can also be negative). The quadrant number is connected to the current joint angle of the axis. For each axis,

quadrant 0 is the first quarter revolution, 0 to 90°, in a positive direction from the zero

position; quadrant 1 is the next revolution, 90 to 180°, etc. Quadrant -1 is the revolution 0° to (-90°), etc. (see Figure 1).

Figure 1 The configuration quadrants for axis 6.

Robot Configuration data for IRB

Only the configuration parameter cf6 is used.

Robot Configuration data for IRB1400, 2400, 3400, 4400, 6400

Only the three configuration parameters cf1, cf4 and cf6 are used.

confdata Data Types

1-confdata-2 System DataTypes and Routines

Robot Configuration data for IRB

All four configuration parameters are used. cf1, cf4, cf6 for joints 1, 4, and 6 respectively and cfx for joint 5.

Robot configuration data for 6400C

The IRB 6400C requires a slightly different way of unambiguously denoting one robot configuration. The difference lies in the interpretation of the confdata cf.

cf1 is used to select one of two possible main axes (axis 1, 2 and 3) configurations:

  • cf1 = 0 is the forward configuration
  • cf1 = 1 is the backward configuration.

Figure 2 shows an example of a forward configuration and a backward configuration giving the same position and orientation.

Figure 2 Same position and orientation with two different main axes configurations.

The forward configuration is the front part of the robot’s working area with the arm directed forward. The backward configuration is the service part of the working area with the arm directed backwards.

Components

cf1 Data type: num

The current quadrant of axis 1, expressed as a positive or negative integer.

BACKWARD,

cf1 = 1.

FORWARD,

cf1 = 0

confdata Data Types

1-confdata-4 System DataTypes and Routines

Data Types dionum

System DataTypes and Routines 1-dionum-

dionum Digital values 0 - 1

Dionum (digital input output numeric) is used for digital values (0 or 1).

This data type is used in conjunction with instructions and functions that handle digital input or output signals.

Description

Data of the type dionum represents a digital value 0 or 1.

Examples

CONST dionum close := 1;

Definition of a constant close with a value equal to 1.

SetDO grip1, close;

The signal grip1 is set to close , i.e. 1.

Error handling

If an argument of the type dionum has a value that is neither equal to 0 nor 1, an error is returned on program execution.

Characteristics

Dionum is an alias data type for num and consequently inherits its characteristics.

Related information

Described in: Summary input/output instructions RAPID Summary - Input and Output Signals Configuration of I/O User’s Guide - System Parameters Alias data types Basic Characteristics- Data Types

Data Types errnum

System DataTypes and Routines 1-errnum-

errnum Error number

Errnum is used to describe all recoverable (non fatal) errors that occur during program execution, such as division by zero.

Description

If the robot detects an error during program execution, this can be dealt with in the error handler of the routine. Examples of such errors are values that are too high and division by zero. The system variable ERRNO , of type errnum , is thus assigned different values depending on the nature of an error. The error handler may be able to correct an error by reading this variable and then program execution can continue in the correct way.

An error can also be created from within the program using the RAISE instruction. This particular type of error can be detected in the error handler by specifying an error number (within the range 1-90 or booked with instruction BookErrNo ) as an argument to RAISE.

Examples

reg1 := reg2 / reg3; . ERROR IF ERRNO = ERR_DIVZERO THEN reg3 := 1; RETRY; ENDIF

If reg3 = 0, the robot detects an error when division is taking place. This error, however, can be detected and corrected by assigning reg3 the value 1. Following this, the division can be performed again and program execution can continue.

CONST errnum machine_error := 1; . IF di1=0 RAISE machine_error; . ERROR IF ERRNO=machine_error RAISE;

An error occurs in a machine (detected by means of the input signal di1 ). A jump is made to the error handler in the routine which, in turn, calls the error handler of the calling routine where the error may possibly be corrected. The constant, machine_error , is used to let the error handler know exactly what type of error has occurred.

errnum Data Types

1-errnum-2 System DataTypes and Routines

Predefined data

The system variable ERRNO can be used to read the latest error that occurred. A number of predefined constants can be used to determine the type of error that has occurred.

Name Cause of error ERR_ALRDYCNT The interrupt variable is already connected to a TRAP routine ERR_ARGDUPCND More than one present conditional argument for the same parameter ERR_ARGNAME Argument is expression, not present or of type switch when executing ArgName ERR_ARGNOTPER Argument is not a persistent reference ERR_ARGNOTVAR Argument is not a variable reference ERR_AXIS_ACT Axis is not active ERR_AXIS_IND Axis is not independent ERR_AXIS_MOVING Axis is moving ERR_AXIS_PAR Parameter axis in instruction TestSign and SetCurrRef is wrong. ERR_CALLIO_INTER If an IOEnable or IODisable request is interrupted by another request to the same unit ERR_CALLPROC Procedure call error (not procedure) at runtime (late binding) ERR_CNTNOTVAR CONNECT target is not a variable reference

ERR_CNV_NOT_ACT The conveyor is not activated.

ERR_CNV_CONNECT The WaitWobj instruction is already active.

ERR_CNV_DROPPED The object that the instruction WaitWobj was waiting for has been dropped.

ERR_DEV_MAXTIME Timeout when executing a ReadBin, ReadNum or a ReadStr instruction ERR_DIVZERO Division by zero ERR_EXCRTYMAX Max. number of retries exceeded ERR_EXECPHR An attempt was made to execute an instruction using a place holder ERR_FILEACC A file is accessed incorrectly ERR_FILEOPEN A file cannot be opened ERR_FILNOTFND File not found ERR_FNCNORET No return value ERR_ILLDIM Incorrect array dimension ERR_ILLQUAT Attempt to use illegal orientation (quaternion) valve ERR_ILLRAISE Error number in RAISE out of range