GE GFK-0804B Universal Remote User Manual


 
4
4-29GFK-0804B Chapter 4 The Micro PLC Instruction Set
Using Division and Multiplication Functions Together
If a Multiplication produces a result that is too large to use easily (the results are greater
than 65535, and occupy two registers), you can divide the Multiplication result to scale
the result to use smaller numbers.
For example:
x
=
Multiply:
R100 R101 R102 R103
1000
1000
00015 16960
= 15*65536 + 16960 = 1,000,00
0
=
Divide:
R104 R105 R106
1000
01000 00000
R102 R103
00015 16960
/
1,000,000 / 1000 = 1000 with no remainder
46137
In this example, R105 would contain the whole number result of the division, and R106
would contain the remainder.
Programming Software Instructions
1. Select Math/Move (F5).
2. Select /DIV (F4) from the Math/Move function keys.
3. First, enter the number to be divided. This can be either a constant, or a two-register
location that will contain the number to be added. For example: R001 above
represents the two-register location R001 and R002. Press the Enter key.
4. Enter the number to divide by. This can also be a constant or a one-register location.
Press the Enter key.
5. Enter the first register of a two register location to contain the result. For example,
if you entered R004 as shown above, the result of the division would be be located in
R004 and R005. Press the Enter key.