Starter

FX3U to Q002H

4 posts in this topic

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

ScreenHunter_385 Sep. 12 10.48.jpg

Edited by Starter

Share this post


Link to post
Share on other sites

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:

 

decmp.png

Edited by kaare_t
Edit: Corrected screenshot

Share this post


Link to post
Share on other sites

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now