Rolf_Inge

What happens here? L06 / Gxworks 2

13 posts in this topic

Hello
I am at a loss here. There is something happening with TON_2 that also affects the variable STEG. Even though the input to TON_2 is false, IN and Q are true. Suddenly IN and Q turn false, and at the same time variable STEG makes a jump from 3 to 4, even though criteria for this step is not confirmed.
Have had to override this fault by introducing a SR-latch and outside of block make a comparison between NIVÅ_FÖRRÅDS_KÄRL and 150.0
By the way, TON_2 is not declared globally.

Would be very happy for suggestions and pointers.

Cheers // DAN

PE2 Jump.avi

PE1 Jump.avi

Share this post


Link to post
Share on other sites

I think need investigate why "OMR_TIMER" bit didn't SET. May by you use this bit somewhere else with RST (not only after TON_2) or memory area overlapping. Advice use before SET/RST PLC_M instruction.

Edited by Clear.Mind
1 person likes this

Share this post


Link to post
Share on other sites

Thank you for replying.
This is What happened before this video: OMR_TIMER was high and TON_2 timer ran, ran out and reset bit OMR_TIMER. So question is why TON_2: IN and Q stayed true even though bit OMR_TIMER was reset.
I agree with you regarding the overlapping memory area. Do you know where i can find out if and what is overlapping? What do you mean with PLC_M? That i use specific memory area?
As mentioned i am using GX Works 2.

Cheers //

Edited by Rolf_Inge

Share this post


Link to post
Share on other sites
1 hour ago, Rolf_Inge said:

What do you mean with PLC_M?

This mean pulse command with High front after EQ Stage  3=3 for SET OMR_TIMER  once. Sorry, I have mistaken, i wanted to write PLS_M or R_TRIG (Rising edge detector).

Yes TON_2 ran, but i guess it had been restarted, because while EQ Stage 3=3 is TRUE  OMR_TIMER  will SET. On your video  EQ Stage 3=3 is TRUE, but OMR_TIMER is false, So i think it can be RST on next steps. 

Edited by Clear.Mind

Share this post


Link to post
Share on other sites

I agree with @Clear.Mind:
Use a "PLS_M" instruction after your STEG-EQ blocks (after STEG=3 and before RST and SET instructions). Do that for all your EQ blocks regarding transition steps to avoid SET/RST problems. After all you are programming SET/RST sequences which normally leads to only setting or resetting once, then continuing the process.

Please see attached picture where you should insert PLS_M instructions.

pls_m.png

Share this post


Link to post
Share on other sites

Hello, Thanks for the input @kaare_t and @Clear.Mind, here comes the output :)
# I see now why i should include the rising edge detector here. But what's the difference between PLS and PLS_M? GX Works 2 help is silent on this matter.
# As to the last issue. How the sequence can jump from STEG=3 to STEG=4 without NIVÅ_FÖRRÅDS_KÄRL < NIVÅ_FÖRRÅDS_KÄRL_TOMT ? As mentioned there seems to be a correlation between IN and Q on TON_2 turning false and STEG turning 4, skipping over the criteria LESSTHAN.

Cheers // DA

STEG hopp.PNG

Share this post


Link to post
Share on other sites
Just now, Rolf_Inge said:

But what's the difference between PLS and PLS_M?

They are the same, only PLS_M comes from the old GX IEC (I tend to remember the old things). In GW2 you use PLS so no problem.

Just now, Rolf_Inge said:

How the sequence can jump from STEG=3 to STEG=4 without NIVÅ_FÖRRÅDS_KÄRL < NIVÅ_FÖRRÅDS_KÄRL_TOMT ?

My guess is that there is a short drop in NIVÅ_FÖRRÅDS_KÄRL that causes this to validate to TRUE. You can check this by inserting a "MINIMUM" instruction in a ladder rung above, giving input NIVÅ_FÖRRÅDS_KÄRL and then the second input equals the output of that instruction. That way you will have a "lowest possible value" trigger. Just remember to set the "testOut" to a high value before initiating the sequence to make sure that the lowest measured value is the NIVÅ_FÖRRÅDS_KÄRL.

minimum.png

Share this post


Link to post
Share on other sites

Once again, tack för hjälpen.
Unstable signal was my first guess, but at the time seemed so unlikely. Now it's back on the menu :) Changed the program to this:

Ps. Any nice lowpass-filter in gxworks2? Ds.

Poly_1_NEW.PNG

Share this post


Link to post
Share on other sites
18 hours ago, Rolf_Inge said:

Ps. Any nice lowpass-filter in gxworks2?

I don't think there's any built-in filters but you could create an average filter by adding data and dividing by the sum, either add data time-based or count-based.

1 person likes this

Share this post


Link to post
Share on other sites
2 hours ago, kaare_t said:

I don't think there's any built-in filters but you could create an average filter by adding data and dividing by the sum, either add data time-based or count-based.

Hi ...
I developed Fitst-Order-filter (first-order lag filter) http://my.execpc.com/~steidl/robotics/first_order_lag_filter , both and other effective filter. It was written gracefully and worked perfectly. However, Mitsubishi Electric kills everything I do! 
The present time is a time of slow-witted managers and programmers who have acquired skills in the parish school.  Last releases of GX Works does not IEC compatible anymore...

P.S. Kaare, I received and read your letter and will respond shortly.
 

1 person likes this

Share this post


Link to post
Share on other sites

Thanks @Inntele. Will put your excellently simple function to use.

Cheers // DAN

Edited by Rolf_Inge

Share this post


Link to post
Share on other sites
9 hours ago, Rolf_Inge said:

Thanks @Inntele. Will put your excellently simple function to use.

Cheers // DAN

Hi Rolf,

Now I haven't FBs because of my old hard drive was attacked at a low level ... If it's interesting for you, I can share with you a technique of programming of such filters in PLCs, because there is some difference between computer calculations and calculations in PLC.

Cheers

Share this post


Link to post
Share on other sites

Hey Inntele. I am definetely interested in this technique. Always nice to learn.

Cheers //

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