Show/Hide Toolbars

Presse universelle MecaMotion par 

"Assignment" instruction

This instruction is used to assign a value to a user variable.

ProgrammerAffectation english

Figure 1: Example of using an assignment in the part-program

Below is a list of the instruction's input and output parameters:

Parameter name

Declaration

Type of data

Default value

Description

Variable to be assigned

Output

REAL, LREAL, INT or DINT

--

Variable to be assigned

Assignment value

Input

REAL, LREAL, INT or DINT

0

Assignment value (variable or constant)

Table 1: List of instruction parameters

The user variable formats that can be assigned are as follows:

INT (16 bits)

DINT (32 bits)

REAL (32 bits floating)

LREAL (64 bits floating)

As shown in figure 2, you can assign a variable from one format to a variable from another format.

ProgrammerAffectation2 english

Figure 2: Assigning an INT variable to a LREAL variable