Cancel
Showing results for 
Search instead for 
Did you mean: 

Simtalk time

Pioneer
Pioneer

Hello, I would like to give an order five minutes before the finishing of the end of the shift (all days). How can I do it?

1 REPLY

Re: Simtalk time

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello Santiago94,

You can add an observer to the shift calendar object for the attribute 'unplanned' and use the following code in the observer method:

(attribute: string; oldValue: any)
is
do
	if ?.unplanned = false then
		ref(MyMethod).methcall(str_to_time("7:55:0"));
	end;
end;

This will call the method 'MyMethod' 7 hours and 55 minutes after the shift has started. Assuming a 8 hour shift this is 5 minutes before the shift will end.

 

Regards,

Ralf
------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.