4. Motion Control Instructions 4.6.27. CMP_DI Explanation of the instruction: CMP-DI is used for comparison of two 32-bit signed integers with the result value displayed in one of the three output bit devices. When EN is On, compare S1 less than or greater than, or equal to S2 with the result placed in the corresponding LT, GT or EQ. When EN is Off, the status of the bit device where the comparison result is placed will keep unchanged. Explanation of input and output parameter of the instruction: DVP-MC operating manual 4-131 API Comparison of 32-bit integers Controller CMP DI 154 _ 10MC11T Parameter Data Available Explanation name type device EN “CMP DI” is executed as “EN” turns on.
_ BOOL M,I,Q, constant S1 The compared value 1 DINT Constant S2 The compared value 2 DINT Constant LT “LT” turns on as the operand S1 is less than the operand S2. BOOL M,Q GT “GT” turns on as the operand S1 is greater than the operand S2. BOOL M,Q EQ “EQ” turns on as the operand S1 is equal to the operand S2. BOOL M,Q