EasyManua.ls Logo

Mitsubishi Electric MELSEC iQ-R Series - Page 1893

Mitsubishi Electric MELSEC iQ-R Series
2110 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
25 TYPE CONVERSION FUNCTIONS
25.68 Copying the Specified Bit of the Word Label
1891
25
Precautions
When using CPY_BIT_OF_INT(_E) in ST, create a program which assigns the return value to a variable.
The return value of CPY_BIT_OF_INT(_E) also works as input/output. Do not directly assign it to the input argument of
another instruction, function, or function block.
Operation error
There is no operation error.
By using the bit specification of labels, a concise program having the same operation as CPY_BIT_OF_INT
can be created.
The following example changes the value in bit 3 (b3) of g_int2 to the value of bit 5 (b5) of g_int1 the same as
when CPY_BIT_OF_INT is used.
Ladder
ST
g_int2.3 := g_int1.5;
FBD/LD
//The return value of CPY_BIT_OF_INT is assigned to a variable and used.
g_int2 := CPY_BIT_OF_INT(g_int1,5,3);
g_bool1 := GET_BIT_OF_INT(g_int2,3);
//In the following program, the value of the first argument of GET_BIT_OF_INT is undefined.
g_bool1 := GET_BIT_OF_INT( CPY_BIT_OF_INT(g_int1,5,3), 3);

Table of Contents

Other manuals for Mitsubishi Electric MELSEC iQ-R Series

Related product manuals