Mitsubishi Electronics Q173CPU(N) ユーザーズマニュアル

ページ / 472
 
 
 
7 - 10 
7   OPERATION CONTROL PROGRAMS  
 
F/FS G 
 
 
7.4 Binary Operations  
7.4.1 Substitution : =  
Format 
(D)=(S) 
 
Number of basic steps 
 
[Usable data] 
 
Usable Data 
Word device 
Constant 
Setting 
data 
Bit device 
16-bit 
integer 
type 
32-bit 
integer 
type (L) 
64-bit 
floating 
point  
type (F) 
Coasting 
timer 
16-bit 
integer 
type (K/H) 
32-bit 
integer type 
(K/H, L) 
64-bit 
floating 
point  
type (K) 
Calculation 
expression 
Bit 
conditional 
expression
Comparison 
conditional 
expression 
(S) — 
 
 
 
 
 
 
 
 
— — 
(D) — 
 
 
 
— — — — — — — 
 : Usable 
 
[Setting data] 
 
Setting data 
Description 
Data type of result 
(S) 
Word device/constant/calculation expression to be 
substituted 
(D) 
Word device which will store the operation result  
Data type of (D)  
 
[Functions] 
(1)   The data value specified with (S) is substituted to the specified word device at (D).  
 
(2)   When (S) and (D) differ in data type, the data at (S) is converted into the data type 
of (D) and the resultant data is substituted.  
(When (D) is a 16- or 32-bit integer type and (S) is a 64-bit floating-point type, the 
fraction part of (S) is discarded.)  
 
[Errors] 
(1)   An operation error will occur if:  
•  The data at (S) is outside the data type range of (D); or  
•  (D) or (S) is an indirectly specified device and its device No. is outside the 
range.  
 
[Program examples] 
(1)   Program which substitutes the D0 value to #0  
 
#0 = D0 
 
#0
123
D0
123