AH Motion Controller – Motion Control Instructions Manual Programming Example This example uses DFB_CmpOutRst to monitor and reset the comparison results activated by DFB_Compare which compares the counting value of channel 1 (AC04) with the specified value 1000( CmpValue ) with the condition of “ ≧ ” ( CmpMode =1), and set Y0.8=ON when the comparison result is True. You can use DFB_CmpOutRst to monitor if M31 (Y0.8) is ON. If you want to reset the output state of Y0.8, set the corresponding input M22 ( CLR_Y0 08 ) to ON for clearing the output state of Y0.8. _3 1. Set M11( Enable ) to True to enable the counting on channel 1 . 2.
Set M2( OutputMode) to True and OutputDeivce =0 to specify the output operation of DFB_Compare when the comparison result is True: Set Y0.8=ON. 3. Set M1=ON to enable the comparator of number 0. 4. Use DFB_CmpOutRst to monitor if M31( CMP_Y0 08 ) =ON and Y0.8 is set to True when the count value in D14 is greater or equals to 1000. 5. Set M22( CLR_Y0 08 ) to True and M21( Enable ) to True to clear the output state of Y0.8 6. Confirm if Y0.8 is reset and M31( CMP_Y0 08 ) is False. 3-294