FUNCTION_BLOCK "FB_CallAMRManagement"
{ S7_Optimized_Access := 'TRUE' }
VERSION : 0.1
   VAR 
      Lfb_AMRManagement { S7_SetPoint := 'False'} : "FB_AMR_Management_V2";
   END_VAR


BEGIN
	REGION Info
	(* Company: Schönenberger Systeme GmbH / (C) Copyright (2022). All rights reserved.
	-----------------------------------------------------------------------------------------
	Title: FB_CallAMRManagement
	Comment/Function: Call all AMR Management FBs
	Library/Family: -
	Author: department: "Automatisierung" ; person in charge / contact: C.Nottelmann (Automated Intelligence)
	Target System: CPU 1518F-4 PN/DP
	Engineering: TIA Portal V20
	Restrictions: -
	Requirements: -
	-----------------------------------------------------------------------------------------
	Change log table:
	Version     | Date       | Signature (Safety) | Expert in charge | Changes applied
	------------|------------|--------------------|------------------|-----------------------
	001.000.000 | 2025-10-15 | -                  |                  | Header added on 15.10.2025
	                                                                   
	*)
	END_REGION
	
	REGION Call AMR Management
	    #Lfb_AMRManagement(udtIn_DataMES := "DB_Handshake".udtIn_TeleDataFromMES,
	                       str_InCapacityTrigger := "DB_Prozessdaten".stAMRParameter.str_InCapacityTrigger,
	                       udt_InTro406Scan := "DB_Handshake".str_TROScan.udt_InTro406Scan,
	                       udt_InTro407Scan := "DB_Handshake".str_TROScan.udt_InTro407Scan,
	                       udt_InTro410Scan := "DB_Handshake".str_TROScan.udt_InTro410Scan,
	                       udt_InTro413Scan := "DB_Handshake".str_TROScan.udt_InTro413Scan,
	                       udt_InTro417Scan := "DB_Handshake".str_TROScan.udt_InTro417Scan,
	                       t_InTRO407Watchdog := T#60s,
	                       t_InTRO410Watchdog := T#60s,
	                       t_InTRO413Watchdog := T#60s,
	                       tInMaxWaitTimeRequeue:=T#0ms,
	                       stInOutJam4002_1 := "DB_JamArea4002".stJam4002_1,
	                       stInOutJam4002_2 := "DB_JamArea4002".stJam4002_2,
	                       stInOutJam4003_1 := "DB_JamArea4003".stJam4003_1,
	                       stInOutJam4003_2 := "DB_JamArea4003".stJam4003_2,
	                       stInOutJam4003_3 := "DB_JamArea4003".stJam4003_3,
	                       stInOutJam4003_4 := "DB_JamArea4003".stJam4003_4,
	                       stInOutJam4003_5 := "DB_JamArea4003".stJam4003_5,
	                       stInOutJam4003_6 := "DB_JamArea4003".stJam4003_6,
	                       stInOutJam4003_7 := "DB_JamArea4003".stJam4003_7,
	                       stInOutJam4004_1 := "DB_JamArea4004".stJam4004_1,
	                       stInOutJam4005_1 := "DB_JamArea4005".stJam4005_1,
	                       stInOutJam4006_1 := "DB_JamArea4006".stJam4006_1,
	                       stInOutJam4007_1 := "DB_JamArea4007".stJam4007_1,
	                       stInOutJam4008_1 := "DB_JamArea4008".stJam4008_1,
	                       stInOutJam4009_1 := "DB_JamArea4009".stJam4009_1,
	                       stInOutJam4010_1 := "DB_JamArea4010".stJam4010_1,
	                       stInOutJam4010_2 := "DB_JamArea4010".stJam4010_2,
	                       udt_InOut_MultiPurposeStation1 := "DB_Prozessdaten".stWorkStations.stMPS1,
	                       udt_InOut_MultiPurposeStation2 := "DB_Prozessdaten".stWorkStations.stMPS2,
	                       udt_InOut_MultiPurposeStation3 := "DB_Prozessdaten".stWorkStations.stMPS3,
	                       udt_TRO406 := "DB_Handshake".str_TROs.udt_TRO406,
	                       udt_TRO407 := "DB_Handshake".str_TROs.udt_TRO407,
	                       udt_TRO410 := "DB_Handshake".str_TROs.udt_TRO410,
	                       udt_TRO413 := "DB_Handshake".str_TROs.udt_TRO413,
	                       udt_InOut_HandshakeDataMES := "DB_Handshake".udt_HandshakeMESStorage,
	                       arrudt_InOutCarrierBuffer := "DB_Prozessdaten".stAMRParameter.MESMessageBuffer,
	                       arrudt_InOutJam:="DB_JamArea4003".stJam4003_2.arCarrier);
	END_REGION
END_FUNCTION_BLOCK

