4.11
Bit Device Controls
Device set: SET
Format
SET(D)=(S)
Setting data
■Usable Data
: Usable
Setting
Usable Data
data
Bit
Word device
device
16-bit
integer
type
(D)
(S)
■Description, data type of result
Setting data
Description
(D)
Bit data for device set
(S)
Condition data which determines whether device set will be performed or not
Processing details
• If the data specified with (S) is true, the bit data specified with (D) is set.
• (S) can be omitted. At this time, the format is "SET(D)" and device set is made unconditionally.
• When this instruction is set as a transition condition in the last block of a transition program, whether the data specified with
(S) is true or false is returned as logical type data. In this case, (S) cannot be omitted.
Operation error
An operation error will occur if:
• (D) or (S) is an indirectly specified device and its device No. is outside the range.
Program example
■Program which sets M100 when either of M0 and X0 is 1
SET M100 = M0 + X0
M100
1
■Program which sets M100 when #0 is equal to D0
SET M100 = #0 == D0
M100
1
■Program which sets Y0 unconditionally
SET Y0
Y0
1
Number of basic steps
8
Constant
32-bit
64-bit
16-bit
integer
floating
integer
type (L)
point
type
type (F)
(K/H)
M0
0
+
(True)
X0
1
#0
100
==
(True)
D0
100
Usable steps
F/FS
Calculation
expression
32-bit
64-bit
integer
floating
type
point
(K/H, L)
type (K)
4 OPERATION CONTROL PROGRAMS
G
Bit
Comparison
conditional
conditional
expression
expression
Data type of result
Bit logical type (true/false)
179
4.11 Bit Device Controls
4