4 OPERATION CONTROL PROGRAMS
4.11 Bit Device Controls
179
4
4.11 Bit Device Controls
Device set: SET
■Usable Data
: Usable
■Description, data type of result
• 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.
An operation error will occur if:
• (D) or (S) is an indirectly specified device and its device No. is outside the range.
■Program which sets M100 when either of M0 and X0 is 1
■Program which sets M100 when #0 is equal to D0
■Program which sets Y0 unconditionally
Format Number of basic steps Usable steps
F/FS G
SET(D)=(S) 8
Setting
data
Usable Data
Bit
device
Word device Constant Calculation
expression
Bit
conditional
expression
Comparison
conditional
expression
16-bit
integer
type
32-bit
integer
type (L)
64-bit
floating
point
type (F)
16-bit
integer
type
(K/H)
32-bit
integer
type
(K/H, L)
64-bit
floating
point
type (K)
(D)
(S)
Setting data Description Data type of result
(D) Bit data for device set Bit logical type (true/false)
(S) Condition data which determines whether device set will be performed or not
SET M100 = M0 + X0
M100 +1
0
X0 1
M0
(True)
M100 ==1
100
100
SET M100 = #0 == D0
#0
D0
(True)