MKWare_ProcesstimeByPLC

This function block handles and transfers the process time, process status and the amount of parts in an output variable. It calculates the time in ms and multiplies it by 100. The amount is added to the last digits (max. 99). If the value was NOK, then the value is negative, otherwise it is positive.

VAR_INPUT
	Process_Start:       BOOL;       (* Start signal of the process *)
	Process_Stop:        BOOL;       (* Stop signal of the process *)
	OK:                  BOOL;       (* OK signal if the process was OK *)
	NOK:                 BOOL;       (* NOK signal if the process was NOK *)
	Cancel:              BOOL;       (* Signal for a canceled process *)
	ProductDesignation:  STRING;     (* Optional: product designation *)
	Amount:              DINT=1;     (* Amount of products *)
END_VAR
VAR_OUTPUT
	PTfromPLC_ProcessTimeAmountStatus:   DINT;      (* Output to MK|Ware: Combined number for process time, amount and status of the product *)
	PTfromPLC_Cancel:                    BOOL;      (* Output to MK|Ware: signals a canceled process *)
	PTfromPLC_ProductDesignation:        STRING;    (* Output to MK|Ware: product designation *)
	TimerStarted:                        BOOL;      (* Signals the start of the timer *)
	Error:                               STRING;    (* Description of the error for error analysis *)
	ErrorID:                             INT;       (* Error ID for error analysis *)
END_VAR