MKWare_AddItemSN

This function block requires that the PLC generates a ProductSN. The function block transmits the SN to MK|Ware.

VAR_INPUT
    PDAtoPLC_ItemAdded:       BOOL;             (* Output from MK|Ware: variable is set to TRUE when a ProductSN is created. *)
 
    Enable:                   BOOL  := TRUE;	(* Reset all signals. *)
    AddItem:                  BOOL;             (* Start signal to request a new ProductSN. *)
    ProductDesignation:       STRING;           (* Product designation *)
    ProductSN:                STRING;           (* Contains the ProductSN for the product. *)
    TimeoutTime:              TIME  :=t#10S;    (* Value for timeout. *)
    DelayTime:                TIME  :=t#300ms;  (* Value for delay time. * )
END_VAR
VAR_OUTPUT
    PDAfromPLC_AddItem:               BOOL;     (* Output to MK|Ware: If the status is TRUE, a ProductSN will be generated. *)
    PDAfromPLC_ProductDesignation:    STRING;   (* Output to MK|Ware: Contains the current product. *)
    PDAfromPLC_ProductSN:             STRING;   (* Output to MK|Ware: Contains the ProductSN for the product. *)
 
    TimeoutError:                     BOOL;     (* A TimeoutError is triggered after a specified period of time has elapsed. *)
    Busy:                             BOOL;     (* Is TRUE after start signals and FALSE after an abort or the return message from MK|Ware. *)
    ItemAdded:                        BOOL;     (* Pass-through signal of MKWare. *)
    Error:                            STRING;   (* Description of the error for error analysis *)
    ErrorID:                          INT;      (* Error ID for error analysis *)
END_VAR