S7-200 series PLC compare instruction


      SIEMENS S7-200 programming software in the STEP-7, a special compare instruction: IN1 and IN2 to compare the two data types can be B, I (W), D, R, that is, byte, word, integer, double word integers and real numbers; you can also have other comparative:>, <, ≥, ≤, , and so on. When the comparison satisfies the equation, then the contact is closed.

     LMODSOFT control and instruction: in LMODSOFT, there is no direct comparison of the number of instructions, but SUB instruction can be achieved by an integer comparison function three state output of the subtraction function after it.
If corresponds LMODSOFT the SUB instruction, should be in the STEP-7 instruction in three comparisons:> =, <, respectively corresponding to the three output SUB instruction; even if the corresponding ≥, ≤, or <>, according to different combinations of three outputs SUB instruction, may find the corresponding comparison instruction.

                                 For example: ① (30007)> (40030)
② (30007) = (40030)
③ (30007) <(40030)
① + ② (30007) ≥
② + ③ (30007) ≤ (40030)
① + ③ (30007) (40030)