Hi everyone, its the first time I enter to this forum (sorry for the bad english), recently I start to work with ignition designer, and when I was working I got stuck i my project I have a display with an initial value of 189 (tag already created) its my TakTime, then with the help of a timer I start decrasing the value by 1 every second going into 0 an then into negative numbers, and finally I have a Reset button that set the value of the display TakTime to 189 again.
Then when the TakTime display go into negative the Summation start counting every negative number
the problem is that I want the Summation display to keep the count of every time the TakTime display goes into negative numbers every cycle with the reset button, Right now every time I start a new cycle and the TakTime goes to negative, the summation display start from 1 again and not the cuont from the past cycle
It would help if you showed the expression or logic that you are using for the summation.
Yeah thats the problem, I still dont know enough about scrip, so yeah about the logic for the summation I still dont have any idea about how to do it, right now I only have and if, to show in the display the numbers when the TakTime goes negative
you need to have some memory of the previous value in summation and adding that to the surent value. in your binding you just invert the actual value of taktime without taking the already set value in summation.
when reset is press I would put the actual value of summation in a memory tag and just add in my expression.
if (taktime <0, memSummation + (taktime*-1),memSummation)
@Juan_Galvez, Tip: use the </> code formatting button to preserve code indentation and apply syntax highlighting. It's essential for Python and makes any code much easier to read. It also means we can copy it into our answers without having to type it all out again.
Post an image if you need to show context.
Thanks i would investigate about the memory tag, i think this is what i need
Thanks I never try python, i would start investigate about some courses online to start learning
memSummation - takTime
Of course it's the same we will say it was late in the evening yesterday
Thanks for the feedback @pascal.fragnoud