Wiki source code of DAND/32-bit Data Logic AND

Last modified by xingzhi lin on 2025/10/15 15:23

Show last authors
1 **DAND(P)**
2
3 Perform a logical AND operation on each bit of the BIN 32-bit data of the device specified in (s1) and the BIN 32-bit data of the device specified in (s2), and store the result in the device specified in (d).
4
5 -[DAND (s1) (s2)  (d)]
6
7 **Content, range and data type**
8
9 |**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
10 |(s1)|Store the data for logical AND operation or the device storing the data|-2147483648 to +2147483647|Signed BIN32|ANY32_S
11 |(s2)|Store the data for logical AND operation or the device storing the data|-2147483648 to +2147483647|Signed BIN32|ANY32_S
12 |(d)|Device for storing logic and result| |Signed BIN32|ANY32_S
13
14 **Device used**
15
16 |(% rowspan="2" %)**instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|(((
17 **Index**
18
19 **modification**
20 )))|(((
21 **Pulse**
22
23 **extension**
24 )))
25 |**X**|**Y**|**M**|**S**|**SM**|**T(bit)**|**C(bit)**|**LC(bit)**|**HSC(bit)**|**D.b**|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**LC**|**HSC**|**K**|**H**|**E**|**[D]**|**XXP**
26 |(% rowspan="3" %)DAND|Parameter 1| | | | | | | | | | |●|●|●|●|●|●|●|●|●|●|●|●|●| |●|●
27 |Parameter 2| | | | | | | | | | |●|●|●|●|●|●|●|●|●|●|●|●|●| |●|●
28 |Parameter 3| | | | | | | | | | | |●|●|●|●|●|●|●|●|●|●| | | |●|●
29
30 **Features**
31
32 Perform a logical AND operation on each bit of the BIN 32-bit data of the device specified in (s1) and the BIN 32-bit data of the device specified in (s2), and store the result in the device specified in (d).
33
34 (% style="text-align:center" %)
35 [[image:LX6.07 Basic instructions.6\.4.6\.4\.3 WOR16-bit Data Logical OR.WebHome@1760429459791-119.png]]
36
37
38 In the case of bit devices, bit devices after the number of points specified by the number of digits will be calculated as 0.
39
40 **Error code**
41
42 |**Error code**|**Content**
43 |4085H|The output results of (s1) and (s2) in the read application instruction exceed the device range
44 |4086H|The output result of (d) in the write application instruction exceeds the device range
45
46 **Example**
47
48 (% style="text-align:center" %)
49 [[image:1760430172949-443.png]]
50
51
52 When M0 is set, perform logical AND operation of (D1, D0) and (D3, D2), and store the value in (D5, D4), (D1, D0) ∧ (D3, D2) → (D5, D4) .