
{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_ActivateXbots (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL;
		Busy : {REDUND_UNREPLICABLE} BOOL;
		Aborted : {REDUND_UNREPLICABLE} BOOL;
		Error : {REDUND_UNREPLICABLE} BOOL;
		ErrorID : {REDUND_UNREPLICABLE} UINT;
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2568;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_XYMotion (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		cmdLB : {REDUND_UNREPLICABLE} UINT;
		XbotID : {REDUND_UNREPLICABLE} USINT;
		Mode : {REDUND_UNREPLICABLE} USINT;
		Type_ : {REDUND_UNREPLICABLE} USINT;
		PosX : {REDUND_UNREPLICABLE} REAL;
		PosY : {REDUND_UNREPLICABLE} REAL;
		EndVel : {REDUND_UNREPLICABLE} REAL;
		MaxVel : {REDUND_UNREPLICABLE} REAL := 1.0;
		MaxAcc : {REDUND_UNREPLICABLE} REAL := 10.0;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
		TravelTime : {REDUND_UNREPLICABLE} REAL;
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		nTemp : {REDUND_UNREPLICABLE} DWORD;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2824;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_ReadXbotState (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Enable : {REDUND_UNREPLICABLE} BOOL;
		XbotID : {REDUND_UNREPLICABLE} USINT;
	END_VAR
	VAR_OUTPUT
		Valid : {REDUND_UNREPLICABLE} BOOL;
		State : {REDUND_UNREPLICABLE} USINT; (* 0 = undetected, 1 = discovering, 2 = landed, 3 = idle, 4 = disabled, 5 = in motion, 6 = waiting, 7 = stopping, 8 = obstacle, 9 = hold, 10 = stopped, 14 = error*)
	END_VAR
	VAR
		ByteOffset : {REDUND_UNREPLICABLE} USINT;
		BitOffset : {REDUND_UNREPLICABLE} USINT;
		uTemp : {REDUND_UNREPLICABLE} USINT;
	END_VAR
	VAR CONSTANT
		MaxXbots : USINT := 80;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_ReadDigitalSignalFromPMC (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Enable : {REDUND_UNREPLICABLE} BOOL;
		DiID : {REDUND_UNREPLICABLE} USINT; (* [1-128]*)
	END_VAR
	VAR_OUTPUT
		Valid : {REDUND_UNREPLICABLE} BOOL;
		Level : {REDUND_UNREPLICABLE} BOOL;
	END_VAR
	VAR
		ByteOffset : {REDUND_UNREPLICABLE} DINT;
		BitOffset : {REDUND_UNREPLICABLE} DINT;
		RegVal : {REDUND_UNREPLICABLE} USINT;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_ReadPmcState (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Enable : {REDUND_UNREPLICABLE} BOOL;
	END_VAR
	VAR_OUTPUT
		Valid : {REDUND_UNREPLICABLE} BOOL;
		State : {REDUND_UNREPLICABLE} USINT;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_ReadXbotForce (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Enable : {REDUND_UNREPLICABLE} BOOL;
		XbotID : {REDUND_UNREPLICABLE} USINT;
	END_VAR
	VAR_OUTPUT
		Valid : {REDUND_UNREPLICABLE} BOOL;
		Fx : {REDUND_UNREPLICABLE} REAL;
		Fy : {REDUND_UNREPLICABLE} REAL;
		Fz : {REDUND_UNREPLICABLE} REAL;
		Tx : {REDUND_UNREPLICABLE} REAL;
		Ty : {REDUND_UNREPLICABLE} REAL;
		Tz : {REDUND_UNREPLICABLE} REAL;
	END_VAR
	VAR
		RegVal : {REDUND_UNREPLICABLE} UDINT;
		curXID : {REDUND_UNREPLICABLE} USINT;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_ReadXbotPos (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		PMCDB_pointer : REFERENCE TO PMCDB_struct;
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Enable : {REDUND_UNREPLICABLE} BOOL;
		XbotID : {REDUND_UNREPLICABLE} USINT;
	END_VAR
	VAR_OUTPUT
		Valid : {REDUND_UNREPLICABLE} BOOL;
		PosX : {REDUND_UNREPLICABLE} REAL;
		PosY : {REDUND_UNREPLICABLE} REAL;
		PosZ : {REDUND_UNREPLICABLE} REAL;
		PosRx : {REDUND_UNREPLICABLE} REAL;
		PosRy : {REDUND_UNREPLICABLE} REAL;
		PosRz : {REDUND_UNREPLICABLE} REAL;
	END_VAR
	VAR
		RegVal : {REDUND_UNREPLICABLE} UDINT;
		curXID : {REDUND_UNREPLICABLE} USINT;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_SendDigitalSignalToPMC (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Enable : {REDUND_UNREPLICABLE} BOOL;
		DoID : {REDUND_UNREPLICABLE} USINT; (* [1-128]*)
		Level : {REDUND_UNREPLICABLE} BOOL;
	END_VAR
	VAR_OUTPUT
		Valid : {REDUND_UNREPLICABLE} BOOL;
	END_VAR
	VAR
		ByteOffset : {REDUND_UNREPLICABLE} DINT;
		BitOffset : {REDUND_UNREPLICABLE} DINT;
		step1 : {REDUND_UNREPLICABLE} DINT;
		step2 : {REDUND_UNREPLICABLE} DINT;
		step3 : {REDUND_UNREPLICABLE} DINT;
		RegVal : {REDUND_UNREPLICABLE} USINT;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_WriteStream (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Enable : {REDUND_UNREPLICABLE} BOOL;
		StmID : {REDUND_UNREPLICABLE} USINT; (* [1-10]*)
		AxisID : {REDUND_UNREPLICABLE} USINT; (* 1: X; 2: Y; 3: Z; 4: Rx; 5: Ry; 6: Rz*)
		Pos : {REDUND_UNREPLICABLE} REAL;
	END_VAR
	VAR_OUTPUT
		Valid : {REDUND_UNREPLICABLE} BOOL;
	END_VAR
	VAR
		ByteOffset : {REDUND_UNREPLICABLE} UINT;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_6DMotion (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		cmdLB : {REDUND_UNREPLICABLE} UINT;
		XbotID : {REDUND_UNREPLICABLE} USINT;
		PosX : {REDUND_UNREPLICABLE} REAL;
		PosY : {REDUND_UNREPLICABLE} REAL;
		PosZ : {REDUND_UNREPLICABLE} REAL;
		PosRx : {REDUND_UNREPLICABLE} REAL; (* radians*)
		PosRy : {REDUND_UNREPLICABLE} REAL; (* radians*)
		PosRz : {REDUND_UNREPLICABLE} REAL; (* radians*)
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
		TravelTime : {REDUND_UNREPLICABLE} REAL;
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		nTemp : {REDUND_UNREPLICABLE} DWORD;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2832;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_6DMotionVelocity (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		cmdLB : {REDUND_UNREPLICABLE} UINT;
		XbotID : {REDUND_UNREPLICABLE} USINT;
		TargetPos : {REDUND_UNREPLICABLE} ARRAY[0..5] OF REAL; (* [x,y,z,rx,ry,rz]*)
		LongAxisAccVel : {REDUND_UNREPLICABLE} ARRAY[0..1] OF REAL; (* [long axis accel,long axis vel]*)
		ShortAxisVel : {REDUND_UNREPLICABLE} ARRAY[0..3] OF REAL; (* [z vel,rx vel,ry vel,rz vel]*)
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
		TravelTime : {REDUND_UNREPLICABLE} REAL;
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		nTemp : {REDUND_UNREPLICABLE} DWORD;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2851;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_ActivateTrajectory (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		cmdLB : {REDUND_UNREPLICABLE} UINT;
		nXbots : {REDUND_UNREPLICABLE} USINT;
		XbotID : {REDUND_UNREPLICABLE} ARRAY[0..11] OF USINT;
		TrajID : {REDUND_UNREPLICABLE} ARRAY[0..11] OF USINT;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
		TravelTime : {REDUND_UNREPLICABLE} REAL;
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		nTemp : {REDUND_UNREPLICABLE} DWORD;
		xbotNum : {REDUND_UNREPLICABLE} USINT;
		xIndex : {REDUND_UNREPLICABLE} SINT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2823;
		maxNXbots : SINT := 12;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_ArcMotionCenter (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		cmdLB : {REDUND_UNREPLICABLE} UINT;
		XbotID : {REDUND_UNREPLICABLE} USINT;
		Mode : {REDUND_UNREPLICABLE} USINT; (* 0:absolute;1: relative*)
		Dir : {REDUND_UNREPLICABLE} USINT; (* 0:clockwise;1:counter-clockwise*)
		EndVel : {REDUND_UNREPLICABLE} REAL;
		MaxVel : {REDUND_UNREPLICABLE} REAL := 1.0;
		MaxAcc : {REDUND_UNREPLICABLE} REAL := 10.0;
		CenterX : {REDUND_UNREPLICABLE} REAL;
		CenterY : {REDUND_UNREPLICABLE} REAL;
		Angle : {REDUND_UNREPLICABLE} REAL;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
		TravelTime : {REDUND_UNREPLICABLE} REAL;
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		nTemp : {REDUND_UNREPLICABLE} DWORD;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2826;
		aDef : USINT := 1;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} FUNCTION_BLOCK PMC_ArcMotionTarget (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		cmdLB : {REDUND_UNREPLICABLE} UINT;
		XbotID : {REDUND_UNREPLICABLE} USINT;
		Mode : {REDUND_UNREPLICABLE} USINT; (* 0:absolute;1: relative*)
		AType : {REDUND_UNREPLICABLE} USINT; (* 0: Minor Arc;1: Major Arc*)
		Dir : {REDUND_UNREPLICABLE} USINT; (* 0:clockwise;1:counter-clockwise*)
		EndVel : {REDUND_UNREPLICABLE} REAL;
		MaxVel : {REDUND_UNREPLICABLE} REAL := 1.0;
		MaxAcc : {REDUND_UNREPLICABLE} REAL := 10.0;
		PosX : {REDUND_UNREPLICABLE} REAL;
		PosY : {REDUND_UNREPLICABLE} REAL;
		Radius : {REDUND_UNREPLICABLE} REAL;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
		TravelTime : {REDUND_UNREPLICABLE} REAL;
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		nTemp : {REDUND_UNREPLICABLE} DWORD;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2826;
		aDef : USINT := 0;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_AutoDrivingMotion (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		nXbots : {REDUND_UNREPLICABLE} USINT;
		XbotID : {REDUND_UNREPLICABLE} ARRAY[0..8] OF USINT;
		PosX : {REDUND_UNREPLICABLE} ARRAY[0..8] OF REAL;
		PosY : {REDUND_UNREPLICABLE} ARRAY[0..8] OF REAL;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		xbotNum : {REDUND_UNREPLICABLE} USINT;
		xIndex : {REDUND_UNREPLICABLE} SINT;
		dd : {REDUND_UNREPLICABLE} INT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2836;
		maxNXbot : SINT := 9;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_BlockXbotGroup (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		GroupID : {REDUND_UNREPLICABLE} USINT; (* 0: block all groups; >0: block specific group*)
		IsBlock : {REDUND_UNREPLICABLE} BOOL;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		Level : {REDUND_UNREPLICABLE} USINT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2838;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_BondXbotGroup (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		GroupID : {REDUND_UNREPLICABLE} USINT; (* 0: bond all groups; >0: bond specific group*)
		IsBond : {REDUND_UNREPLICABLE} BOOL;
		Mode : {REDUND_UNREPLICABLE} USINT; (* 0: decouple mode;1: couple mode*)
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		Level : {REDUND_UNREPLICABLE} USINT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2838;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_CamMotion (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		cmdLB : {REDUND_UNREPLICABLE} UINT;
		Level : {REDUND_UNREPLICABLE} USINT; (* 0:Exit from cam mode;1: Enter cam mode*)
		SlaveXID : {REDUND_UNREPLICABLE} USINT;
		nAxis : {REDUND_UNREPLICABLE} USINT;
		SlaveAID : {REDUND_UNREPLICABLE} ARRAY[0..6] OF USINT; (* 1: X; 2: Y; 3: Z; 4: Rx; 5: Ry; 6: Rz*)
		camID : {REDUND_UNREPLICABLE} ARRAY[0..6] OF USINT;
		MasterXID : {REDUND_UNREPLICABLE} ARRAY[0..6] OF USINT;
		MasterAID : {REDUND_UNREPLICABLE} ARRAY[0..6] OF USINT; (* 1: X; 2: Y; 3: Z; 4: Rx; 5: Ry; 6: Rz*)
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		axisNum : {REDUND_UNREPLICABLE} USINT;
		xIndex : {REDUND_UNREPLICABLE} SINT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2834;
		maxNAxis : SINT := 7;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} FUNCTION_BLOCK PMC_CamMotionAdvanced (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		cmdLB : {REDUND_UNREPLICABLE} UINT;
		Level : {REDUND_UNREPLICABLE} USINT; (* 0:Exit from cam mode;1: Enter cam mode*)
		SlaveXID : {REDUND_UNREPLICABLE} USINT; (*ID of the slave XBot*)
		nAxis : {REDUND_UNREPLICABLE} USINT; (*number of axis of the slave XBot to bind to a cam*)
		SlaveAID : {REDUND_UNREPLICABLE} ARRAY[0..3] OF USINT; (* 1: X; 2: Y; 3: Z; 4: Rx; 5: Ry; 6: Rz*)
		camID : {REDUND_UNREPLICABLE} ARRAY[0..3] OF USINT; (*array of cam IDs to follow*)
		MasterXID : {REDUND_UNREPLICABLE} ARRAY[0..3] OF USINT; (*array of master XBot IDs*)
		MasterAID : {REDUND_UNREPLICABLE} ARRAY[0..3] OF USINT; (* 1: X; 2: Y; 3: Z; 4: Rx; 5: Ry; 6: Rz*)
		CamMode : ARRAY[0..3] OF USINT; (*0: auto start. 1: cyclic. 2: start once*)
		MasterAxisScaling : ARRAY[0..3] OF REAL := [4(1)]; (*positive number, scaling factor to apply to master axis position interval*)
		SlaveAxisScaling : ARRAY[0..3] OF REAL := [4(1)]; (*positive number, scaling factor to apply to slave axis position definition*)
		MasterAxisOffset : ARRAY[0..3] OF REAL; (*master offset distance, in meters*)
		MasterOffsetMode : ARRAY[0..3] OF USINT := [4(1)]; (*0: Absolute; 1: Relative*)
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		axisNum : {REDUND_UNREPLICABLE} USINT;
		xIndex : {REDUND_UNREPLICABLE} SINT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2855;
		maxNAxis : SINT := 4;
	END_VAR
	VAR
		tempVar : USINT;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_ClearMacro (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		MacroID : {REDUND_UNREPLICABLE} USINT;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2839;
		Level : USINT := 0;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_ConfigDI2Reset (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		nDI : {REDUND_UNREPLICABLE} USINT;
		DiID : {REDUND_UNREPLICABLE} ARRAY[0..21] OF USINT;
		RstDoID : {REDUND_UNREPLICABLE} ARRAY[0..21] OF USINT;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		diNum : {REDUND_UNREPLICABLE} USINT;
		xIndex : {REDUND_UNREPLICABLE} SINT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2844;
		maxNDi : SINT := 22;
		Type_ : USINT := 1;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_ConfigDI2RunMacro (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		nDI : {REDUND_UNREPLICABLE} USINT;
		DiID : {REDUND_UNREPLICABLE} ARRAY[0..21] OF USINT;
		MacroID : {REDUND_UNREPLICABLE} ARRAY[0..21] OF USINT;
		XbotID : {REDUND_UNREPLICABLE} ARRAY[0..21] OF USINT;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		diNum : {REDUND_UNREPLICABLE} USINT;
		xIndex : {REDUND_UNREPLICABLE} SINT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2844;
		maxNDi : SINT := 22;
		Type_ : USINT := 2;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_ConfigDI2Trigger (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		nDI : {REDUND_UNREPLICABLE} USINT; (* Number of digital inputs to configure*)
		DiID : {REDUND_UNREPLICABLE} ARRAY[0..21] OF USINT; (* Array of digital input ID to configure*)
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		diNum : {REDUND_UNREPLICABLE} USINT;
		xIndex : {REDUND_UNREPLICABLE} SINT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2844;
		maxNDi : SINT := 22;
		Type_ : USINT := 0;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_ConfigDO2CmdLb (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		nDO : {REDUND_UNREPLICABLE} USINT;
		DoID : {REDUND_UNREPLICABLE} ARRAY[0..4] OF USINT;
		XbotID : {REDUND_UNREPLICABLE} ARRAY[0..4] OF USINT;
		CmdLb : {REDUND_UNREPLICABLE} ARRAY[0..4] OF UINT;
		Type_ : {REDUND_UNREPLICABLE} ARRAY[0..4] OF USINT; (* 0: Cmd Label Start; 1: Cmd Label End; 2: Cmd Label state*)
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		doNum : {REDUND_UNREPLICABLE} USINT;
		xIndex : {REDUND_UNREPLICABLE} SINT;
		eventID : {REDUND_UNREPLICABLE} USINT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2843;
		maxNDo : SINT := 5;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_ConfigDO2Disp (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		nDO : {REDUND_UNREPLICABLE} USINT;
		DoID : {REDUND_UNREPLICABLE} ARRAY[0..4] OF USINT;
		XbotID : {REDUND_UNREPLICABLE} ARRAY[0..4] OF USINT;
		Type_ : {REDUND_UNREPLICABLE} ARRAY[0..4] OF USINT; (* 0: Positive Cross; 1: Negative Cross; 2: State*)
		Mode : {REDUND_UNREPLICABLE} ARRAY[0..4] OF USINT; (* 0: X only; 1: Y only ; 2: XY*)
		Threshold : {REDUND_UNREPLICABLE} ARRAY[0..4] OF REAL;
		XFactor : {REDUND_UNREPLICABLE} ARRAY[0..4] OF REAL;
		YFactor : {REDUND_UNREPLICABLE} ARRAY[0..4] OF REAL;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		doNum : {REDUND_UNREPLICABLE} USINT;
		xIndex : {REDUND_UNREPLICABLE} SINT;
		eventID : {REDUND_UNREPLICABLE} USINT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2843;
		maxNDo : SINT := 5;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_ConfigDO2Force (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		nDO : {REDUND_UNREPLICABLE} USINT;
		DoID : {REDUND_UNREPLICABLE} ARRAY[0..4] OF USINT;
		XbotID : {REDUND_UNREPLICABLE} ARRAY[0..4] OF USINT;
		Type_ : {REDUND_UNREPLICABLE} ARRAY[0..4] OF USINT; (* 0: Positive Cross; 1: Negative Cross; 2: State*)
		AxisID : {REDUND_UNREPLICABLE} ARRAY[0..4] OF USINT; (* 1: X axis; 2: Y axis; 3: Z axis*)
		Threshold : {REDUND_UNREPLICABLE} ARRAY[0..4] OF REAL;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		doNum : {REDUND_UNREPLICABLE} USINT;
		xIndex : {REDUND_UNREPLICABLE} SINT;
		eventID : {REDUND_UNREPLICABLE} USINT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2843;
		maxNDo : SINT := 5;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_ConfigDO2Motion (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		nDO : {REDUND_UNREPLICABLE} USINT;
		DoID : {REDUND_UNREPLICABLE} ARRAY[0..4] OF USINT;
		XbotID : {REDUND_UNREPLICABLE} ARRAY[0..4] OF USINT;
		Type_ : {REDUND_UNREPLICABLE} ARRAY[0..4] OF USINT; (* 0: Motion Start; 1: Motion End; 2: Motion state*)
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		doNum : {REDUND_UNREPLICABLE} USINT;
		xIndex : {REDUND_UNREPLICABLE} SINT;
		eventID : {REDUND_UNREPLICABLE} USINT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2843;
		maxNDo : SINT := 5;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_ConfigFBStream (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		nStm : {REDUND_UNREPLICABLE} USINT;
		StmID : {REDUND_UNREPLICABLE} ARRAY[0..7] OF USINT;
		XbotID : {REDUND_UNREPLICABLE} ARRAY[0..7] OF USINT;
		FBMode : {REDUND_UNREPLICABLE} ARRAY[0..7] OF USINT;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		stmNum : {REDUND_UNREPLICABLE} USINT;
		Index : {REDUND_UNREPLICABLE} SINT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2828;
		maxNStm : SINT := 8;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_CreateXbotGroup (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		GroupID : {REDUND_UNREPLICABLE} USINT; (* must be greater than 0*)
		nXbots : {REDUND_UNREPLICABLE} USINT;
		XbotID : {REDUND_UNREPLICABLE} ARRAY[0..31] OF USINT;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		xbotNum : {REDUND_UNREPLICABLE} USINT;
		xIndex : {REDUND_UNREPLICABLE} SINT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2838;
		maxNXbot : SINT := 32;
		Level : USINT := 0;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_DeactivateXbots (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL;
		Busy : {REDUND_UNREPLICABLE} BOOL;
		Aborted : {REDUND_UNREPLICABLE} BOOL;
		Error : {REDUND_UNREPLICABLE} BOOL;
		ErrorID : {REDUND_UNREPLICABLE} UINT;
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2570;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_DeleteXbotGroup (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		GroupID : {REDUND_UNREPLICABLE} USINT; (* 0: delete all groups; >0: delete specific group*)
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2838;
		Level : USINT := 1;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_ForceModeCtrl (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		Level : {REDUND_UNREPLICABLE} USINT; (* 0: Exit from force mode;1: Z force mode;2: X force mode;3: Y force mode;4: XY force mode*)
		XbotID : {REDUND_UNREPLICABLE} USINT;
		ForceX : {REDUND_UNREPLICABLE} REAL;
		ForceY : {REDUND_UNREPLICABLE} REAL;
		ForceZ : {REDUND_UNREPLICABLE} REAL;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2833;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_GetBufferStatus (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		XbotID : {REDUND_UNREPLICABLE} USINT;
	END_VAR
	VAR_OUTPUT
		Valid : {REDUND_UNREPLICABLE} BOOL; (* The function block's output values can be used.*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
		State : {REDUND_UNREPLICABLE} USINT;
		nCmds : {REDUND_UNREPLICABLE} UINT;
		nextCmdLb : {REDUND_UNREPLICABLE} UINT; (* Command label of first command in the buffer*)
		newCmdLb : {REDUND_UNREPLICABLE} UINT; (* Command label of last command in the buffer*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2837;
		level : USINT := 3;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_GetFlywayTemp (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		FlwID : {REDUND_UNREPLICABLE} USINT;
	END_VAR
	VAR_OUTPUT
		Valid : {REDUND_UNREPLICABLE} BOOL; (* The function block's output values can be used.*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
		Power : {REDUND_UNREPLICABLE} REAL;
		CPUTemp : {REDUND_UNREPLICABLE} REAL;
		PATemp : {REDUND_UNREPLICABLE} REAL;
		MTemp : {REDUND_UNREPLICABLE} REAL;
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		nTemp : {REDUND_UNREPLICABLE} DWORD;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2582;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_GetGroupStatus (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		GroupID : {REDUND_UNREPLICABLE} USINT; (* 0: delete all groups; >0: delete specific group*)
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
		State : {REDUND_UNREPLICABLE} USINT; (* 0: unbonded 1:bonded*)
		nXbots : {REDUND_UNREPLICABLE} USINT;
		XbotID : {REDUND_UNREPLICABLE} ARRAY[0..31] OF USINT;
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		xbotNum : {REDUND_UNREPLICABLE} USINT;
		xIndex : {REDUND_UNREPLICABLE} SINT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2838;
		maxNXbot : SINT := 32;
		Level : USINT := 6;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_GetMacroStatus (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		MacroID : {REDUND_UNREPLICABLE} USINT;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
		State : {REDUND_UNREPLICABLE} USINT; (* 0: unsaved, 1: reserved, 2: saved*)
		nCmds : {REDUND_UNREPLICABLE} USINT; (* number of commands in the macro*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2839;
		Level : USINT := 4;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_GetPayload (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		XbotID : {REDUND_UNREPLICABLE} USINT;
	END_VAR
	VAR_OUTPUT
		Valid : {REDUND_UNREPLICABLE} BOOL; (* The function block's output values can be used.*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
		Payload : {REDUND_UNREPLICABLE} REAL;
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		nTemp : {REDUND_UNREPLICABLE} DWORD;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2848;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_GetPmcStatus (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
	END_VAR
	VAR_OUTPUT
		Valid : {REDUND_UNREPLICABLE} BOOL; (* The function block's output values can be used.*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
		State : {REDUND_UNREPLICABLE} USINT;
		nXbots : {REDUND_UNREPLICABLE} UINT;
		Power : {REDUND_UNREPLICABLE} REAL;
		MaxCPUTemp : {REDUND_UNREPLICABLE} REAL;
		MaxPATemp : {REDUND_UNREPLICABLE} REAL;
		MaxMTemp : {REDUND_UNREPLICABLE} REAL;
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		nTemp : {REDUND_UNREPLICABLE} DWORD;
		mTemp : {REDUND_UNREPLICABLE} BYTE;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2565;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_GetXbotProperty (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		XbotID : {REDUND_UNREPLICABLE} USINT;
		PropertyID : {REDUND_UNREPLICABLE} USINT;
	END_VAR
	VAR_OUTPUT
		Valid : {REDUND_UNREPLICABLE} BOOL; (* The function block's output values can be used.*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
		MoverType : {REDUND_UNREPLICABLE} USINT;
		PayloadW : {REDUND_UNREPLICABLE} REAL;
		PayloadCG : {REDUND_UNREPLICABLE} REAL;
		XDim : {REDUND_UNREPLICABLE} REAL;
		YDim : {REDUND_UNREPLICABLE} REAL;
		accLimit : {REDUND_UNREPLICABLE} REAL;
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		nTemp : {REDUND_UNREPLICABLE} DWORD;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2846;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_GetXbotStatus (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		XbotID : {REDUND_UNREPLICABLE} USINT;
		FeedbackType : {REDUND_UNREPLICABLE} USINT; (* 0: Feedback Position 1: Feedback Force*)
	END_VAR
	VAR_OUTPUT
		Valid : {REDUND_UNREPLICABLE} BOOL; (* The function block's output values can be used.*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
		State : {REDUND_UNREPLICABLE} USINT;
		CmdLb : {REDUND_UNREPLICABLE} UINT; (* Command Label@Motion State*)
		FMState : {REDUND_UNREPLICABLE} USINT; (* 0: Not Force Mode;1: X force mode;2: Y force mode;4: Z force mode;3: XY force mode*)
		StarXID : {REDUND_UNREPLICABLE} USINT; (* 0: Not linked to any xbot; >0: start Xbot ID*)
		GroupID : {REDUND_UNREPLICABLE} USINT; (* 0: Not bond to any group; >0: group ID*)
		nCmds : {REDUND_UNREPLICABLE} UINT; (* number of commands in motion buffer*)
		IsBlocked : {REDUND_UNREPLICABLE} BOOL;
		IsPaused : {REDUND_UNREPLICABLE} BOOL;
		PosX : {REDUND_UNREPLICABLE} REAL;
		PosY : {REDUND_UNREPLICABLE} REAL;
		PosZ : {REDUND_UNREPLICABLE} REAL;
		PosRx : {REDUND_UNREPLICABLE} REAL;
		PosRy : {REDUND_UNREPLICABLE} REAL;
		PosRz : {REDUND_UNREPLICABLE} REAL;
		StereotypeID : {REDUND_UNREPLICABLE} USINT; (* Xbot Stereotype ID*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		nTemp : {REDUND_UNREPLICABLE} DWORD;
		bTemp : {REDUND_UNREPLICABLE} BYTE;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2831;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_JogVelocity (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		XbotID : {REDUND_UNREPLICABLE} USINT;
		Enable : {REDUND_UNREPLICABLE} BOOL;
		Direction : {REDUND_UNREPLICABLE} REAL; (* [radian]*)
		Velocity : {REDUND_UNREPLICABLE} REAL;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2842;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_LevitationCtrl (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL;
		XbotID : {REDUND_UNREPLICABLE} USINT;
		Level : {REDUND_UNREPLICABLE} USINT; (* 0 = landed, 1 = levitate*)
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL;
		Busy : {REDUND_UNREPLICABLE} BOOL;
		Aborted : {REDUND_UNREPLICABLE} BOOL;
		Error : {REDUND_UNREPLICABLE} BOOL;
		ErrorID : {REDUND_UNREPLICABLE} UINT;
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2829;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_MotionBufferCtrl (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		Level : {REDUND_UNREPLICABLE} USINT; (* 0: Block buffer;1: release buffer;2: clear buffer*)
		XbotID : {REDUND_UNREPLICABLE} USINT;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2837;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_PauseXbots (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		XbotID : {REDUND_UNREPLICABLE} USINT; (* 0: all Xbots; >0: specific Xbot*)
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2849;
		Level : USINT := 1;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_PlanetMotionCtrl (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		Level : {REDUND_UNREPLICABLE} USINT; (* 0:disconnet from star xbot;1: connect to star xbot*)
		StarXID : {REDUND_UNREPLICABLE} USINT;
		nXbots : {REDUND_UNREPLICABLE} USINT;
		PlanetXID : {REDUND_UNREPLICABLE} ARRAY[0..31] OF USINT;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		xbotNum : {REDUND_UNREPLICABLE} USINT;
		xIndex : {REDUND_UNREPLICABLE} SINT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2847;
		maxNXbot : SINT := 32;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_Reboot (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL;
		Busy : {REDUND_UNREPLICABLE} BOOL;
		Aborted : {REDUND_UNREPLICABLE} BOOL;
		Error : {REDUND_UNREPLICABLE} BOOL;
		ErrorID : {REDUND_UNREPLICABLE} UINT;
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2562;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_ResumeXbots (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		XbotID : {REDUND_UNREPLICABLE} USINT; (* 0: all Xbots; >0: specific Xbot*)
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2849;
		Level : USINT := 0;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_RunMacro (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		cmdLB : {REDUND_UNREPLICABLE} UINT;
		MacroID : {REDUND_UNREPLICABLE} USINT;
		XbotID : {REDUND_UNREPLICABLE} USINT;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2840;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_SaveMacro (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		MacroID : {REDUND_UNREPLICABLE} USINT;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2839;
		Level : USINT := 2;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_SetXbotProperty (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		nXbots : {REDUND_UNREPLICABLE} USINT;
		XbotID : {REDUND_UNREPLICABLE} ARRAY[0..13] OF USINT;
		PropertyID : {REDUND_UNREPLICABLE} ARRAY[0..13] OF USINT;
		Value : {REDUND_UNREPLICABLE} ARRAY[0..13] OF REAL;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		xbotNum : {REDUND_UNREPLICABLE} USINT;
		xIndex : {REDUND_UNREPLICABLE} SINT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2845;
		maxNXbots : SINT := 14;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_ShortAxisMotion (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL := FALSE; (* Execution of the function block begins on a rising edge of this input*)
		cmdLB : {REDUND_UNREPLICABLE} UINT := 0;
		XbotID : {REDUND_UNREPLICABLE} USINT := 0;
		Mode : {REDUND_UNREPLICABLE} USINT := 0; (* 0:Absolute;1:Relative*)
		Type_ : {REDUND_UNREPLICABLE} USINT := 0; (* 0: Rotation only;1: Planar Rotation*)
		PosZ : {REDUND_UNREPLICABLE} REAL := 0.001;
		PosRx : {REDUND_UNREPLICABLE} REAL := 0.0; (* radians*)
		PosRy : {REDUND_UNREPLICABLE} REAL := 0.0; (* radians*)
		PosRz : {REDUND_UNREPLICABLE} REAL := 0.0; (* radians*)
		VelZ : {REDUND_UNREPLICABLE} REAL := 0.1;
		VelRx : {REDUND_UNREPLICABLE} REAL := 0.1;
		VelRy : {REDUND_UNREPLICABLE} REAL := 0.1;
		VelRz : {REDUND_UNREPLICABLE} REAL := 0.5;
		Cx : {REDUND_UNREPLICABLE} REAL := 0.0; (* Rotation center in X when type=1*)
		Cy : {REDUND_UNREPLICABLE} REAL := 0.0; (* Rotation center in Y when type=1*)
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
		TravelTime : {REDUND_UNREPLICABLE} REAL;
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		nTemp : {REDUND_UNREPLICABLE} DWORD;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2825;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_StopXbots (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		XbotID : {REDUND_UNREPLICABLE} USINT;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2827;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_StreamModeCtrl (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		Level : {REDUND_UNREPLICABLE} USINT; (* 0:Exit from stream mode;1: Enter stream mode*)
		nXbots : {REDUND_UNREPLICABLE} USINT;
		XbotID : {REDUND_UNREPLICABLE} ARRAY[0..7] OF USINT;
		StmID : {REDUND_UNREPLICABLE} ARRAY[0..7] OF USINT;
		StmAxis : {REDUND_UNREPLICABLE} ARRAY[0..7] OF USINT; (* Bit0: X;Bit1:Y;Bit2:Z;Bit3: Rx; Bit4: Ry; Bit5: Rz*)
		offsetX : {REDUND_UNREPLICABLE} ARRAY[0..7] OF REAL;
		offsetY : {REDUND_UNREPLICABLE} ARRAY[0..7] OF REAL;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
		xbotNum : {REDUND_UNREPLICABLE} USINT;
		xIndex : {REDUND_UNREPLICABLE} SINT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2830;
		maxNXbot : SINT := 8;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_SyncMotion (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		nXbots : {REDUND_UNREPLICABLE} USINT;
		XbotID : {REDUND_UNREPLICABLE} ARRAY[0..3] OF USINT;
		PosX : {REDUND_UNREPLICABLE} ARRAY[0..3] OF REAL;
		PosY : {REDUND_UNREPLICABLE} ARRAY[0..3] OF REAL;
		EndVel : {REDUND_UNREPLICABLE} ARRAY[0..3] OF REAL;
		MaxVel : {REDUND_UNREPLICABLE} ARRAY[0..3] OF REAL;
		MaxAcc : {REDUND_UNREPLICABLE} ARRAY[0..3] OF REAL;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
		TravelTime : {REDUND_UNREPLICABLE} REAL;
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		xbotNum : {REDUND_UNREPLICABLE} USINT;
		xIndex : {REDUND_UNREPLICABLE} SINT;
		dd : {REDUND_UNREPLICABLE} INT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2835;
		maxNXbot : SINT := 4;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_WaitUntilCmdLb (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		cmdLB : {REDUND_UNREPLICABLE} UINT;
		XbotID : {REDUND_UNREPLICABLE} USINT;
		TriggerXID : {REDUND_UNREPLICABLE} USINT; (* Trigger Xbot ID*)
		TriggerType : {REDUND_UNREPLICABLE} USINT; (* 0: Begin;1: End; 2: Execute*)
		TriggerCmdLb : {REDUND_UNREPLICABLE} UINT;
		LabelType : {REDUND_UNREPLICABLE} USINT; (* 0: Motion Cmd Label;1: Run Macro Cmd Label*)
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2841;
		type_ : USINT := 3;
		count : USINT := 1;
		option : USINT := 0;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_WaitUntilDisp (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		cmdLB : {REDUND_UNREPLICABLE} UINT;
		XbotID : {REDUND_UNREPLICABLE} USINT;
		TriggerXID : {REDUND_UNREPLICABLE} USINT;
		dispMode : {REDUND_UNREPLICABLE} USINT; (* 0: X only; 1: Y only; 2: XY*)
		dispType : {REDUND_UNREPLICABLE} USINT; (* 0: Greater Than;1: Less Than; 2: Positive cross;3: Negative cross*)
		Threshold : {REDUND_UNREPLICABLE} REAL;
		posXFactor : {REDUND_UNREPLICABLE} REAL;
		posYFactor : {REDUND_UNREPLICABLE} REAL;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2841;
		type_ : USINT := 4;
		count : USINT := 1;
		option : USINT := 0;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_WaitUntilFBDI (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		cmdLB : {REDUND_UNREPLICABLE} UINT;
		XbotID : {REDUND_UNREPLICABLE} USINT;
		TriggerDI : {REDUND_UNREPLICABLE} USINT; (* Trigger Digital ID*)
		TriggerType : {REDUND_UNREPLICABLE} USINT; (* 0: Rising Edge;1: Falling Edge; 2: High Level;3: Low Level*)
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2841;
		type_ : USINT := 2;
		count : USINT := 1;
		option : USINT := 0;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_WaitUntilTimeDelay (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		cmdLB : {REDUND_UNREPLICABLE} UINT;
		XbotID : {REDUND_UNREPLICABLE} USINT;
		Delay : {REDUND_UNREPLICABLE} REAL; (* seconds*)
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
	END_VAR
	VAR
		CmdSta : {REDUND_UNREPLICABLE} INT;
		PreExecute : {REDUND_UNREPLICABLE} BOOL;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2841;
		type_ : USINT := 0;
		count : USINT := 1;
		option : USINT := 0;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_AutoRefresh (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		PMCDB_pointer : REFERENCE TO PMCDB_struct;
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Enable : {REDUND_UNREPLICABLE} BOOL;
	END_VAR
	VAR_OUTPUT
		Valid : {REDUND_UNREPLICABLE} BOOL;
	END_VAR
	VAR
		FrmCount : {REDUND_UNREPLICABLE} USINT;
		RegVal : {REDUND_UNREPLICABLE} UDINT;
		curXID : {REDUND_UNREPLICABLE} UDINT;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK PMC_StartUpPlanarMotorSystem (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		Execute : {REDUND_UNREPLICABLE} BOOL;
		timeout_limit : {REDUND_UNREPLICABLE} DINT;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL;
		Busy : {REDUND_UNREPLICABLE} BOOL;
		Aborted : {REDUND_UNREPLICABLE} BOOL;
		Error : {REDUND_UNREPLICABLE} BOOL;
		ErrorID : {REDUND_UNREPLICABLE} UINT;
		NumXbots : {REDUND_UNREPLICABLE} USINT;
		Xbot_IDs : {REDUND_UNREPLICABLE} ARRAY[0..77] OF USINT;
	END_VAR
	VAR
		aborted_local : {REDUND_UNREPLICABLE} BOOL;
		busy_local : {REDUND_UNREPLICABLE} BOOL;
		CmdSta : {REDUND_UNREPLICABLE} INT;
		done_local : {REDUND_UNREPLICABLE} BOOL;
		error_local : {REDUND_UNREPLICABLE} BOOL;
		errorID_local : {REDUND_UNREPLICABLE} UINT;
		execute_local : {REDUND_UNREPLICABLE} BOOL;
		ideal_loop_counter : {REDUND_UNREPLICABLE} DINT;
		PMC_ActivateXbots_db : {REDUND_UNREPLICABLE} PMC_ActivateXbots;
		PMC_LevitationCtrl_db : {REDUND_UNREPLICABLE} PMC_LevitationCtrl;
		PMC_ReadXbotState_db : {REDUND_UNREPLICABLE} PMC_ReadXbotState;
		PMC_ReadPmcState_db : {REDUND_UNREPLICABLE} PMC_ReadPmcState;
		pmc_state : {REDUND_UNREPLICABLE} USINT;
		PreExecute_local : {REDUND_UNREPLICABLE} BOOL;
		prestep : {REDUND_UNREPLICABLE} DINT;
		step : {REDUND_UNREPLICABLE} DINT;
		timeout_counter : {REDUND_UNREPLICABLE} DINT;
		xbot_array_index : {REDUND_UNREPLICABLE} DINT;
		xbot_loop_index : {REDUND_UNREPLICABLE} DINT;
		xbot_state : {REDUND_UNREPLICABLE} USINT;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} FUNCTION_BLOCK PMC_CommandManager (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		FBin_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		FBout_pointer : REFERENCE TO ARRAY[0..199] OF UINT;
		IsSetup : BOOL;
		GetTicket : BOOL;
		CompletedTicketNumber : UINT;
		FindTicketNumberResult : UINT;
		SentNewCommand : BOOL;
	END_VAR
	VAR_OUTPUT
		FromPMCBufferAddress : UDINT;
		ToPMCBufferAddress : UDINT;
		NewTicket : UINT;
		ExecutingTicket : UINT;
		TicketResultAddress : UDINT;
	END_VAR
	VAR
		AvailableTicketNumber : UINT;
		PMCRespondedCurrentTicket : BOOL;
		CurrentFrameNumber : INT;
		PMCResponseFrameNumber : INT;
		CmdCounterToPMC : USINT;
		CmdCounterFromPMC : USINT;
		StoredPMCReplies : ARRAY[0..19] OF StoredPMCReply;
		NewStoredPMCReplyIndex : USINT;
		Var1 : {REDUND_UNREPLICABLE} INT;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} FUNCTION_BLOCK PMC_XYMotion_2 (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		AsyncCmdManager : REFERENCE TO PMC_CommandManager;
		Execute : {REDUND_UNREPLICABLE} BOOL; (* Execution of the function block begins on a rising edge of this input.*)
		cmdLB : {REDUND_UNREPLICABLE} UINT;
		XbotID : {REDUND_UNREPLICABLE} USINT;
		Mode : {REDUND_UNREPLICABLE} USINT;
		Type_ : {REDUND_UNREPLICABLE} USINT;
		PosX : {REDUND_UNREPLICABLE} REAL;
		PosY : {REDUND_UNREPLICABLE} REAL;
		EndVel : {REDUND_UNREPLICABLE} REAL;
		MaxVel : {REDUND_UNREPLICABLE} REAL := 1.0;
		MaxAcc : {REDUND_UNREPLICABLE} REAL := 10.0;
	END_VAR
	VAR_OUTPUT
		Done : {REDUND_UNREPLICABLE} BOOL; (* Execution successful. Function block is finished*)
		Busy : {REDUND_UNREPLICABLE} BOOL; (* Function block is active and must continue to be called.*)
		Aborted : {REDUND_UNREPLICABLE} BOOL; (* Command aborted by another command*)
		Error : {REDUND_UNREPLICABLE} BOOL; (* Error occurred during execution.*)
		ErrorID : {REDUND_UNREPLICABLE} UINT; (* Error number*)
		TravelTime : {REDUND_UNREPLICABLE} REAL;
	END_VAR
	VAR
		TicketNumber : UINT;
		SendToPMC : BOOL;
		ReadFromPMC : BOOL;
		TicketCompleted : BOOL;
		CmdSta : {REDUND_UNREPLICABLE} INT;
		cmdHB : {REDUND_UNREPLICABLE} INT;
		timeout : {REDUND_UNREPLICABLE} UINT;
		cmdHBRtn : {REDUND_UNREPLICABLE} INT;
		cmdIDRtn : {REDUND_UNREPLICABLE} UINT;
		dd : {REDUND_UNREPLICABLE} INT;
	END_VAR
	VAR CONSTANT
		cmdID : UINT := 2824;
	END_VAR
	VAR
		TicketResultAddress : UDINT;
	END_VAR
END_FUNCTION_BLOCK

{REDUND_ERROR} FUNCTION_BLOCK PMC_ReadStreamFeedback (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*)
	VAR_INPUT
		PMController : REFERENCE TO PMControllerType; (*Specify the planar motor controller to communicate with*)
		Enable : USINT;
		StreamChannelID : USINT; (*Stream Channel ID starts from 1*)
		XBotAxisID : USINT; (*Axis ID. X=1, Y=2, Z=3, RX=4, RY=5, RZ=6*)
	END_VAR
	VAR_OUTPUT
		Valid : USINT;
		FeedbackPosition : REAL;
	END_VAR
	VAR
		AxisCount : USINT;
		ByteOffset : UINT;
		tempFBAxis : USINT;
		index : USINT;
		CurrentAxisOffset : USINT;
	END_VAR
END_FUNCTION_BLOCK
