Posted 12 Sep 2017 (edited) Hello, First I want to introduce myself... I am beginner in programming PLC's. Just starting 4 weeks ago....and 61 years old. So, please have a little patience with me. I have a FX3U PLC and last summer it is broken. I've got a second hand Q002H PLC and I try to translate the program to this PLC. Right now I'm stuck with the following: The Q002H CPU does not recognize the DECMP function. (See screenshot) What function do I need in the Q002H CPU? Is there anybody who can help me? I use GXWorks2. Alarm = Var_Input (bit) Basis_1 = Var_Input (Float (Single Precision) Basis_min = Var_Input (Float (Single Precision) B_Error = Var Bit(0..2) Thanks for all the help Edited 12 Sep 2017 by Starter Share this post Link to post Share on other sites
Posted 13 Sep 2017 (edited) Hello, and welcome! The DECMP instruction does not exist in the Q-series, but you can get around this by simply writing your own comparison. The DECMP is easy, it has two REAL inputs for comparison. It has an array of three BIT outputs which indicates "Below", "Equal" or "Above". So in your case, if "Basis_1" is above "Basis_Min" then "B_Error" (bit 0) will go high. If they are equal, "B_Error" (bit1) will go high, if below then "B_Error" (bit2) will go high. Here's a screenshot of the exact same function: Edited 13 Sep 2017 by kaare_t Edit: Corrected screenshot Share this post Link to post Share on other sites
Posted 13 Sep 2017 Hello Kaare_T, Thanks for the clear description and the example. It's clear for me, I implemented, tested and it works. (every day I learn a little bit) Thanks for the help Share this post Link to post Share on other sites