Hi guys,
I have a basic problem...when the start relay is activated...I want my derived function block to load a set of values to an array "InitialArray"....the values of that array will then be sent through a process and come out different on the other side and then they would be loaded to a new array...lets call it "FreshArray".
My problem is this...I want the values from that "FreshArray" to be loaded back into the "InitialArray" to eventually optimize the values.
This is what I've tried so far.
If (NextRound) THEN
InitialArray:= FreshArray;
ELSIF
InitialArray:=InitialParamters;
END_IF;
Problem is...while this does work..a second later the new values are overwritten by the initializing values..
So how do I make it OR? A OR B?
This is on a M340 Schneider PLC.
Thanks in advance.
I have a basic problem...when the start relay is activated...I want my derived function block to load a set of values to an array "InitialArray"....the values of that array will then be sent through a process and come out different on the other side and then they would be loaded to a new array...lets call it "FreshArray".
My problem is this...I want the values from that "FreshArray" to be loaded back into the "InitialArray" to eventually optimize the values.
This is what I've tried so far.
If (NextRound) THEN
InitialArray:= FreshArray;
ELSIF
InitialArray:=InitialParamters;
END_IF;
Problem is...while this does work..a second later the new values are overwritten by the initializing values..
So how do I make it OR? A OR B?
This is on a M340 Schneider PLC.
Thanks in advance.