changing value

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
 
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
 
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

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
 
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
 

Similar Topics

Hi, greetings from Culiacán Sinaloa México :D I'm new to the PLC world; I recently purchased an analog input module 1762-IF4 because the analog...
5
Replies
2,159
Views
Hi All, I am currently at the beginning of a new project for writing a PLC program (using CCW) for an old sugar centrifugal. Most of our...
3
Replies
3,136
Views
Hello All I am new to the forum and also to the world of PLCs. I would like to have your expert advice, If I can change the floating point value...
15
Replies
8,497
Views
Hello What would be the best way to write a value into "Source B" of a GEQ SLC500 PLC instruction from Wonderware? I would like the operator to...
2
Replies
2,578
Views
I am new to this line of work so please excuse me if this is extremely simple. I have also Searched the forums and web for answeres and am getting...
1
Replies
2,415
Views
Top