EasyManua.ls Logo

FATEK FBs-CB5 - Page 153

FATEK FBs-CB5
348 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Basic Function Instruction
6-28
FUN 13 D P
(*)
MULTIPLICATION
(Performs multiplication of the data specified at Sa and Sb and stores the result in D)
FUN 13 D P
(*)
Symbol
Operand
Sa: Multiplicand
Sb: Multiplier
D : Destination register to store the
results of the multiplication.
Sa, Sb, D may combine with V, Z,
P0~P9 to serve indirect addressing
WX WY WM WS TMR CTR HR IR OR SR ROR DR K XR
Range
Ope-
rand
WX0
∣
WX240
WY0
∣
WY240
WM0
∣
WM1896
WS0
∣
WS984
T0
∣
T255
C0
∣
C255
R0
∣
R3839
R3840
∣
R3903
R3904
∣
R3967
R3968
∣
R4167
R5000
∣
R8071
D0
∣
D4095
16/32-bit
+/− number
V、Z
P0~P9
Sa ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○
Sb ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○
D ○ ○ ○ ○ ○ ○ ○ ○* ○* ○ ○
Description
● Performs the multiplication of the data specified at Sa and Sb and writes the results to a specified register
D when the multiplication control input "EN" =1 or "EN↑" ( P instruction) from 0 to 1. If the product of
multiplication is equal to 0 then set FO0 to 1. If the product is a negative number, then set FO1 to 1.
Example 1 16-bit multiplication
Ladder Diagram Key Operations Mnemonic Codes
X0
EN
R
R
R
0
1
2
13P.(*)
D=0
D<0
U/S
Sa :
Sb :
D :
ORG
ORG X 0
FUN 13P
Sa: R 0
Sb: R 1
D: R 2
R0
Sa
12345
Multiplicand
R1
× Sb
4567
Multiplier
R3 R2
D
56379615
Product