/***********************************************************************
*  (c)       : ABB Automation Products GmbH                            *
************************************************************************
*  System    : PDM 6.0+SP1+HF1
*-----------------------------------------------------------------------
*  Compiler  : PDM 6.0
*-----------------------------------------------------------------------
*  Date      : 2007/12/01
*-----------------------------------------------------------------------
*  Revision  : 0.1.1 (DD_REVISION 1)
*-----------------------------------------------------------------------
*  Author    : Pradipta Kishore Bala (INCRC,INDIA)
******************+*****************************************************
*  Device:		ABB TTX300
*  Communication:	PROFIBUS PA
***********************************************************************/

MANUFACTURER	26,
DEVICE_TYPE		1,
DEVICE_REVISION 	1,//0x0300,
DD_REVISION		1

//-----------------------------------------------------------------------------
//				Include Files
//-----------------------------------------------------------------------------

//#ifdef _PDM_
//  #include "SIPAST_CommError.inc"
  #include "SI_OptM.inc"
  #include "SI_HlpM.inc"
  #include "SI_FileM.inc"
  #include "SIPAST.inc"
//#endif


#include "Func_DI1_blk.dd"
#include "Func_DI2_blk.dd"
#include "Func_AI1_blk.dd"
#include "Func_AI2_blk.dd"
#include "Func_AI3_blk.dd"
#include "Func_AI4_blk.dd"
#include "Func_AO_blk.dd"
#include "Trans1_blk.dd"
#include "Trans2_blk.dd"
#include "Trans3_blk.dd"
#include "Phys_blk.dd"
#include "Unit_Relation_blk.dd"
#include "Menu_Bar_blk.dd"
#include "Online_windows_blk.dd"
#include "Online_Dialogs_blk.dd"
#include "Table_blk.dd"
#include "Diag.dd"
#include "TTX300_Define.dd"

/***********************************************************************/
/*    RENAME Variables							*/
/***********************************************************************/

COLLECTION OF VARIABLE rename_value
{
    MEMBERS
	{
		PHYS_ST_REV,			phys_st_rev,					[blk_block_object_PHYSICAL];
		TRANS_ST_REV,			trans1_st_rev,					[blk_block_object_TRANSDUCER_TEMPERATURE];
		FUNC_ST_REV,			func1_AI_st_rev,				[func_blk_class_AI1_PV];
		FUNC_ST_REV2,			func2_AI_st_rev,				[func_blk_class_AI2_SV1];
		FUNC_ST_REV3,			func3_AI_st_rev,				[func_blk_class_AI3_SV2];
		FUNC_ST_REV4,			func4_AI_st_rev,				[func_blk_class_AI4_SV3];
		TRANS_ST_REV1,			trans2_st_rev,					[trans2_HMI];
		FUNC_ST_REV5,			func1_AO_st_rev,				[func_blk_class_AO];
		TRANS_ST_REV2,			trans3_st_rev,					[trans3_extnd_diag];
		FUNC_ST_REV6,			func1_DI_st_rev,				"|en|Digital Input 1|de|Digitaleingang 1";
		FUNC_ST_REV7,			func1_DI2_st_rev,				"|en|Digital Input 2|de|Digitaleingang 2";
	}
}

/***********************************************************************/
#define	BLOCK_MODE_AUTO					0x08
#define	BLOCK_MODE_OUT_OF_SERVICE			0x80
#define BLOCK_MODE_MAN					0x10
#define BLOCK_MODE_RCAS					0x02
#define BLOCK_MODE_LO					0x20

#define	CHANNEL_PRIMARY				0x0108
#define	CHANNEL_SECONDARY_1			0x010A
#define	CHANNEL_SECONDARY_2			0x010B
#define	CHANNEL_SECONDARY_3			0x013E


#define	DEVICE_TYPE				[menu_ident_TTX300]

/*************************************************************************/
#ifndef FUNC_AI_FAIL_SAFE_VALUE
	#define FUNC_AI_FAIL_SAFE_VALUE			0
	#define FUNC_AI_STORING_LAST_SETPOINT	1
	#define FUNC_AI_FAIL_SAFE_POSITION		2
#endif

/*-----------------------------------------------------------------------*/
/*-----------------------------------------------------------------------*/

#ifndef PHYS_FACTORY_RESET_ADDRESS
#define PHYS_FACTORY_RESET_ADDRESS	2712
#endif

#ifndef PHYS_FACTORY_RESET_CMD
#define PHYS_FACTORY_RESET_CMD	2506
#endif


/******************************************************************************/
// for diagnosis_extension command
VARIABLE	dummy_word
{
	LABEL		"";
	CLASS		LOCAL;
	TYPE		UNSIGNED_INTEGER (2);
	HANDLING	READ;
}



/*******************************************************************************/
/*****	Methods		************************************************************/
/*******************************************************************************/
/*
METHOD method_set
{
	LABEL		[download_label];
	HELP		[transfer_help];
	DEFINITION
	{
   	}
}
*/


/*******************************************************************************/
/*****	Methods		************************************************************/
/*******************************************************************************/

METHOD method_set
{
	LABEL		[transfer];
	HELP		[transfer_help];
	DEFINITION
	{
	}
}

METHOD method_phys_factory_reset_params
{
	LABEL		[factory_reset_PARAMS];
	DEFINITION
	{
		int status;

		ACKNOWLEDGE([factory_reset_PARAMS]);

		phys_factory_reset = 1; //	[factory_reset_PARAMS]

		status = WriteCommand (write_phys_factory_reset);
	}
}


METHOD method_phys_factory_reset_warm
{
	LABEL		[phys_device_reset_cmd];
	DEFINITION
	{
		int status;
		char sz[512] ;
		int iLen ;

		get_dictionary_string(phys_device_reset_cmd, sz, iLen) ;

#ifdef _V510_
		sz += "\r\n\r\n" ;
		sz += [note_connection_will_be_aborted] ;
#endif

		ACKNOWLEDGE(sz);

		phys_factory_reset = PHYS_FACTORY_RESET_CMD ;

		status = WriteCommand (write_phys_factory_reset);

		if( status == 17456 )
		{
			ACKNOWLEDGE([not_supported]) ;
		}
	}
}


METHOD method_phys_factory_reset_address
{
	LABEL		[factory_reset_ADDRESS];
	DEFINITION
	{
		int status;
		char sz[512] ;
		int iLen ;

		get_dictionary_string(factory_reset_ADDRESS, sz, iLen) ;

#ifdef _V510_
		sz += "\r\n\r\n" ;
		sz += [note_connection_will_be_aborted] ;
#endif

		ACKNOWLEDGE(sz);

		phys_factory_reset = PHYS_FACTORY_RESET_ADDRESS;

		status = WriteCommand (write_phys_factory_reset);

		if( status == 17456 )
		{
			ACKNOWLEDGE([not_supported]) ;
		}
	}
}


METHOD	set_software_write_protection
{
	LABEL	"|en|SW Write Protection|de|SW Schreibgeschützt";
	DEFINITION
	{
		int status;
		char sz[512];
		int iLen;
		int result;
		long var_id[2];
		var_id[0]= VARID(phys_write_locking);
		var_id[1]=VARID(phys_hw_write_protection);
		acknowledge("Please note!\nPresently device is %{1}\nSoftware protection possible",var_id);
		
		switch(phys_hw_write_protection)
		{
			case 0:
			{
				acknowledge("Software Write ptotection state of device : %{0}",var_id);
				if(phys_write_locking == 0)
				{
					result=SELECT_FROM_LIST("Device is write protected by SW\nRelease the write protection?","Yes;No");
					if (result==0)	//he answered yes
					{
							phys_write_locking = 2457;
							status = WriteCommand (write_phys_write_locking);
					}
					else
					{
						acknowledge("Device is %{0}",var_id);
						process_abort();
					}
				}
				else
				{
					if(phys_write_locking == 2457)
					{
						result=SELECT_FROM_LIST("Device is not write protected by SW\nActivate the write protection?","Yes;No");
						if(result==0)
						{
							phys_write_locking = 0;
							status = WriteCommand (write_phys_write_locking);
						}
						else
						{
							acknowledge("Device is %{0}",var_id);
							process_abort();
						}						
					}
				}
				
			}
			break;
			case 2:
			{
				get_dictionary_string(write_protected_HW_JUMPER, sz, iLen);
				DELAY(2, sz);
				process_abort();				
			}
			break;
		}
		acknowledge("Presently Device is %{0}",var_id);
	}
}



/**********************************************************************************/
/**********************************************************************************/
/**********************************************************************************/
/**********************************************************************************/



/*******************************************************************************/
/*****	Commands  **************************************************************/
/*******************************************************************************/

MENU download_variables
{
	LABEL		[menu_load_to_PC];
	ITEMS
	{
		//Tabs_phys_blk								,
		phys_device_man_id,
		phys_device_id,
		phys_device_ser_num,
		phys_software_rev,
		phys_hardware_rev,
		phys_install_date,
		phys_blk_profile_rev,
		phys_ident_number_selector,
		phys_device_certification,
		device_assembly_date,
//		phys_local_op_ena,
		phys_tag_desc								  ,
		phys_descriptor								  ,
		phys_message,
		phys_cond_status_diag,
		//Tab_st_rev									,
		rename_value.PHYS_ST_REV,
		rename_value.TRANS_ST_REV,
		rename_value.TRANS_ST_REV1,
		rename_value.TRANS_ST_REV2,
		rename_value.FUNC_ST_REV,
		rename_value.FUNC_ST_REV2,
		rename_value.FUNC_ST_REV3,
		rename_value.FUNC_ST_REV4,
		rename_value.FUNC_ST_REV5,
		rename_value.FUNC_ST_REV6,
		rename_value.FUNC_ST_REV7,

		//Tab_s_input_trans1_s1									,
	   	trans1_tag_desc,
	   	trans1_lin_type,
		trans1_bias_1,
		trans1_reference_junction_type,
		trans1_external_reference_junction_value,
		trans1_sensor_connection,
		trans1_comp_wire_1,
		trans1_lower_sensor_limit,
		trans1_upper_sensor_limit,
		trans1_sensor_measure_type,
		trans1_primary_value_unit,
		trans1_noise_filter_selection,

		//Tab_s_trans1_CVD,
//		trans1_cvd_1_0,
//		trans1_cvd_1_1,
//		trans1_cvd_1_2,
//		trans1_cvd_1_3,

		//Tab_s_trans1_calibration,
//		trans1_cal_point_lo_1,
//		trans1_cal_point_hi_1,
//		trans1_cal_unit1,

		//Tab_s_trans1_fixpoint,
//		trans1_fixpoint_in_unit_1,
//		trans1_fixpoint_out_unit_1,
//		fixpoint_1_x_data,
//		fixpoint_1_y_data,

		//Tab_s_input_trans1_s2
		trans1_lin_type2, //NEW
		trans1_bias_2,
		trans1_reference_junction_type2,		  //NEW
		trans1_external_reference_junction_value2,//NEW
		trans1_sensor_connection2, //NEW
		trans1_comp_wire_2,
		trans1_lower_sensor_limit2,
		trans1_upper_sensor_limit2,

		//Tab_s_trans1_CVD_2,
//		trans1_cvd_2_0,
//		trans1_cvd_2_1,
//		trans1_cvd_2_2,
//		trans1_cvd_2_3,

		//Tab_s_trans1_calibration_2,
//		trans1_cal_point_lo_2,
//		trans1_cal_point_hi_2,
//		trans1_cal_unit2,

		//Tab_s_trans1_fixpoint_table_2,
//		trans1_fixpoint_in_unit_2,
//		trans1_fixpoint_out_unit_2,
//		fixpoint_2_x_data,
//		fixpoint_2_y_data,

		//Tab_s_trans_hmi
		trans2_st_rev,
		trans2_tag_desc,
		trans2_language,
		trans2_contrast,
		trans2_local_operation,
		trans2_select_view1,
		trans2_select_view_2_line_1,
		trans2_select_view_2_line_2,
		trans2_autoscroll,

		//Tab_s_trans_extnd_diag
		trans3_tag_desc,
//		trans3_mask_1,
//		trans3_mask_2,


		//Tab_s_ai1						,
		func1_AI_tag_desc,
//		func1_AI_out_value,
//		func1_AI_out_status_quality,
//		func1_AI_out_status_limit,
		func1_AI_pv_lower_range_value,
		func1_AI_pv_upper_range_value,
		func1_AI_out_lower_range_value,
		func1_AI_out_upper_range_value,
		func1_AI_out_unit,
//		func1_AI_out_decimal_point,
//		func1_AI_lin_type,
		func1_AI_pv_ftime,
		func1_AI_FSafeType,
		func1_AI_FSafeValue,
		func1_AI_alarm_hys,
		func1_AI_hi_hi_lim,
		func1_AI_hi_lim,
		func1_AI_lo_lim,
		func1_AI_lo_lo_lim,
//		func1_AI_simulate_value,
//		func1_AI_simulate_status_quality,
//		func1_AI_simulate_status_limit,
//		func1_AI_simulation_enabled,

		//Tab_s_ai2						,
		func2_AI_tag_desc,
//		func2_AI_out_value,
//		func2_AI_out_status_quality,
//		func2_AI_out_status_limit,
		func2_AI_pv_lower_range_value,
		func2_AI_pv_upper_range_value,
		func2_AI_out_lower_range_value,
		func2_AI_out_upper_range_value,
		func2_AI_out_unit,
//		func2_AI_out_decimal_point,
//		func2_AI_lin_type,
		func2_AI_pv_ftime,
		func2_AI_FSafeType,
		func2_AI_FSafeValue,
		func2_AI_alarm_hys,
		func2_AI_hi_hi_lim,
		func2_AI_hi_lim,
		func2_AI_lo_lim,
		func2_AI_lo_lo_lim,
//		func2_AI_simulate_value,
//		func2_AI_simulate_status_quality,
//		func2_AI_simulate_status_limit,
//		func2_AI_simulation_enabled,

		//Tab_s_ai3						,
		func3_AI_tag_desc,
//		func3_AI_out_value,
//		func3_AI_out_status_quality,
//		func3_AI_out_status_limit,
		func3_AI_pv_lower_range_value,
		func3_AI_pv_upper_range_value,
		func3_AI_out_lower_range_value,
		func3_AI_out_upper_range_value,
		func3_AI_out_unit,
//		func3_AI_out_decimal_point,
//		func3_AI_lin_type,
		func3_AI_pv_ftime,
		func3_AI_FSafeType,
		func3_AI_FSafeValue,
		func3_AI_alarm_hys,
		func3_AI_hi_hi_lim,
		func3_AI_hi_lim,
		func3_AI_lo_lim,
		func3_AI_lo_lo_lim,
//		func3_AI_simulate_value,
//		func3_AI_simulate_status_quality,
//		func3_AI_simulate_status_limit,
//		func3_AI_simulation_enabled,

		//Tab_s_ai4						,
		func4_AI_tag_desc,
//		func4_AI_out_value,
//		func4_AI_out_status_quality,
//		func4_AI_out_status_limit,
		func4_AI_pv_lower_range_value,
		func4_AI_pv_upper_range_value,
		func4_AI_out_lower_range_value,
		func4_AI_out_upper_range_value,
		func4_AI_out_unit,
//		func4_AI_out_decimal_point,
//		func4_AI_lin_type,
		func4_AI_pv_ftime,
		func4_AI_FSafeType,
		func4_AI_FSafeValue,
		func4_AI_alarm_hys,
		func4_AI_hi_hi_lim,
		func4_AI_hi_lim,
		func4_AI_lo_lim,
		func4_AI_lo_lo_lim,
//		func4_AI_simulate_value,
//		func4_AI_simulate_status_quality,
//		func4_AI_simulate_status_limit,
//		func4_AI_simulation_enabled,

		//Tab_s_ao_up_down
		func1_AO_tag_desc,
//		func1_AO_setpoint_value,
//		func1_AO_setpoint_status,
		func1_AO_pv_upper_range_value,
		func1_AO_pv_lower_range_value,
		func1_AO_pv_unit,
//		func1_AO_pv_decimal_point,
//		func1_AO_out_value,
//		func1_AO_out_status,
		func1_AO_out_upper_range_value,
		func1_AO_out_lower_range_value,
		func1_AO_out_unit,
//		func1_AO_out_decimal_point
		func1_AO_fsafe_time,
		func1_AO_fsafe_type,
		func1_AO_fsafe_value,

		//Tab_s_di1
		func1_DI_tag_desc,
//		func1_DI_out_value,
//		func1_DI_out_status_quality,
//		func1_DI_out_status_limit,
		func1_DI_invert,
		func1_DI_fsafe_type,
		func1_DI_fsafe_value,
//		func1_DI_simulate_value,
//		func1_DI_simulate_status_quality,
//		func1_DI_simulate_status_limit,
//		func1_DI_simulation_enabled,

		//Tab_s_di2
		func1_DI2_tag_desc,
//		func1_DI2_out_value,
//		func1_DI2_out_status_quality,
//		func1_DI2_out_status_limit,
		func1_DI2_invert,
		func1_DI2_fsafe_type,
		func1_DI2_fsafe_value
//		func1_DI2_simulate_value,
//		func1_DI2_simulate_status_quality,
//		func1_DI2_simulate_status_limit,
//		func1_DI2_simulation_enabled,
   }
}


/* -------------------------------------------------------------------------*/
/* ------- UPLOAD TO THE DEVICE --------------------------------------------*/
/* -------------------------------------------------------------------------*/

MENU upload_variables
{
	LABEL		[menu_load_to_device];
	ITEMS
	{
		phys_tag_desc								  ,
		phys_descriptor								  ,
		phys_message								  ,
		phys_install_date							  ,
		phys_ident_number_selector							  ,
		phys_cond_status_diag,
		trans1_tag_desc,
		trans1_lin_type,
		trans1_bias_1,
		trans1_reference_junction_type,
		trans1_external_reference_junction_value,
		trans1_sensor_connection,
		trans1_comp_wire_1,
		trans1_sensor_measure_type,
		trans1_primary_value_unit,
		trans1_noise_filter_selection,


		//Tab_s_trans1_CVD,
//		trans1_cvd_1_0,
//		trans1_cvd_1_1,
//		trans1_cvd_1_2,
//		trans1_cvd_1_3,

		//Tab_s_trans1_calibration,
//		trans1_cal_point_lo_1,
//		trans1_cal_point_hi_1,
//		trans1_cal_unit1,

		//Tab_s_trans1_fixpoint,
//		trans1_fixpoint_in_unit_1,
//		trans1_fixpoint_out_unit_1,
//		fixpoint_1_x_data,
//		fixpoint_1_y_data,

		//Tab_s_input_trans1_s2
		trans1_lin_type2, //NEW
		trans1_bias_2,
		trans1_reference_junction_type2,		  //NEW
		trans1_external_reference_junction_value2,//NEW
		trans1_sensor_connection2, //NEW
		trans1_comp_wire_2,

		//Tab_s_trans1_CVD_2,
//		trans1_cvd_2_0,
//		trans1_cvd_2_1,
//		trans1_cvd_2_2,
//		trans1_cvd_2_3,

		//Tab_s_trans1_calibration_2,
//		trans1_cal_point_lo_2,
//		trans1_cal_point_hi_2,
//		trans1_cal_unit2,

		//Tab_s_trans1_fixpoint_table_2,
//		trans1_fixpoint_in_unit_2,
//		trans1_fixpoint_out_unit_2,
//		fixpoint_2_x_data,
//		fixpoint_2_y_data,

		//Tab_s_trans_hmi
		trans2_st_rev,
		trans2_tag_desc,
		trans2_language,
		trans2_contrast,
		trans2_local_operation,
		trans2_select_view1,
		trans2_select_view_2_line_1,
		trans2_select_view_2_line_2,
		trans2_autoscroll,

		//Tab_s_trans_extnd_diag
		trans3_tag_desc,
//		trans3_mask_1,
//		trans3_mask_2,

		//Tab_s_ai1						,
		func1_AI_tag_desc,
//		func1_AI_out_value,
//		func1_AI_out_status_quality,
//		func1_AI_out_status_limit,
		func1_AI_pv_lower_range_value,
		func1_AI_pv_upper_range_value,
		func1_AI_out_lower_range_value,
		func1_AI_out_upper_range_value,
		func1_AI_out_unit,
//		func1_AI_out_decimal_point,
//		func1_AI_lin_type,
		func1_AI_pv_ftime,
		func1_AI_FSafeType,
		func1_AI_FSafeValue,
		func1_AI_alarm_hys,
		func1_AI_hi_hi_lim,
		func1_AI_hi_lim,
		func1_AI_lo_lim,
		func1_AI_lo_lo_lim,
//		func1_AI_simulate_value,
//		func1_AI_simulate_status_quality,
//		func1_AI_simulate_status_limit,
//		func1_AI_simulation_enabled,

		//Tab_s_ai2						,
		func2_AI_tag_desc,
//		func2_AI_out_value,
//		func2_AI_out_status_quality,
//		func2_AI_out_status_limit,
		func2_AI_pv_lower_range_value,
		func2_AI_pv_upper_range_value,
		func2_AI_out_lower_range_value,
		func2_AI_out_upper_range_value,
		func2_AI_out_unit,
//		func2_AI_out_decimal_point,
//		func2_AI_lin_type,
		func2_AI_pv_ftime,
		func2_AI_FSafeType,
		func2_AI_FSafeValue,
		func2_AI_alarm_hys,
		func2_AI_hi_hi_lim,
		func2_AI_hi_lim,
		func2_AI_lo_lim,
		func2_AI_lo_lo_lim,
//		func2_AI_simulate_value,
//		func2_AI_simulate_status_quality,
//		func2_AI_simulate_status_limit,
//		func2_AI_simulation_enabled,

		//Tab_s_ai3						,
		func3_AI_tag_desc,
//		func3_AI_out_value,
//		func3_AI_out_status_quality,
//		func3_AI_out_status_limit,
		func3_AI_pv_lower_range_value,
		func3_AI_pv_upper_range_value,
		func3_AI_out_lower_range_value,
		func3_AI_out_upper_range_value,
		func3_AI_out_unit,
//		func3_AI_out_decimal_point,
//		func3_AI_lin_type,
		func3_AI_pv_ftime,
		func3_AI_FSafeType,
		func3_AI_FSafeValue,
		func3_AI_alarm_hys,
		func3_AI_hi_hi_lim,
		func3_AI_hi_lim,
		func3_AI_lo_lim,
		func3_AI_lo_lo_lim,
//		func3_AI_simulate_value,
//		func3_AI_simulate_status_quality,
//		func3_AI_simulate_status_limit,
//		func3_AI_simulation_enabled,

		//Tab_s_ai4						,
		func4_AI_tag_desc,
//		func4_AI_out_value,
//		func4_AI_out_status_quality,
//		func4_AI_out_status_limit,
		func4_AI_pv_lower_range_value,
		func4_AI_pv_upper_range_value,
		func4_AI_out_lower_range_value,
		func4_AI_out_upper_range_value,
		func4_AI_out_unit,
//		func4_AI_out_decimal_point,
//		func4_AI_lin_type,
		func4_AI_pv_ftime,
		func4_AI_FSafeType,
		func4_AI_FSafeValue,
		func4_AI_alarm_hys,
		func4_AI_hi_hi_lim,
		func4_AI_hi_lim,
		func4_AI_lo_lim,
		func4_AI_lo_lo_lim,
//		func4_AI_simulate_value,
//		func4_AI_simulate_status_quality,
//		func4_AI_simulate_status_limit,
//		func4_AI_simulation_enabled,

		//Tab_s_ao_up_down
		func1_AO_tag_desc,
//		func1_AO_setpoint_value,
//		func1_AO_setpoint_status,
		func1_AO_pv_upper_range_value,
		func1_AO_pv_lower_range_value,
		func1_AO_pv_unit,
//		func1_AO_pv_decimal_point,
//		func1_AO_out_value,
//		func1_AO_out_status,
		func1_AO_out_upper_range_value,
		func1_AO_out_lower_range_value,
		func1_AO_out_unit,
//		func1_AO_out_decimal_point
		func1_AO_fsafe_time,
		func1_AO_fsafe_type,
		func1_AO_fsafe_value,

		//Tab_s_di1
		func1_DI_tag_desc,
//		func1_DI_out_value,
//		func1_DI_out_status_quality,
//		func1_DI_out_status_limit,
		func1_DI_invert,
		func1_DI_fsafe_type,
		func1_DI_fsafe_value,
//		func1_DI_simulate_value,
//		func1_DI_simulate_status_quality,
//		func1_DI_simulate_status_limit,
//		func1_DI_simulation_enabled,

		//Tab_s_di2
		func1_DI2_tag_desc,
//		func1_DI2_out_value,
//		func1_DI2_out_status_quality,
//		func1_DI2_out_status_limit,
		func1_DI2_invert,
		func1_DI2_fsafe_type,
		func1_DI2_fsafe_value
//		func1_DI2_simulate_value,
//		func1_DI2_simulate_status_quality,
//		func1_DI2_simulate_status_limit,
//		func1_DI2_simulation_enabled,

	}
}


IMAGE   Picture_TTX300PA_1
{
	LABEL	"";
	PATH	"Temperature_TTX300-PA.gif";
	LINK	Online_Window_diagnosis;
}

IMAGE	Picture_TTX300PA_2
{
	LABEL	"";
	PATH	"TTH300.gif";
	LINK	Online_Window_diagnosis;
}

IMAGE	Out_spec
{
	LABEL	"";
	PATH
	IF (diag_worst_cond == 0x3FFF)
	{
		"DeviceOK_32x32.gif";
	}
	ELSE
	{
	   IF (0x0000 == (diag_worst_cond & 0xC000))
	   {
	   	"DeviceCheckFunction_32x32.gif";
	   }
	   ELSE
	   {
	   	IF (0x4000 == (diag_worst_cond & 0xC000))
	   	{
	   		"DeviceOffSpecification_32x32.gif";
	   	}
	   	ELSE
	   	{
	   		IF (0x8000 == (diag_worst_cond & 0xC000))
	   		{
	   			"DeviceMaintenance_32x32.gif";
	   		}
	   		ELSE
	   		{
  				"DeviceFailure_32x32.gif";
   			}
		}
	   }
	}
}

