7 OPERATION CONTROL PROGRAMS
7.5 Bit Operations
7.5.1 Bit inversion (Complement) : ˜
Format
[Usable data]
Setting
16-bit
data
Bit device
integer
type
(S)
—
[Setting data]
Setting data
[Functions]
[Errors]
[Program examples]
˜
(S)
Word device
64-bit
32-bit
floating
integer
point
type (L)
type (F)
—
(S)
Data whose bits will be inverted
(1) The bit inverted value of the data specified with (S) is found.
(1) An operation error will occur if:
• (S) is an indirectly specified device and its device No. is outside the range.
(1) Program which finds the bit inverted value of #0 and substitutes the value to D0
˜
D0 =
#0
b15
D0
1 1 0 1 1 0 1 0 1 1 0 0 1 0 1 1
Usable Data
Constant
16-bit
32-bit
Coasting
integer
integer type
timer
type (K/H)
(K/H, L)
Description
b0
#0
7 - 18
F/FS
Number of basic steps
64-bit
Calculation
conditional
floating
expression
expression
point
type (K)
—
Data type of result
Data type of (S)
(Integer type)
b15
b0
0 0 1 0 0 1 0 1 0 0 1 1 0 1 0 0
G
2
Bit
Comparison
conditional
expression
—
—
: Usable