(1) Logic AND Instruction: The WAND(D)/WAND(P) instruction is numbered FNC26. It performs a bitwise AND operation between two source operands and stores the result in the specified destination. This is commonly used for masking or filtering bit patterns.
(2) Logic OR Instruction: The WOR(D)/WOR(P) instruction is numbered FNC27. It executes a bitwise OR operation on two source operands and writes the result to the target component. For example, when X1 is active, (D10) ∨ (D12) → (D14), as shown in Figure 4-48.
(3) Logical XOR Instruction: The WXOR(D)/WXOR(P) instruction is numbered FNC28. It performs a bitwise XOR operation on the source operands, which is useful for toggling bits or detecting differences between two values.
(4) Negation Command: The NEG(D)/NEG(P) instruction is numbered FNC29. It inverts the bits of the value in the specified register and adds 1, effectively converting a positive number into its negative equivalent. The result is stored back into the same register.
The application of these logical instructions is illustrated in Figure 1.
Figure 1: Usage of Logical Operation Instructions
When using logic instructions, consider the following points:
1) For WAND, WOR, and WXOR instructions, both [S1.] and [S2.] can be any data type, while the target operand can be KnY, KnM, KnS, T, C, D, V, or Z.
2) The NEG instruction only has a single operand, which can also be KnY, KnM, KnS, T, C, D, V, or Z.
3) The 16-bit versions of WAND, WOR, and WXOR require 7 program steps, while the 32-bit versions take 13 steps. The NEG instruction uses 3 steps for 16-bit and 5 steps for 32-bit operations.
These instructions are essential in PLC programming for manipulating digital signals and performing complex logical operations efficiently.
About Bare Copper Wire |
Good conductivity; Strong anticorrosion; Long service life; Lowest price; Easy installation
Bare Copper Wire is used as flexible connector in electric transmission and distribution appliance(such as volt transformer, electric
stove),electronic equipment and thyristor. Underground Electrical Wire also could be used for grounding wire in electric working.
Also, it can be manufactured accordingto customer's drawings and demands.
1. | Professional Operation Experience |
2. | The Sizes All Can Be Customised |
3. | Sample For Your Reference Available |
4. | Low MOQ, Low Price |
5. | Safe Packing & Prompt Delivery |
6. | Quality Guaranted: ISO9001:2008, All Kinds of Test |
Bare Copper Wire,Bare Copper Wire Solid,Copper Wire Bare Copper Wire,Pure Copper Wire Bare Copper
HENAN HUAYANG ELECTRICAL TECHNOLOGY GROUP CO.,LTD , https://www.huaonwire.com