{{indexmenu_n>150}}
====== MKWare_GetValuesByGUID ======
The function block transmits a GUID to //MK|Ware// and receives ProductDesignation or ProductSN, as well as measurement values already stored in //MK|Ware//.
The MKWare_Copy modules are used to add and extend data types.
===== VAR_INPUT =====
VAR_INPUT
PDAtoPLC_GotValues: BOOL; (* From MK|Ware: The variable is set to TRUE when a ProductSN is read. *)
PDAtoPLC_ProductDesignation: STRING; (* From MK|Ware: Contains the current product. *)
PDAtoPLC_ProductSN: STRING; (* From MK|Ware: Contains the ProductSN for the product. *)
PDAtoPLC_bValue[1..8]: BOOL; (* From MK|Ware: This variable transfers product data of the type BOOL (e.g. OK/NOK). *)
PDAtoPLC_iValue1: BOOL; (* From MK|Ware: This variable transfers product data of type INTEGER (e.g. nest number). *)
PDAtoPLC_sValue1: STRING; (* From MK|Ware: This variable transfers product data of the type STRING (e.g. recipe name). *)
Enable: BOOL := TRUE; (* Reset all signals. *)
GetValues: BOOL; (* Start signal to request a new article. *)
ProductGUID: STRING; (* ProductGUID *)
TimeoutTime: TIME :=t#10S; (* Value for timeout. *)
DelayTime: TIME :=t#300ms; (* Value for delay time. )
END_VAR
===== VAR_OUTPUT =====
VAR_OUTPUT
PDAfromPLC_GetValues: BOOL; (* If the status is TRUE, a ProductSN should be read. *)
PDAfromPLC_ProductGUID: STRING; (* Contains the unique ID for MK|Ware internal identification. *)
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. *)
GotValues: BOOL; (* Pass-through signal from MKWare. *)
ProductDesignation: STRING; (* Pass-through signal from MKWare. *)
ProductSN: STRING; (* Pass-through signal from MKWare. *)
bValue[1..8]: BOOL; (* Value 1 of type BOOL *)
iValue1: INT; (* Value 1 of type INT *)
sValue1: STRING; (* Value 1 of type STRING *)
CopyData: BOOL; (* Starting signal for copying data from MKWare to PLC variables *)
ResetData: BOOL; (* Start signal to reset MKWare data to prevent old values from being present before sending *)
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:pde:getvaluesbyguid:pasted:20241029-102334.png}}