Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 1373

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

■Input data
Operand: (s1)
Device
Symbol
Name
+0
n
Number of
inputs
+1
E1
Input value 1
+2
+3
E2
Input value 2
+4
+2n-1
En
Input value n
+2n
■Block memory
Operand: (d1)
Device
Symbol
Name
+0
BW
Output value
+1
■Operation constant
Operand: (s2)
Device
Symbol
Name
+0
n
Number of
coefficients
+1
K1
Coefficient 1
+2
+3
K2
Coefficient 2
+4
+2n-1
Kn
Coefficient n
+2n
+2n+1
B
Bias
+2n+2
Processing details
This instruction performs subtraction of the data of input values (E1 to En) with a coefficient.
The S.SUB instruction performs the following operations.
BW=(K1E1)-(K2E2)...-(KnEn)+B
When the number of inputs (n) is 0, the output value (BW) becomes bias (B).
Operation error
Error code
3402H
3403H
3405H
Recommended range
0 to 5
-999999 to 999999
Recommended range
-999999 to 999999
Recommended range
0 to 5
-999999 to 999999
-999999 to 999999
Error content
The value specified by (s1) or (s2) is a subnormal number or NaN (not a number).
An overflow has occurred.
The number of inputs (n) is less than 0 or greater than 5.
The number of coefficients (n) is less than 0 or greater than 5.
Data type
Standard
value
16-bit unsigned
binary
Single-precision
real number
Data type
Standard
value
Single-precision
real number
Data type
Standard
value
16-bit unsigned
0
binary
Single-precision
1.0
real number
Single-precision
0.0
real number
11 PROCESS CONTROL INSTRUCTIONS
11.5 Arithmetic Operation Instructions
Set by
User
User
11
Set by
System
Set by
User
User
User
1371

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents