{{indexmenu_n>1}} ====== MKWare_ProcesstimeByMKWare_State ====== This function block sends start and stop signals of a process to //MK|Ware//. The time difference between the signals is measured there to generate the process time. It also sends the status of the process (OK / NOK), because NOK processes in //MK|Ware// are not included in the evaluation. If the PLC does not provide the two start and stop signals, only the duration of the active start signal can be used. The [[en:software:mksupervisor:strukturbaum:funktion:start|configuration in the MKSupervisor]] determines how the process time is generated. ===== VAR_INPUT ===== VAR_INPUT Process_Start: BOOL; (* Start signal for the process *) Process_Stop: BOOL; (* Stop signal for 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 *) Triggerduration: TIME:=T#500MS; (* Extension time for the trigger *) DelayTime: TIME:=T#300MS; (* Delay time after changes to NOK signals *) END_VAR ===== VAR_OUTPUT ===== VAR_OUTPUT PTfromPLC_Start: BOOL; (* Output to MK|Ware: signals the start of a process *) PTfromPLC_Stop: BOOL; (* Output to MK|Ware: signals the end of a process *) PTfromPLC_OK: BOOL; (* Output to MK|Ware: OK marking *) PTfromPLC_NOK: BOOL; (* Output to MK|Ware: NOK marking *) PTfromPLC_Cancel: BOOL; (* Output to MK|Ware: signals a canceled process *) PTfromPLC_ProductDesignation: STRING; (* Output to MK|Ware: product designation *) Error: STRING; (* Description of the error for error analysis *) ErrorID: INT; (* Error ID for error analysis *) END_VAR ===== Example of a function block ===== {{:de:interfaces:mkcollector:general:prozesszeit:processtimebymkware:pasted:20241029-083952.png}}