Artz

Logic using SET/RESET

4 posts in this topic

Hi

Apologies in advance, this is probably something very much asked in forums, but my mind does not get why this issue is happening.

My variable: ERROR_LECTURA_REF_OVERVOLT[1] is not reset whenever my Temp_ten_ref_o_1_h TON output reachs the coil on the '203' rung. But instead making use of BTN_HMI_ADV_VOLT_READ_OK variable works right.

Why is this?

State 1 :

img]fY71NS9.png

State 2: Setting a high value for LECTURA_REF_LTS_OUT triggers the coil

WimqdAD.png

State 3: Rung '203' TON Q output reachs the coil ERROR_LECTURA_REF_OVERVOLT[1], this variable state stays active until I set down LECTURA_REF_LTS_OUT value on rung '66'

RWsqUAI.png

State 4: ERROR_LECTURA_REF_OVERVOLT[1] is not reset despite the coil at rung '66' is not active (Why?)

A7e48YJ.png

State 5: Input BTN_HMI_ADV_VOLT_READ_OK is set to true and once is false ERROR_LECTURA_REF_OVERVOLT[1] is reset

Fx9S7H8.png

Final state (state1):

fY71NS9.png

Share this post


Link to post
Share on other sites

Are you able to share the project?

Share this post


Link to post
Share on other sites

It worked... I knew nothing about that "race condition" it's something I could not learn about unless I experience it, I must be careful with this issue in the future. I owe you one, thanks a lot!

Share this post


Link to post
Share on other sites
18 minutes ago, photovoltaic said:

Are you able to share the project?

I cannot it's part of my company politics I work for.

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