MAHER Member M Join Date Jul 2007 Location CAIRO Posts 82 Oct 4, 2014 #1 Dear All, i need your help in the below issue please: i have a a variable value i need by using scl language to detect any changing in it according to the previous scan. could you provide me by your ideas please. thanks in advance. Maher
Dear All, i need your help in the below issue please: i have a a variable value i need by using scl language to detect any changing in it according to the previous scan. could you provide me by your ideas please. thanks in advance. Maher
cjd1965 Lifetime Supporting Member C Join Date Apr 2007 Location UK Posts 1,659 Oct 4, 2014 #2 You need add a memory variable and compare the value now to the memory. If different do some action and then copy now value to the memory variable
You need add a memory variable and compare the value now to the memory. If different do some action and then copy now value to the memory variable
MAHER Member OP M Join Date Jul 2007 Location CAIRO Posts 82 Oct 4, 2014 #3 cjd1965 said: You need add a memory variable and compare the value now to the memory. If different do some action and then copy now value to the memory variable Click to expand... thanks a lot for your fast response, could you clarify it more please. Maher
cjd1965 said: You need add a memory variable and compare the value now to the memory. If different do some action and then copy now value to the memory variable Click to expand... thanks a lot for your fast response, could you clarify it more please. Maher
nehpets Member Join Date Mar 2009 Location Wales Posts 496 Oct 5, 2014 #4 This is very generic and the syntax is Allen Bradly if variable <> mem_variable then output := 1; mem_variable := variable; else output := 0; end_if; I'm not sure if this is what you are after? Steve
This is very generic and the syntax is Allen Bradly if variable <> mem_variable then output := 1; mem_variable := variable; else output := 0; end_if; I'm not sure if this is what you are after? Steve
MAHER Member OP M Join Date Jul 2007 Location CAIRO Posts 82 Oct 5, 2014 #5 nehpets said: This is very generic and the syntax is Allen Bradly if variable <> mem_variable then output := 1; mem_variable := variable; else output := 0; end_if; I'm not sure if this is what you are after? Steve Click to expand... i tried this syntax but this is not working i know it should work but it is not working well. i don't why thanks in advance. Maher
nehpets said: This is very generic and the syntax is Allen Bradly if variable <> mem_variable then output := 1; mem_variable := variable; else output := 0; end_if; I'm not sure if this is what you are after? Steve Click to expand... i tried this syntax but this is not working i know it should work but it is not working well. i don't why thanks in advance. Maher
nehpets Member Join Date Mar 2009 Location Wales Posts 496 Oct 5, 2014 #6 it would help if you let us know which PLC or platform you are using, we could then work out the correct statement syntax. Steve
it would help if you let us know which PLC or platform you are using, we could then work out the correct statement syntax. Steve
MAHER Member OP M Join Date Jul 2007 Location CAIRO Posts 82 Oct 5, 2014 #7 thanks you very much i realized where was my troubles, because i am making detection for the time ( sec ) so the variation was created every sec so i got from the block a pulse. thanks you very much. Maher
thanks you very much i realized where was my troubles, because i am making detection for the time ( sec ) so the variation was created every sec so i got from the block a pulse. thanks you very much. Maher