Posted 26 Nov 2016 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
Posted 26 Nov 2016 (edited) 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 26 Nov 2016 by Clear.Mind 1 person likes this Share this post Link to post Share on other sites
Posted 26 Nov 2016 (edited) 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 26 Nov 2016 by Rolf_Inge Share this post Link to post Share on other sites
Posted 26 Nov 2016 (edited) 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 26 Nov 2016 by Clear.Mind Share this post Link to post Share on other sites
Posted 28 Nov 2016 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. Share this post Link to post Share on other sites
Posted 28 Nov 2016 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 Share this post Link to post Share on other sites
Posted 28 Nov 2016 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. Share this post Link to post Share on other sites
Posted 28 Nov 2016 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. Share this post Link to post Share on other sites
Posted 29 Nov 2016 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
Posted 29 Nov 2016 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
Posted 29 Nov 2016 (edited) Thanks @Inntele. Will put your excellently simple function to use. Cheers // DAN Edited 29 Nov 2016 by Rolf_Inge Share this post Link to post Share on other sites
Posted 30 Nov 2016 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
Posted 30 Nov 2016 Hey Inntele. I am definetely interested in this technique. Always nice to learn. Cheers // Share this post Link to post Share on other sites