                                                                      
(*error codes of the SYS_LIB services*)
VAR CONSTANT
	ERR_BUR_WRROW				: UINT	:= 2061;	(*illegal row*)
	ERR_BUR_WRCOL				: UINT	:= 2062;	(*illegal column*)
	ERR_BUR_WR_CHAR				: UINT	:= 2063;	(*invalid ASCII character*)
	ERR_BUR_NORTC				: UINT	:= 2073;	(*RTC not existing or uninitialized*)

	ERR_BUR_MO_NOTFOUND			: UINT  := 3019;	(*module not found*)
	ERR_BUR_NOMEM				: UINT	:= 3030;	(*out of memory*)
	ERR_BUR_MEMVWBUSY			: UINT	:= 3035;	(*memory management busy*)
	ERR_BUR_ILLPTR				: UINT	:= 3104;	(*illegal data pointer in MEM_free*)

	ERR_BUR_ILLTKNR				: UINT	:= 3300;	(*illegal task-class number*)
	ERR_BUR_WROFFSET			: UINT	:= 3301;	(*illegal offset*)
	ERR_BUR_ILLSTATE			: UINT	:= 3302;	(*illegal state of object*)
	ERR_BUR_NOMSG				: UINT	:= 3303;	(*no message sent/received*)
	ERR_BUR_DUPOBJ				: UINT	:= 3305;	(*object exists*)
	ERR_BUR_TIMEOUT				: UINT	:= 3304;	(*timeout error*)
	ERR_BUR_EXISTS				: UINT	:= 3306;	(*entry exists*)
	ERR_BUR_LCOUNT				: UINT	:= 3307;	(*Linkcnt <> 0 in AVT_cancel ()*)
	ERR_BUR_BURNING				: UINT	:= 3308;	(*error burning module*)
	ERR_BUR_INVALIDMBX			: UINT	:= 3309;	(*invalid mailbox*)

	ERR_BUR_ILLBPTR				: UINT	:= 3310;	(*invalid base pointer*)
	ERR_BUR_ILLTYP				: UINT	:= 3311;	(*invalid I/O type*)
	ERR_BUR_ILLEXT				: UINT	:= 3312;	(*invalid ext. bit*)
	ERR_BUR_ILLVER				: UINT	:= 3313;	(*invalid version, e.g. BURTRAP V1.10 to SPSSW V1.05*)
	ERR_BUR_ILLLEN				: UINT	:= 3314;	(*invalid data length*)
	ERR_BUR_MAX_LCOUNT			: UINT	:= 3315;	(*AVT_attach: LCOUNT > 127*)
	ERR_BUR_AVT_FREE			: UINT	:= 3316;	(*AVT_release:LCOUNT = 0*)
	ERR_BUR_ILLPAR				: UINT	:= 3317;	(*illegal parameter*)
	ERR_BUR_INSTALL				: UINT	:= 3318;	(*error install datamodule*)
	ERR_BUR_WRONG_MODTYP		: UINT	:= 3319;	(*wrong module type*)

	ERR_BUR_OBJDEL				: UINT	:= 3320;	(*object already deleted*)
	ERR_BUR_ILLOBJ				: UINT	:= 3324;	(*object does not exist*)
	ERR_BUR_ILLOBJTYP			: UINT	:= 3328;	(*invalid object type*)
	ERR_BUR_NOENTRY				: UINT	:= 3332;	(*no entry*)
	ERR_BUR_TOOLONG_PVNAME		: UINT	:= 3333;	(*too long PV name*)
	ERR_BUR_ILLIDENT			: UINT	:= 3336;	(*illegal ident*)
	ERR_BUR_NOSMBUF				: UINT	:= 3560;	(*no more semaphore buffers*)
	ERR_BUR_NOSM				: UINT	:= 3564;	(*semaphore not available*)
	ERR_BUR_SMDEL				: UINT	:= 3568;	(*semaphore deleted*)
	ERR_BUR_NOTIME				: UINT	:= 3584;	(*time not available*)
	ERR_BUR_ILLDATE				: UINT	:= 3588;	(*date : out of range*)
	ERR_BUR_ILLTIME				: UINT	:= 3592;	(*time : out of range*)
	ERR_BUR_ILLTICKS			: UINT	:= 3596;	(*ticks : out of range*)

	ERR_BUR_MEM_ALLOC			: UINT	:= 3600;	(*not enough continuous memory*)
	ERR_BUR_TMP_ALLOC			: UINT	:= 3601;	(*not enough continuous memory*)
	ERR_BUR_MEM_FREE			: UINT	:= 3700;	(*invalid pointer/length*)
	ERR_BUR_TMP_FREE			: UINT	:= 3701;	(*invalid pointer/length*)
 END_VAR

(*state for object PLC task*)
VAR CONSTANT
	Z_ST_created				: UINT	:= 1;		(*object installed*)
	Z_ST_running				: UINT	:= 2;		(*object running*)
	Z_ST_blocked				: UINT	:= 3;		(*object stopped*)
	Z_ST_exist					: UINT	:= 16#00;	(*object exists*)
	Z_ST_installed				: UINT	:= 16#82;	(*temporary status during installation*)
	Z_ST_PVinstalled			: UINT	:= 16#83;	(*temporary status during installation*)
	Z_ST_IOinstalled			: UINT	:= 16#84;	(*temporary status during installation*)
	Z_ST_IOdeinstalled			: UINT	:= 16#85;	(*temporary status during installation*)
	Z_ST_PVdeinstalled			: UINT	:= 16#86;	(*temporary status during installation*)
	Z_ST_delete					: UINT	:= 16#87;	(*temporary status during installation*)
	Z_ST_stdebug				: UINT	:= 16#88;	(*temporary status during installation*)
	Z_ST_tmp_suspended			: UINT	:= 16#90;	(*object temporarily stopped*)
END_VAR

(*OBSOLETE PV data types*)
VAR CONSTANT
	PB_DT_STRUCT				: UINT	:= 0;		(*OBSOLETE*)
	PB_DT_BOOL					: UINT	:= 1;		(*OBSOLETE*)
	PB_DT_INT8					: UINT	:= 2;		(*OBSOLETE*)
	PB_DT_INT16					: UINT	:= 3;		(*OBSOLETE*)
	PB_DT_INT32					: UINT	:= 4;		(*OBSOLETE*)
	PB_DT_BYTE					: UINT	:= 5;		(*OBSOLETE*)
	PB_DT_WORD					: UINT	:= 6;		(*OBSOLETE*)
	PB_DT_LONG					: UINT	:= 7;		(*OBSOLETE*)
	PB_DT_FLOAT					: UINT	:= 8;		(*OBSOLETE*)
	PB_DT_VIS					: UINT	:= 9;		(*OBSOLETE*)
	PB_DT_OCTET					: UINT	:= 10;		(*OBSOLETE*)
	PB_DT_DATE					: UINT	:= 11;		(*OBSOLETE*)
	PB_DT_TIME					: UINT	:= 12;		(*OBSOLETE*)
	PB_DT_DIFF					: UINT	:= 13;		(*OBSOLETE*)
	PB_DT_BIT					: UINT	:= 14;		(*OBSOLETE*)
	PB_DT_ARRAY					: UINT	:= 15;		(*OBSOLETE*)
END_VAR

(*elementary data types*)
VAR CONSTANT
	SYSLIB_IEC_TYPE_USER_DEFINED	: USINT	:= 0;	(*User-defined data type*)
	SYSLIB_IEC_TYPE_USER_DEFINED_2	: USINT	:= 15;	(*User-defined data type (legacy: array of structs)*)
	SYSLIB_IEC_TYPE_BOOL			: USINT	:= 1;	(*8 Bit containing a boolean value FALSE=0 or TRUE=1*)
	SYSLIB_IEC_TYPE_SINT			: USINT	:= 2;	(*8 Bit signed integer*)
	SYSLIB_IEC_TYPE_INT				: USINT	:= 3;	(*16 Bit signed integer*)
	SYSLIB_IEC_TYPE_DINT			: USINT	:= 4;	(*32 Bit signed integer*)
	SYSLIB_IEC_TYPE_USINT			: USINT	:= 5;	(*8 Bit unsigned integer*)
	SYSLIB_IEC_TYPE_UINT			: USINT	:= 6;	(*16 Bit unsigned integer*)
	SYSLIB_IEC_TYPE_UDINT			: USINT	:= 7;	(*32 Bit unsigned integer*)
	SYSLIB_IEC_TYPE_REAL			: USINT	:= 8;	(*32 Bit floating point number*)
	SYSLIB_IEC_TYPE_STRING			: USINT	:= 9;	(*Variable-length single-byte character string*)
	SYSLIB_IEC_TYPE_DATE_AND_TIME	: USINT	:= 11;	(*32 Bit of Date in Seconds since 01.01.1970 00:00:00*)
	SYSLIB_IEC_TYPE_TIME			: USINT	:= 12;	(*32 Bit of Time in ms*)
	SYSLIB_IEC_TYPE_DATE			: USINT	:= 13;	(*32 Bit of Date (only)*)
	SYSLIB_IEC_TYPE_LREAL			: USINT	:= 14;	(*64 Bit floating point number*)
	SYSLIB_IEC_TYPE_TIME_OF_DAY		: USINT	:= 16;	(*32 Bit Time of day (only)*)
	SYSLIB_IEC_TYPE_BYTE			: USINT	:= 17;	(*Bit string of length 8*)
	SYSLIB_IEC_TYPE_WORD			: USINT	:= 18;	(*Bit string of length 16*)
	SYSLIB_IEC_TYPE_DWORD			: USINT	:= 19;	(*Bit string of length 32*)
	SYSLIB_IEC_TYPE_WSTRING			: USINT	:= 21;	(*Variable-length double-byte character string*)
END_VAR

(*memory types*)
VAR CONSTANT
	SYS_RAM						: UINT	:= 1;		(*RAM*)
	USER_ROM1					: UINT	:= 2;		(*EPROM*)
	FIX_RAM						: UINT	:= 5;		(*fixed RAM*)
END_VAR

(*shutdown/reboot types*)
VAR CONSTANT
	SYSLIB_WARMSTART				: USINT	:= 16#01;	(*WARMSTART (with restart)*)
	SYSLIB_COLDSTART				: USINT	:= 16#02;	(*COLDSTART (with restart)*)
	SYSLIB_WARMSTART_NO_REBOOT		: USINT	:= 16#11;	(*WARMSTART (no restart, only shutdown)*)
	SYSLIB_COLDSTART_NO_REBOOT		: USINT	:= 16#12;	(*COLDSTART (no restart, only shutdown)*)
	SYSLIB_DIAGNOSTICS				: USINT	:= 16#20;	(*DIAGNOSTICS (with restart)*)
	SYSLIB_SERVICE					: USINT	:= 16#40;	(*SERVICE (with restart) *)
END_VAR