BASIN
BASIN, BASINP
BASIN instruction computes the arc sine of source (BCD) and saves the result in the Destination.
(It supports only in XP and PLC-S CPU series)
| |
S | BCD Source |
D | Destination in BCD |
Instruction | Device address | No. of Steps | Flag | |||||||||||||||
M | X | Y | K | L | F | T | C | S | Z | D | @D | Int. |
| Error | Zero | Carry | ||
BASIN BASINP | S | o | o | o | o | o | - | - | - | - | o | o | o | o | 3 | o | - | - |
D | o | - | o | o | o | - | - | - | - | o | o | o | o |
When enabled, the BASIN instruction computes the arc sine of the BCD value and saves the result in Destination.
S sets to 0 when its value is positive number(+). D sets to 1 when its value is negative number(-).
S+1 (Integer part) and S+2 (Decimal point) are the BCD value and their range is from 0 to 1.0000.
D is the BCD value and its range is 0-90° and 270-360°.
The fraction (decimal point) is rounded off the numbers to five decimal places. Therefore, the 4 decimal place has tolerance of 1.
Example)
If M00 is ON, the MOV instruction copies H1234 to the D102.
The BASIN calculates the arc sine of +0.1234 (D100, D101 and D102) and saves the result in the D200 (in BCD).