/************************************************************************
* Endress + Hauser Wetzer GmbH + Co KG                                  
*                                                                       
* Project-Name:    G3PA - TMT84 Profibus-PA Temperature Head Transmitter
* File-Name:       PBPA_EH1551_0101_main.ddl  		                  
*                                                                       
* Revision:        1.00.02                                                  
*                  Compatible to Firmware 01.00.xx
* Date::           feb. 2009                                           
*                                                                       
* Original Author: Christian Schneid                                    
*                                                                       
* ----------------------------------------------------------------------
* Description:   Device Description for TMT84.                          
* ----------------------------------------------------------------------
*                                                                       
*/



// DD Version: 00.02.00
// Generator Version: 1.6.0.0


MANUFACTURER ENDRESS_HAUSER, DEVICE_TYPE 0x1551, DEVICE_REVISION 0x01, DD_REVISION 0x01

#define DEVICE_MANUAL_FILENAME "BA257ren_0708.pdf"

#define PHYSICAL_BLOCK_SLOT		0
#define TRANS1_BLOCK_SLOT		1
#define TRANS2_BLOCK_SLOT		2
#define AI1_BLOCK_SLOT			1
#define AI2_BLOCK_SLOT			2
#define AI3_BLOCK_SLOT			3
#define AI4_BLOCK_SLOT			4

/* include standard macros */
#include "PBPA_EH_1551_0101_enum_entrys.inc"
#include "PBPA_EH_1551_0101_toolbar_ident.inc"
#include "PBPA_EH_1551_0101_methods.inc"
#include "sipast_macros_300.inc"
#include "SI_MainMenu.inc"
#include "SI_HlpM.inc"

/***************************************************************************************
** Defines used in Conditionals (MENU, VALIDITY, HANDLING)
***************************************************************************************/

#define IS_SENS1_RTD      	(((trans1_lin_type >= 102) && (trans1_lin_type <= 126)) || ((trans1_lin_type >= 240) && (trans1_lin_type <= 246)))
#define IS_SENS1_OHM      	((trans1_lin_type == 0) && ((trans1_input_range == 128) || (trans1_input_range == 129)))
#define IS_SENS1_TC       	((trans1_lin_type >= 128) && (trans1_lin_type <= 140))
#define IS_SENS1_MV       	((trans1_lin_type == 0) && ((trans1_input_range == 0) || (trans1_input_range == 1)))
#define IS_SENS1_NO_SENSOR 	(trans1_lin_type == 251)

#define IS_SENS1_2WIRE		(trans1_sensor_connection == 0)
#define IS_SENS1_3WIRE		(trans1_sensor_connection == 1)
#define IS_SENS1_4WIRE		(trans1_sensor_connection == 2)

#define IS_SENS2_TC       	((trans2_lin_type >= 128) && (trans2_lin_type <= 140))
#define IS_SENS2_MV       	((trans2_lin_type == 0) && ((trans2_input_range == 0) || (trans2_input_range == 1)))

/***************************************************************************************
** Header
***************************************************************************************/

#ifdef _V600_
IMAGE HeaderImage
{
    PATH IF(phys_diagnostic_code_integer == 1194340400)
	{
		"1551_0101_EH_FMCS_ok.bmp";
	}
	ELSE
	{
		IF(phys_diagnostic_code_integer > 1174405120 && phys_diagnostic_code_integer < 1191182336)
		{
			"1551_0101_EH_FMCS_failure.bmp";
		}
		ELSE
		{
			IF(phys_diagnostic_code_integer > 1291845632 && phys_diagnostic_code_integer < 1308622848)
			{
				"1551_0101_EH_FMCS_maintenance.bmp";
			}
			ELSE
			{
				IF(phys_diagnostic_code_integer > 1124073472 && phys_diagnostic_code_integer < 1140850688)
				{
					"1551_0101_EH_FMCS_check.bmp";
				}
				ELSE
				{
					IF(phys_diagnostic_code_integer > 1392508928 && phys_diagnostic_code_integer < 1409286144)
					{
						"1551_0101_EH_FMCS_outofspec.bmp";
					}
				}
			}
		}
	}
}

MENU Header
{
    LABEL "Device information";
    STYLE GROUP;
	ACCESS ONLINE;
    ITEMS
    {
        phys_tag_desc (READ_ONLY),
        COLUMNBREAK,
        status_signal,
        COLUMNBREAK,
        HeaderImage
    }
}
#endif
/***************************************************************************************
** Physical_Block
***************************************************************************************/

/* Import Block description */

IMPORT "PBPA_EH_1551_0101_Physical_Block.ddl"
{
    EVERYTHING;

    REDEFINITIONS
    {
    }
}


/*************************************************************
** UPLOAD MENU DEFINITION
*************************************************************/

#define loadToDevice_Physical_Block\
	phys_tag_desc,\
	phys_target_mode,\
	phys_descriptor,\
	phys_message,\
	phys_install_date,\
	phys_clear_last_error,\
	phys_tag_location,\
	phys_signature,\
	phys_sensor_drift_monitoring,\
	phys_system_alarm_delay,\
	phys_mains_filter,\
	phys_ambient_alarm,\
	disp_alternating_time,\
	disp_source_1,\
	disp_value_1,\
	disp_format_1,\
	disp_source_2,\
	disp_value_2,\
	disp_format_2,\
	disp_source_3,\
	disp_value_3,\
	disp_format_3\

/*************************************************************
** DOWNLOAD MENU DEFINITION
*************************************************************/

#define loadToPC_Physical_Block\
	phys_blk_profile,\
	phys_st_rev,\
	phys_tag_desc,\
	phys_target_mode,\
	phys_actual_mode,\
	phys_software_rev,\
	phys_serial_num,\
	phys_device_man_id,\
	phys_device_id,\
	phys_diagnosis,\
	phys_descriptor,\
	phys_message,\
	phys_install_date,\
	phys_ident_number,\
	phys_feature_supported,\
	phys_feature_enabled,\
	phys_cond_status_diag,\
	phys_actual_error_code,\
	phys_updown_feat_supp,\
	phys_device_address,\
	phys_blk_profile_rev_string,\
	phys_clear_last_error,\
	phys_ident_number_display,\
	phys_enp_order_code,\
	phys_tag_location,\
	phys_signature,\
	phys_enp_enp_version,\
	phys_enp_order_Ident,\
	phys_diagnostic_code,\
	phys_status_channel,\
	phys_status_count,\
	phys_last_diagnostic_code,\
	phys_last_status_channel,\
	phys_sensor_drift_monitoring,\
	phys_system_alarm_delay,\
	phys_mains_filter,\
	phys_ambient_alarm,\
	disp_alternating_time,\
	disp_source_1,\
	disp_value_1,\
	disp_format_1,\
	disp_source_2,\
	disp_value_2,\
	disp_format_2,\
	disp_source_3,\
	disp_value_3,\
	disp_format_3\


/***************************************************************************************
** AI1
***************************************************************************************/

/* Import Block description */

IMPORT "PBPA_EH_1551_0101_AI1.ddl"
{
    EVERYTHING;

    REDEFINITIONS
    {
    }
}

/*************************************************************
** REFRESH RELATIONS
*************************************************************/

REFRESH	refresh_func1_AI_hi_hi_lim
{
	func1_AI_hi_hi_lim:
		func1_AI_hi_lim,
		func1_AI_lo_lo_lim,
		func1_AI_lo_lim
}

REFRESH	refresh_func1_AI_hi_lim
{
	func1_AI_hi_lim:
		func1_AI_hi_hi_lim,
		func1_AI_lo_lo_lim,
		func1_AI_lo_lim
}

REFRESH	refresh_func1_AI_lo_lim
{
	func1_AI_lo_lim:
		func1_AI_hi_hi_lim,
		func1_AI_hi_lim,
		func1_AI_lo_lo_lim		
}

REFRESH	refresh_func1_AI_lo_lo_lim
{
	func1_AI_lo_lo_lim:
		func1_AI_hi_hi_lim,
		func1_AI_hi_lim,
		func1_AI_lo_lim		
}

/*************************************************************
** UPLOAD MENU DEFINITION
*************************************************************/

#define loadToDevice_AI1\
	func1_AI_tag_desc,\
	func1_AI_target_mode,\
	func1_AI_pv_upper_range_value,\
	func1_AI_pv_lower_range_value,\
	func1_AI_out_upper_range_value,\
	func1_AI_out_lower_range_value,\
	func1_AI_out_unit,\
	func1_AI_out_decimal_point,\
	func1_AI_channel,\
	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_status_quality,\
	func1_AI_simulate_status_limit,\
	func1_AI_simulate_value,\
	func1_AI_simulation_enabled,\
	func1_AI_out_unit_text\

/*************************************************************
** DOWNLOAD MENU DEFINITION
*************************************************************/

#define loadToPC_AI1\
	func1_AI_st_rev,\
	func1_AI_tag_desc,\
	func1_AI_target_mode,\
	func1_actual_mode,\
	func1_AI_pv_upper_range_value,\
	func1_AI_pv_lower_range_value,\
	func1_AI_out_upper_range_value,\
	func1_AI_out_lower_range_value,\
	func1_AI_out_unit,\
	func1_AI_out_decimal_point,\
	func1_AI_channel,\
	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_status_quality,\
	func1_AI_simulate_status_limit,\
	func1_AI_simulate_value,\
	func1_AI_simulation_enabled,\
	func1_AI_out_unit_text\


/***************************************************************************************
** Transducer_1
***************************************************************************************/

/* Import Block description */

IMPORT "PBPA_EH_1551_0101_Transducer_1.ddl"
{
    EVERYTHING;

    REDEFINITIONS
    {
    }
}

/*************************************************************
** REFRESH RELATIONS
*************************************************************/


REFRESH refresh_relation_trans1_cvd_max
{
	trans1_cvd_max:
				trans1_upper_sensor_limit
}

REFRESH refresh_relation_trans1_primary_value_unit
{
	trans1_primary_value_unit:
				trans1_bias_1,
				trans1_upper_sensor_limit,
				trans1_lower_sensor_limit,
				trans1_max_sensor_value_1,
				trans1_min_sensor_value_1,
				trans1_external_reference_junction_value,
				trans1_cvd_max,
				trans1_cvd_min,
				trans1_cal_point_hi,
				trans1_cal_point_lo,
				trans1_cal_min_span,
				trans1_poly_coeff_max,
				trans1_poly_coeff_min,
				trans1_sens_drift_limit,
				trans1_threshold_value
}

REFRESH refresh_relation_trans1_lin_type
{
	trans1_lin_type:
				trans1_primary_value_unit,
				trans1_sensor_measure_type,
				trans1_input_range,
				trans1_upper_sensor_limit,
				trans1_lower_sensor_limit,
				trans1_external_reference_junction_value,
				trans1_sensor_connection,
				trans1_comp_wire_1,
				trans1_cal_vandusen_A,
				trans1_cal_vandusen_B,
				trans1_cal_vandusen_C,
				trans1_cal_vandusen_R0,
				trans1_cvd_max,
				trans1_cvd_min,
				trans1_cal_point_hi,
				trans1_cal_point_lo,
				trans1_cal_min_span,
				trans1_cal_method,
				trans1_poly_coeff_A,
				trans1_poly_coeff_B,
				trans1_poly_coeff_C,
				trans1_poly_coeff_R0,
				trans1_poly_coeff_max,
				trans1_poly_coeff_min
}

REFRESH refresh_relation_trans1_input_range
{
	trans1_input_range:
				trans1_primary_value_unit,
				trans1_sensor_measure_type,
				trans1_upper_sensor_limit,
				trans1_lower_sensor_limit
}

REFRESH refresh_relation_trans1_poly_coeff_max
{
	trans1_poly_coeff_max:
				trans1_upper_sensor_limit
}

REFRESH refresh_relation_trans1_poly_coeff_min
{
	trans1_poly_coeff_min:
				trans1_lower_sensor_limit
}

REFRESH refresh_relation_trans1_sensor_measure_type
{
	trans1_sensor_measure_type:
				trans1_sens_drift_limit,
				trans1_threshold_value
}

REFRESH refresh_relation_trans1_cvd_min
{
	trans1_cvd_min:
				trans1_lower_sensor_limit
}


/*************************************************************
** UPLOAD MENU DEFINITION
*************************************************************/

#define loadToDevice_Transducer_1\
	trans1_primary_value_unit,\
	trans1_sensor_measure_type,\
	trans1_input_range,\
	trans1_lin_type,\
	trans1_bias_1,\
	trans1_reference_junction_type,\
	trans1_external_reference_junction_value,\
	trans1_sensor_connection,\
	trans1_comp_wire_1,\
	trans1_cal_vandusen_A,\
	trans1_cal_vandusen_B,\
	trans1_cal_vandusen_C,\
	trans1_cal_vandusen_R0,\
	trans1_cvd_max,\
	trans1_cvd_min,\
	trans1_sensor_serial_number,\
	trans1_poly_coeff_A,\
	trans1_poly_coeff_B,\
	trans1_poly_coeff_C,\
	trans1_poly_coeff_R0,\
	trans1_poly_coeff_max,\
	trans1_poly_coeff_min,\
	trans1_corrosion_detection,\
	trans1_sens_drift_limit,\
	trans1_threshold_value\

/*************************************************************
** DOWNLOAD MENU DEFINITION
*************************************************************/

#define loadToPC_Transducer_1\
	trans1_primary_value_unit,\
	trans1_sensor_measure_type,\
	trans1_input_range,\
	trans1_lin_type,\
	trans1_bias_1,\
	trans1_upper_sensor_limit,\
	trans1_lower_sensor_limit,\
	trans1_reference_junction_type,\
	trans1_external_reference_junction_value,\
	trans1_sensor_connection,\
	trans1_comp_wire_1,\
	trans1_cal_vandusen_A,\
	trans1_cal_vandusen_B,\
	trans1_cal_vandusen_C,\
	trans1_cal_vandusen_R0,\
	trans1_cvd_max,\
	trans1_cvd_min,\
	trans1_sensor_serial_number,\
	trans1_poly_coeff_A,\
	trans1_poly_coeff_B,\
	trans1_poly_coeff_C,\
	trans1_poly_coeff_R0,\
	trans1_poly_coeff_max,\
	trans1_poly_coeff_min,\
	trans1_corrosion_detection,\
	trans1_sens_drift_limit,\
	trans1_threshold_value\


/***************************************************************************************
** AI2
***************************************************************************************/

/* Import Block description */

IMPORT "PBPA_EH_1551_0101_AI2.ddl"
{
    EVERYTHING;

    REDEFINITIONS
    {
    }
}

/*************************************************************
** REFRESH RELATIONS
*************************************************************/

REFRESH	refresh_func2_AI_hi_hi_lim
{
	func2_AI_hi_hi_lim:
		func2_AI_hi_lim,
		func2_AI_lo_lo_lim,
		func2_AI_lo_lim
}

REFRESH	refresh_func2_AI_hi_lim
{
	func2_AI_hi_lim:
		func2_AI_hi_hi_lim,
		func2_AI_lo_lo_lim,
		func2_AI_lo_lim
}

REFRESH	refresh_func2_AI_lo_lim
{
	func2_AI_lo_lim:
		func2_AI_hi_hi_lim,
		func2_AI_hi_lim,
		func2_AI_lo_lo_lim		
}

REFRESH	refresh_func2_AI_lo_lo_lim
{
	func2_AI_lo_lo_lim:
		func2_AI_hi_hi_lim,
		func2_AI_hi_lim,
		func2_AI_lo_lim		
}

/*************************************************************
** UPLOAD MENU DEFINITION
*************************************************************/

#define loadToDevice_AI2\
	func2_AI_tag_desc,\
	func2_AI_target_mode,\
	func2_AI_pv_upper_range_value,\
	func2_AI_pv_lower_range_value,\
	func2_AI_out_upper_range_value,\
	func2_AI_out_lower_range_value,\
	func2_AI_out_unit,\
	func2_AI_out_decimal_point,\
	func2_AI_channel,\
	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_status_quality,\
	func2_AI_simulate_status_limit,\
	func2_AI_simulate_value,\
	func2_AI_simulation_enabled,\
	func2_AI_out_unit_text\

/*************************************************************
** DOWNLOAD MENU DEFINITION
*************************************************************/

#define loadToPC_AI2\
	func2_AI_st_rev,\
	func2_AI_tag_desc,\
	func2_AI_target_mode,\
	func2_actual_mode,\
	func2_AI_pv_upper_range_value,\
	func2_AI_pv_lower_range_value,\
	func2_AI_out_upper_range_value,\
	func2_AI_out_lower_range_value,\
	func2_AI_out_unit,\
	func2_AI_out_decimal_point,\
	func2_AI_channel,\
	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_status_quality,\
	func2_AI_simulate_status_limit,\
	func2_AI_simulate_value,\
	func2_AI_simulation_enabled,\
	func2_AI_out_unit_text\


/***************************************************************************************
** Transducer_2
***************************************************************************************/

/* Import Block description */

IMPORT "PBPA_EH_1551_0101_Transducer_2.ddl"
{
    EVERYTHING;

    REDEFINITIONS
    {
    }
}

/*************************************************************
** REFRESH RELATIONS
*************************************************************/


REFRESH refresh_relation_trans2_primary_value_unit
{
	trans2_primary_value_unit:
				trans2_bias_1,
				trans2_upper_sensor_limit,
				trans2_lower_sensor_limit,
				trans2_external_reference_junction_value,
				trans2_cvd_max,
				trans2_cvd_min,
				trans2_cal_point_hi,
				trans2_cal_point_lo,
				trans2_cal_min_span,
				trans2_poly_coeff_max,
				trans2_poly_coeff_min,
				trans2_sens_drift_limit,
				trans2_threshold_value
}

REFRESH refresh_relation_trans2_cvd_min
{
	trans2_cvd_min:
				trans2_lower_sensor_limit
}

REFRESH refresh_relation_trans2_input_range
{
	trans2_input_range:
				trans2_primary_value_unit,
				trans2_sensor_measure_type,
				trans2_upper_sensor_limit,
				trans2_lower_sensor_limit
}

REFRESH refresh_relation_trans2_sensor_measure_type
{
	trans2_sensor_measure_type:
				trans2_sens_drift_limit,
				trans2_threshold_value
}

REFRESH refresh_relation_trans2_poly_coeff_min
{
	trans2_poly_coeff_min:
				trans2_lower_sensor_limit
}

REFRESH refresh_relation_trans2_lin_type
{
	trans2_lin_type:
				trans2_primary_value_unit,
				trans2_sensor_measure_type,
				trans2_input_range,
				trans2_upper_sensor_limit,
				trans2_lower_sensor_limit,
				trans2_external_reference_junction_value,
				trans2_sensor_connection,
				trans2_comp_wire_1,
				trans2_cal_vandusen_A,
				trans2_cal_vandusen_B,
				trans2_cal_vandusen_C,
				trans2_cal_vandusen_R0,
				trans2_cvd_max,
				trans2_cvd_min,
				trans2_cal_point_hi,
				trans2_cal_point_lo,
				trans2_cal_min_span,
				trans2_cal_method,
				trans2_poly_coeff_A,
				trans2_poly_coeff_B,
				trans2_poly_coeff_C,
				trans2_poly_coeff_R0,
				trans2_poly_coeff_max,
				trans2_poly_coeff_min
}

REFRESH refresh_relation_trans2_cvd_max
{
	trans2_cvd_max:
				trans2_upper_sensor_limit
}

REFRESH refresh_relation_trans2_poly_coeff_max
{
	trans2_poly_coeff_max:
				trans2_upper_sensor_limit
}

/*************************************************************
** UPLOAD MENU DEFINITION
*************************************************************/

#define loadToDevice_Transducer_2\
	trans2_primary_value_unit,\
	trans2_sensor_measure_type,\
	trans2_input_range,\
	trans2_lin_type,\
	trans2_bias_1,\
	trans2_reference_junction_type,\
	trans2_external_reference_junction_value,\
	trans2_sensor_connection,\
	trans2_comp_wire_1,\
	trans2_cal_vandusen_A,\
	trans2_cal_vandusen_B,\
	trans2_cal_vandusen_C,\
	trans2_cal_vandusen_R0,\
	trans2_cvd_max,\
	trans2_cvd_min,\
	trans2_sensor_serial_number,\
	trans2_poly_coeff_A,\
	trans2_poly_coeff_B,\
	trans2_poly_coeff_C,\
	trans2_poly_coeff_R0,\
	trans2_poly_coeff_max,\
	trans2_poly_coeff_min,\
    trans2_corrosion_detection,\
	trans2_sens_drift_limit,\
	trans2_threshold_value\

/*************************************************************
** DOWNLOAD MENU DEFINITION
*************************************************************/

#define loadToPC_Transducer_2\
	trans2_primary_value_unit,\
	trans2_sensor_measure_type,\
	trans2_input_range,\
	trans2_lin_type,\
	trans2_bias_1,\
	trans2_upper_sensor_limit,\
	trans2_lower_sensor_limit,\
	trans2_reference_junction_type,\
	trans2_external_reference_junction_value,\
	trans2_sensor_connection,\
	trans2_comp_wire_1,\
	trans2_cal_vandusen_A,\
	trans2_cal_vandusen_B,\
	trans2_cal_vandusen_C,\
	trans2_cal_vandusen_R0,\
	trans2_cvd_max,\
	trans2_cvd_min,\
	trans2_sensor_serial_number,\
	trans2_poly_coeff_A,\
	trans2_poly_coeff_B,\
	trans2_poly_coeff_C,\
	trans2_poly_coeff_R0,\
	trans2_poly_coeff_max,\
	trans2_poly_coeff_min,\
    trans2_corrosion_detection,\
	trans2_sens_drift_limit,\
	trans2_threshold_value\


/***************************************************************************************
** AI3
***************************************************************************************/

/* Import Block description */

IMPORT "PBPA_EH_1551_0101_AI3.ddl"
{
    EVERYTHING;

    REDEFINITIONS
    {
    }
}

/*************************************************************
** REFRESH RELATIONS
*************************************************************/

REFRESH	refresh_func3_AI_hi_hi_lim
{
	func3_AI_hi_hi_lim:
		func3_AI_hi_lim,
		func3_AI_lo_lo_lim,
		func3_AI_lo_lim
}

REFRESH	refresh_func3_AI_hi_lim
{
	func3_AI_hi_lim:
		func3_AI_hi_hi_lim,
		func3_AI_lo_lo_lim,
		func3_AI_lo_lim
}

REFRESH	refresh_func3_AI_lo_lim
{
	func3_AI_lo_lim:
		func3_AI_hi_hi_lim,
		func3_AI_hi_lim,
		func3_AI_lo_lo_lim		
}

REFRESH	refresh_func3_AI_lo_lo_lim
{
	func3_AI_lo_lo_lim:
		func3_AI_hi_hi_lim,
		func3_AI_hi_lim,
		func3_AI_lo_lim		
}


/*************************************************************
** UPLOAD MENU DEFINITION
*************************************************************/

#define loadToDevice_AI3\
	func3_AI_tag_desc,\
	func3_AI_target_mode,\
	func3_AI_pv_upper_range_value,\
	func3_AI_pv_lower_range_value,\
	func3_AI_out_upper_range_value,\
	func3_AI_out_lower_range_value,\
	func3_AI_out_unit,\
	func3_AI_out_decimal_point,\
	func3_AI_channel,\
	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_status_quality,\
	func3_AI_simulate_status_limit,\
	func3_AI_simulate_value,\
	func3_AI_simulation_enabled,\
	func3_AI_out_unit_text\

/*************************************************************
** DOWNLOAD MENU DEFINITION
*************************************************************/

#define loadToPC_AI3\
	func3_AI_st_rev,\
	func3_AI_tag_desc,\
	func3_AI_target_mode,\
	func3_actual_mode,\
	func3_AI_pv_upper_range_value,\
	func3_AI_pv_lower_range_value,\
	func3_AI_out_upper_range_value,\
	func3_AI_out_lower_range_value,\
	func3_AI_out_unit,\
	func3_AI_out_decimal_point,\
	func3_AI_channel,\
	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_status_quality,\
	func3_AI_simulate_status_limit,\
	func3_AI_simulate_value,\
	func3_AI_simulation_enabled,\
	func3_AI_out_unit_text\


/***************************************************************************************
** AI4
***************************************************************************************/

/* Import Block description */

IMPORT "PBPA_EH_1551_0101_AI4.ddl"
{
    EVERYTHING;

    REDEFINITIONS
    {
    }
}

/*************************************************************
** REFRESH RELATIONS
*************************************************************/

REFRESH	refresh_func4_AI_hi_hi_lim
{
	func4_AI_hi_hi_lim:
		func4_AI_hi_lim,
		func4_AI_lo_lo_lim,
		func4_AI_lo_lim
}

REFRESH	refresh_func4_AI_hi_lim
{
	func4_AI_hi_lim:
		func4_AI_hi_hi_lim,
		func4_AI_lo_lo_lim,
		func4_AI_lo_lim
}

REFRESH	refresh_func4_AI_lo_lim
{
	func4_AI_lo_lim:
		func4_AI_hi_hi_lim,
		func4_AI_hi_lim,
		func4_AI_lo_lo_lim		
}

REFRESH	refresh_func4_AI_lo_lo_lim
{
	func4_AI_lo_lo_lim:
		func4_AI_hi_hi_lim,
		func4_AI_hi_lim,
		func4_AI_lo_lim		
}


/*************************************************************
** UPLOAD MENU DEFINITION
*************************************************************/

#define loadToDevice_AI4\
	func4_AI_tag_desc,\
	func4_AI_target_mode,\
	func4_AI_pv_upper_range_value,\
	func4_AI_pv_lower_range_value,\
	func4_AI_out_upper_range_value,\
	func4_AI_out_lower_range_value,\
	func4_AI_out_unit,\
	func4_AI_out_decimal_point,\
	func4_AI_channel,\
	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_status_quality,\
	func4_AI_simulate_status_limit,\
	func4_AI_simulate_value,\
	func4_AI_simulation_enabled,\
	func4_AI_out_unit_text\

/*************************************************************
** DOWNLOAD MENU DEFINITION
*************************************************************/

#define loadToPC_AI4\
	func4_AI_st_rev,\
	func4_AI_tag_desc,\
	func4_AI_target_mode,\
	func4_actual_mode,\
	func4_AI_pv_upper_range_value,\
	func4_AI_pv_lower_range_value,\
	func4_AI_out_upper_range_value,\
	func4_AI_out_lower_range_value,\
	func4_AI_out_unit,\
	func4_AI_out_decimal_point,\
	func4_AI_channel,\
	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_status_quality,\
	func4_AI_simulate_status_limit,\
	func4_AI_simulate_value,\
	func4_AI_simulation_enabled,\
	func4_AI_out_unit_text\



/*************************************************************
** UPLOAD MENU DEFINITION
*************************************************************/

MENU upload_variables
{
    LABEL [menu_load_to_device];
    ACCESS ONLINE;
    ITEMS
    {
            loadToDevice_Physical_Block,
            loadToDevice_AI1,
            loadToDevice_Transducer_1,
            loadToDevice_AI2,
            loadToDevice_Transducer_2,
            loadToDevice_AI3,
            loadToDevice_AI4
    }
}

/*************************************************************
** DOWNLOAD MENU DEFINITION
*************************************************************/

MENU download_variables
{
    LABEL [menu_load_to_PC];
    ACCESS ONLINE;
    ITEMS
    {
        loadToPC_Physical_Block,
        loadToPC_AI1,
        loadToPC_Transducer_1,
        loadToPC_AI2,
        loadToPC_Transducer_2,
        loadToPC_AI3,
        loadToPC_AI4
    }
}

/*************************************************************
** MENU DEFINITION
*************************************************************/

MENU Table_Main_Specialist
{
    LABEL "TMT84";
    ACCESS OFFLINE;
    ITEMS 
    {
        menu_offl_l2_disp_operation,
        menu_offl_l2_setup,
        menu_offl_l2_diagnostics,
        menu_offl_l2_experte
    }
}

MENU Table_Main_Maintenance
{
    LABEL "TMT84";
    ACCESS OFFLINE;
    ITEMS 
    {
        menu_offl_l2_disp_operation,
        menu_offl_l2_setup,
        menu_offl_l2_diagnostics,
        menu_offl_l2_experte
    }
}

MENU menu_offl_l2_disp_operation
{
    LABEL "Display/operation|de|Anzeige/Betrieb";
    ACCESS OFFLINE;
    ITEMS 
    {
        disp_alternating_time,
        disp_source_1,
        IF (disp_source_1 > 0) 
        { disp_value_1 }
        IF (disp_source_1 > 0) 
        { disp_format_1 }
        disp_source_2,
        IF (disp_source_2 > 0) 
        { disp_value_2 }
        IF (disp_source_2 > 0) 
        { disp_format_2 }
        disp_source_3,
        IF (disp_source_3 > 0) 
        { disp_value_3 }
        IF (disp_source_3 > 0) 
        { disp_format_3 }
    }
}

MENU menu_offl_l2_setup
{
    LABEL "Setup|de|Setup";
    ACCESS OFFLINE;
    ITEMS 
    {
        phys_actual_mode,
        phys_target_mode,
        trans1_lin_type,
        IF(trans1_lin_type==0) 
        { trans1_input_range }
        IF(trans1_lin_type!=251)
        { trans1_primary_value_unit }
        IF(  (trans1_lin_type >= 102 && trans1_lin_type <= 126) || (trans1_lin_type >= 240 && trans1_lin_type <= 246)   ||  (trans1_lin_type == 0  && (trans1_input_range == 128 || trans1_input_range == 129))) 
        { trans1_sensor_connection }
        IF(trans1_lin_type!=251) 
        { trans1_sensor_measure_type }
        IF((trans1_sensor_connection == 0) && ((trans1_lin_type >= 102 && trans1_lin_type <= 126) || (trans1_lin_type >= 240 && trans1_lin_type <= 246)   ||  (trans1_lin_type == 0  && (trans1_input_range == 128 || trans1_input_range == 129)))) 
        { trans1_comp_wire_1 }
        IF (trans1_lin_type != 251) 
        { trans1_bias_1 }
        IF (trans1_sensor_measure_type == 222 ) 
        { trans1_threshold_value }
        IF (trans1_lin_type >= 128 && trans1_lin_type <= 140) 
        { trans1_reference_junction_type }
        IF( trans1_lin_type >= 128 && trans1_lin_type <= 140 && trans1_reference_junction_type == 2) 
        { trans1_external_reference_junction_value }
        trans2_lin_type,
        IF(trans2_lin_type==0) 
        { trans2_input_range }
        IF(trans2_lin_type != 251) 
        { trans2_primary_value_unit }
        IF(  (trans2_lin_type >= 102 && trans2_lin_type <= 126) || (trans2_lin_type >= 240 && trans2_lin_type <= 246)   ||  (trans2_lin_type == 0  && (trans2_input_range == 128 || trans2_input_range == 129))) 
        { trans2_sensor_connection }
        IF(trans2_lin_type!=251) 
        { trans2_sensor_measure_type }
        IF( (trans2_sensor_connection == 0) && ((trans2_lin_type >= 102 && trans2_lin_type <= 126) || (trans2_lin_type >= 240 && trans2_lin_type <= 246)   ||  (trans2_lin_type == 0  && (trans2_input_range == 128 || trans2_input_range == 129)))) 
        { trans2_comp_wire_1 }
        IF (trans2_lin_type != 251) 
        { trans2_bias_1 }
        IF (trans2_sensor_measure_type == 222 ) 
        { trans2_threshold_value }
        IF (trans2_lin_type >= 128 && trans2_lin_type <= 140) 
        { trans2_reference_junction_type }
        IF(trans2_lin_type >= 128 && trans2_lin_type <= 140 &&  trans2_reference_junction_type == 2) 
        { trans2_external_reference_junction_value }
        menu_offl_l3_adv_setup
    }
}

MENU menu_offl_l2_diagnostics
{
    LABEL "Diagnostics|de|Diagnose";
    ACCESS OFFLINE;
    ITEMS 
    {
        phys_diagnostic_code,
        phys_actual_error_code,
        phys_status_channel,
        phys_status_count,
        phys_device_address,
        menu_offl_l3_diag_system_info
    }
}

MENU menu_offl_l2_experte
{
    LABEL "Expert|de|Experte";
    ACCESS OFFLINE;
    ITEMS 
    {
        menu_offl_l3_exp_system,
        menu_offl_l3_exp_sensors,
        menu_offl_l3_exp_communication,
        menu_offl_l3_exp_diagnostics
    }
}

MENU menu_offl_l3_adv_setup
{
    LABEL "Advanced setup|de|Erweitertes Setup";
    ACCESS OFFLINE;
    ITEMS 
    {
        phys_ambient_alarm,
        IF ((trans2_sensor_measure_type == 224 || trans2_sensor_measure_type == 225) || (trans1_sensor_measure_type == 224 || trans1_sensor_measure_type == 225)) 
        { phys_sensor_drift_monitoring }
        IF (trans1_sensor_measure_type == 224 || trans1_sensor_measure_type == 225) 
        { trans1_sens_drift_limit }
        IF( ((IS_SENS1_RTD || IS_SENS1_OHM) && IS_SENS1_4WIRE) || IS_SENS1_TC || IS_SENS1_MV )
        { trans1_corrosion_detection, }
        IF (trans2_sensor_measure_type == 224 || trans2_sensor_measure_type == 225) 
        { trans2_sens_drift_limit }
        IF( IS_SENS2_TC || IS_SENS2_MV )
        { trans2_corrosion_detection }
    }
}

MENU menu_offl_l3_diag_system_info
{
    LABEL "System information|de|Systeminformationen";
    ACCESS OFFLINE;
    ITEMS 
    {
        phys_software_rev,
        phys_serial_num,
        phys_enp_order_code,
        phys_enp_order_Ident,
        phys_tag_desc,
        phys_enp_enp_version,
        phys_blk_profile,
        phys_blk_profile_rev_string,
        phys_device_man_id,
        phys_device_id,
        phys_ident_number_display
    }
}

MENU menu_offl_l3_exp_system
{
    LABEL "System|de|System";
    ACCESS OFFLINE;
    ITEMS 
    {
        phys_target_mode,
        phys_actual_mode,
        phys_ident_number (READ_ONLY),
        phys_descriptor,
        phys_message,
        phys_install_date,
        phys_tag_location,
        phys_signature,
        phys_system_alarm_delay,
        phys_mains_filter,
        phys_ambient_alarm,
        menu_offl_l4_exp_display
    }
}

MENU menu_offl_l3_exp_sensors
{
    LABEL "Sensor|de|Sensorik";
    ACCESS OFFLINE;
    ITEMS 
    {
        menu_offl_l4_exp_sensor_1,
        menu_offl_l4_exp_sensor_2
    }
}

MENU menu_offl_l3_exp_communication
{
    LABEL "Communication|de|Kommunikation";
    ACCESS OFFLINE;
    ITEMS 
    {
        phys_device_address,
        menu_offl_l4_exp_analog_input_1,
        menu_offl_l4_exp_analog_input_2,
        menu_offl_l4_exp_analog_input_3,
        menu_offl_l4_exp_analog_input_4
    }
}

MENU menu_offl_l3_exp_diagnostics
{
    LABEL "Diagnostics|de|Diagnose";
    ACCESS OFFLINE;
    ITEMS 
    {
        phys_diagnostic_code,
        phys_actual_error_code,
        phys_status_channel,
        phys_status_count,
        phys_diagnosis,
        phys_last_diagnostic_code,
        phys_last_status_channel,
        phys_clear_last_error,
        phys_cond_status_diag (READ_ONLY),
        menu_offl_l4_exp_system_info
    }
}

MENU menu_offl_l4_exp_display
{
    LABEL "Display|de|Anzeige";
    ACCESS OFFLINE;
    ITEMS 
    {
        disp_alternating_time,
        disp_source_1,
        IF (disp_source_1 > 0) 
        { disp_value_1 }
        IF (disp_source_1 > 0) 
        { disp_format_1 }
        disp_source_2,
        IF (disp_source_2 > 0) 
        { disp_value_2 }
        IF (disp_source_2 > 0) 
        { disp_format_2 }
        disp_source_3,
        IF (disp_source_3 > 0) 
        { disp_value_3 }
        IF (disp_source_3 > 0) 
        { disp_format_3 }
    }
}

MENU menu_offl_l4_exp_sensor_1
{
    LABEL "Sensor 1|de|Sensor 1";
    ACCESS OFFLINE;
    ITEMS 
    {
        trans1_lin_type,
        IF(trans1_lin_type==0) 
        { trans1_input_range }
        IF(trans1_lin_type!=251)
        { trans1_primary_value_unit }
        IF(  (trans1_lin_type >= 102 && trans1_lin_type <= 126) || (trans1_lin_type >= 240 && trans1_lin_type <= 246)   ||  (trans1_lin_type == 0  && (trans1_input_range == 128 || trans1_input_range == 129))) 
        { trans1_sensor_connection }
        IF(trans1_lin_type!=251) 
        { trans1_sensor_measure_type }
        IF((trans1_sensor_connection == 0) && ((trans1_lin_type >= 102 && trans1_lin_type <= 126) || (trans1_lin_type >= 240 && trans1_lin_type <= 246)   ||  (trans1_lin_type == 0  && (trans1_input_range == 128 || trans1_input_range == 129)))) 
        { trans1_comp_wire_1 }
        IF (trans1_lin_type != 251) 
        { trans1_bias_1 }
        IF (trans1_lin_type != 251) 
        { trans1_lower_sensor_limit }
        IF (trans1_lin_type != 251) 
        { trans1_upper_sensor_limit }
        IF (trans1_sensor_measure_type == 222 ) 
        { trans1_threshold_value }
        IF (trans1_lin_type >= 128 && trans1_lin_type <= 140) 
        { trans1_reference_junction_type }
        IF( trans1_lin_type >= 128 && trans1_lin_type <= 140 && trans1_reference_junction_type == 2) 
        { trans1_external_reference_junction_value }
        IF ((trans2_sensor_measure_type == 224 || trans2_sensor_measure_type == 225) || (trans1_sensor_measure_type == 224 || trans1_sensor_measure_type == 225)) 
        { phys_sensor_drift_monitoring }
        IF (trans1_sensor_measure_type == 224 || trans1_sensor_measure_type == 225) 
        { trans1_sens_drift_limit }
        IF( ((IS_SENS1_RTD || IS_SENS1_OHM) && IS_SENS1_4WIRE) || IS_SENS1_TC || IS_SENS1_MV )
        { trans1_corrosion_detection }
        menu_offl_l5_exp_special_lin_1
    }
}

MENU menu_offl_l4_exp_sensor_2
{
    LABEL "Sensor 2|de|Sensor 2";
    ACCESS OFFLINE;
    ITEMS 
    {
        trans2_lin_type,
        IF(trans2_lin_type==0) 
        { trans2_input_range }
        IF(trans2_lin_type != 251) 
        { trans2_primary_value_unit }
        IF(  (trans2_lin_type >= 102 && trans2_lin_type <= 126) || (trans2_lin_type >= 240 && trans2_lin_type <= 246)   ||  (trans2_lin_type == 0  && (trans2_input_range == 128 || trans2_input_range == 129))) 
        { trans2_sensor_connection }
        IF(trans2_lin_type!=251) 
        { trans2_sensor_measure_type }
        IF( (trans2_sensor_connection == 0) && ((trans2_lin_type >= 102 && trans2_lin_type <= 126) || (trans2_lin_type >= 240 && trans2_lin_type <= 246)   ||  (trans2_lin_type == 0  && (trans2_input_range == 128 || trans2_input_range == 129)))) 
        { trans2_comp_wire_1 }
        IF (trans2_lin_type != 251) 
        { trans2_bias_1 }
        IF (trans2_lin_type != 251) 
        { trans2_lower_sensor_limit }
        IF (trans2_lin_type != 251) 
        { trans2_upper_sensor_limit }
        IF (trans2_sensor_measure_type == 222 ) 
        { trans2_threshold_value }
        IF (trans2_lin_type >= 128 && trans2_lin_type <= 140) 
        { trans2_reference_junction_type }
        IF(trans2_lin_type >= 128 && trans2_lin_type <= 140 &&  trans2_reference_junction_type == 2) 
        { trans2_external_reference_junction_value }
        IF ((trans2_sensor_measure_type == 224 || trans2_sensor_measure_type == 225) || (trans1_sensor_measure_type == 224 || trans1_sensor_measure_type == 225)) 
        { phys_sensor_drift_monitoring }
        IF (trans2_sensor_measure_type == 224 || trans2_sensor_measure_type == 225) 
        { trans2_sens_drift_limit }
        IF( IS_SENS2_TC || IS_SENS2_MV )
        { trans2_corrosion_detection }
        menu_offl_l5_exp_special_lin_2
    }
}

MENU menu_offl_l4_exp_system_info
{
    LABEL "System information|de|Systeminformationen";
    ACCESS OFFLINE;
    ITEMS 
    {
        phys_software_rev,
        phys_serial_num,
        phys_enp_order_code,
        phys_enp_order_Ident,
        phys_tag_desc,
        phys_enp_enp_version,
        phys_blk_profile,
        phys_blk_profile_rev_string,
        phys_device_man_id,
        phys_device_id,
        phys_ident_number_display,
        phys_updown_feat_supp
    }
}

MENU menu_offl_l4_exp_analog_input_1
{
    LABEL "Analog Input 1|de|Analog Input 1";
    ACCESS OFFLINE;
    ITEMS 
    {
        func1_AI_st_rev,
        func1_AI_tag_desc,
        func1_AI_target_mode,
        func1_actual_mode,
        func1_AI_channel,
        func1_AI_out_unit_text,
        func1_AI_pv_ftime,
        func1_AI_pv_upper_range_value,
        func1_AI_pv_lower_range_value,
        func1_AI_out_upper_range_value,
        func1_AI_out_lower_range_value,
        func1_AI_out_unit,
        func1_AI_out_decimal_point,
        func1_AI_hi_hi_lim,
        func1_AI_hi_lim,
        func1_AI_lo_lim,
        func1_AI_lo_lo_lim,
        func1_AI_alarm_hys,
        func1_AI_FSafeType,
        IF (func1_AI_FSafeType == 0) 
        { func1_AI_FSafeValue }
        IF (func1_AI_simulation_enabled == 1) 
        { func1_AI_simulate_status_quality }
        IF (func1_AI_simulation_enabled == 1) 
        { func1_AI_simulate_status_limit }
        IF (func1_AI_simulation_enabled == 1) 
        { func1_AI_simulate_value }
        func1_AI_simulation_enabled
    }
}

MENU menu_offl_l4_exp_analog_input_2
{
    LABEL "Analog Input 2|de|Analog Input 2";
    ACCESS OFFLINE;
    ITEMS 
    {
        func2_AI_st_rev,
        func2_AI_tag_desc,
        func2_AI_target_mode,
        func2_actual_mode,
        func2_AI_channel,
        func2_AI_out_unit_text,
        func2_AI_pv_ftime,
        func2_AI_pv_upper_range_value,
        func2_AI_pv_lower_range_value,
        func2_AI_out_upper_range_value,
        func2_AI_out_lower_range_value,
        func2_AI_out_unit,
        func2_AI_out_decimal_point,
        func2_AI_hi_hi_lim,
        func2_AI_hi_lim,
        func2_AI_lo_lim,
        func2_AI_lo_lo_lim,
        func2_AI_alarm_hys,
        func2_AI_FSafeType,
        IF (func2_AI_FSafeType == 0) 
        { func2_AI_FSafeValue }
        IF (func2_AI_simulation_enabled == 1) 
        { func2_AI_simulate_status_quality }
        IF (func2_AI_simulation_enabled == 1) 
        { func2_AI_simulate_status_limit }
        IF (func2_AI_simulation_enabled == 1) 
        { func2_AI_simulate_value }
        func2_AI_simulation_enabled
    }
}

MENU menu_offl_l4_exp_analog_input_3
{
    LABEL "Analog Input 3|de|Analog Input 3";
    ACCESS OFFLINE;
    ITEMS 
    {
        func3_AI_st_rev,
        func3_AI_tag_desc,
        func3_AI_target_mode,
        func3_actual_mode,
        func3_AI_channel,
        func3_AI_out_unit_text,
        func3_AI_pv_ftime,
        func3_AI_pv_upper_range_value,
        func3_AI_pv_lower_range_value,
        func3_AI_out_upper_range_value,
        func3_AI_out_lower_range_value,
        func3_AI_out_unit,
        func3_AI_out_decimal_point,
        func3_AI_hi_hi_lim,
        func3_AI_hi_lim,
        func3_AI_lo_lim,
        func3_AI_lo_lo_lim,
        func3_AI_alarm_hys,
        func3_AI_FSafeType,
        IF (func3_AI_FSafeType == 0) 
        { func3_AI_FSafeValue }
        IF (func3_AI_simulation_enabled == 1) 
        { func3_AI_simulate_status_quality }
        IF (func3_AI_simulation_enabled == 1) 
        { func3_AI_simulate_status_limit }
        IF (func3_AI_simulation_enabled == 1) 
        { func3_AI_simulate_value }
        func3_AI_simulation_enabled
    }
}

MENU menu_offl_l4_exp_analog_input_4
{
    LABEL "Analog Input 4|de|Analog Input 4";
    ACCESS OFFLINE;
    ITEMS 
    {
        func4_AI_st_rev,
        func4_AI_tag_desc,
        func4_AI_target_mode,
        func4_actual_mode,
        func4_AI_channel,
        func4_AI_out_unit_text,
        func4_AI_pv_ftime,
        func4_AI_pv_upper_range_value,
        func4_AI_pv_lower_range_value,
        func4_AI_out_upper_range_value,
        func4_AI_out_lower_range_value,
        func4_AI_out_unit,
        func4_AI_out_decimal_point,
        func4_AI_hi_hi_lim,
        func4_AI_hi_lim,
        func4_AI_lo_lim,
        func4_AI_lo_lo_lim,
        func4_AI_alarm_hys,
        func4_AI_FSafeType,
        IF (func4_AI_FSafeType == 0) 
        { func4_AI_FSafeValue }
        IF (func4_AI_simulation_enabled == 1) 
        { func4_AI_simulate_status_quality }
        IF (func4_AI_simulation_enabled == 1) 
        { func4_AI_simulate_status_limit }
        IF (func4_AI_simulation_enabled == 1) 
        { func4_AI_simulate_value }
        func4_AI_simulation_enabled
    }
}

MENU menu_offl_l5_exp_special_lin_1
{
    LABEL "Special linearization 1|de|Spezielle Linearisierung 1";
    ACCESS OFFLINE;
    ITEMS 
    {
        IF( trans1_lin_type == 244 ) 
        { trans1_cvd_min }
        IF( trans1_lin_type == 244 ) 
        { trans1_cvd_max }
        IF( trans1_lin_type == 244 ) 
        { trans1_cal_vandusen_R0 }
        IF( trans1_lin_type == 244 ) 
        { trans1_cal_vandusen_A }
        IF( trans1_lin_type == 244 ) 
        { trans1_cal_vandusen_B }
        IF( trans1_lin_type == 244 ) 
        { trans1_cal_vandusen_C }
        IF( trans1_lin_type == 245 || trans1_lin_type == 246) 
        { trans1_poly_coeff_min }
        IF( trans1_lin_type == 245 || trans1_lin_type == 246) 
        { trans1_poly_coeff_max }
        IF( trans1_lin_type == 245 || trans1_lin_type == 246) 
        { trans1_poly_coeff_R0 }
        IF( trans1_lin_type == 245 || trans1_lin_type == 246) 
        { trans1_poly_coeff_A }
        IF( trans1_lin_type == 245 || trans1_lin_type == 246) 
        { trans1_poly_coeff_B }
        IF( trans1_lin_type == 245 || trans1_lin_type == 246) 
        { trans1_poly_coeff_C }
        trans1_sensor_serial_number
    }
}

MENU menu_offl_l5_exp_special_lin_2
{
    LABEL "Special linearization 2|de|Spezielle Linearisierung 2";
    ACCESS OFFLINE;
    ITEMS 
    {
        IF( trans2_lin_type == 244 ) 
        { trans2_cvd_min }
        IF( trans2_lin_type == 244 ) 
        { trans2_cvd_max }
        IF( trans2_lin_type == 244 ) 
        { trans2_cal_vandusen_R0 }
        IF( trans2_lin_type == 244 ) 
        { trans2_cal_vandusen_A }
        IF( trans2_lin_type == 244 ) 
        { trans2_cal_vandusen_B }
        IF( trans2_lin_type == 244 ) 
        { trans2_cal_vandusen_C }
        IF( trans2_lin_type == 245 || trans2_lin_type == 246) 
        { trans2_poly_coeff_min }
        IF( trans2_lin_type == 245 || trans2_lin_type == 246) 
        { trans2_poly_coeff_max }
        IF( trans2_lin_type == 245 || trans2_lin_type == 246) 
        { trans2_poly_coeff_R0 }
        IF( trans2_lin_type == 245 || trans2_lin_type == 246) 
        { trans2_poly_coeff_A }
        IF( trans2_lin_type == 245 || trans2_lin_type == 246) 
        { trans2_poly_coeff_B }
        IF( trans2_lin_type == 245 || trans2_lin_type == 246) 
        { trans2_poly_coeff_C }
        trans2_sensor_serial_number
    }
}


/*************************************************************
** MENU DEFINITION
*************************************************************/
#ifdef _V600_
MENU menu_onl_l2_disp_operation
{
    LABEL "Display/operation|de|Anzeige/Betrieb";
    ACCESS ONLINE;
    STYLE DIALOG;
    ITEMS 
    {
		Header,
		ROWBREAK,
        disp_alternating_time,
        disp_source_1,
        disp_value_1,
        disp_format_1,
        disp_source_2,
        disp_value_2,
        disp_format_2,
        disp_source_3,
        disp_value_3,
        disp_format_3
    }
}

MENU menu_onl_l2_setup
{
    LABEL "Setup|de|Setup";
    ACCESS ONLINE;
    STYLE DIALOG;
    ITEMS 
    {
		menu_onl_l2_setup_page,
		menu_onl_l3_adv_setup
	}
}

MENU menu_onl_l2_setup_page
{
    LABEL "Setup|de|Setup";
    ACCESS ONLINE;
    STYLE PAGE;
    ITEMS 
    {
		Header,
		ROWBREAK,
		menu_onl_l2_setup_group
	}
}

MENU menu_onl_l2_setup_group
{
    LABEL "";
    ACCESS ONLINE;
    STYLE GROUP;
    ITEMS 
    {
        phys_actual_mode,
        phys_target_mode,
        trans1_lin_type,
        trans1_input_range,
        trans1_primary_value_unit,
        trans1_sensor_connection,
        trans1_sensor_measure_type,
        trans1_comp_wire_1,
        trans1_bias_1,
        trans1_threshold_value,
        trans1_reference_junction_type,
        trans1_external_reference_junction_value,
        COLUMNBREAK,
        trans2_lin_type,
        trans2_input_range,
        trans2_primary_value_unit,
        trans2_sensor_connection,
        trans2_sensor_measure_type,
        trans2_comp_wire_1,
        trans2_bias_1,
        trans2_threshold_value,
        trans2_reference_junction_type,
        trans2_external_reference_junction_value
    }
}
#endif
MENU menu_onl_l2_diagnostics
{
    LABEL "Diagnostics|de|Diagnose";
    ACCESS ONLINE;
    STYLE DIALOG;
    ITEMS 
    {
		#ifdef _V600_
		Header,
		ROWBREAK,
		#endif
        phys_diagnostic_code,
        phys_actual_error_code,
		DS_Method_Remedy_1,
        phys_status_channel,
        phys_status_count,
        phys_device_address,
        menu_onl_l3_diag_system_info,
        menu_onl_l3_diag_meas_value,
		#ifndef _V600_
        menu_onl_l4_adv_min_max
		#endif
        menu_onl_l3_diag_dev_test_reset
    }
}
#ifdef _V600_
MENU menu_onl_l2_experte
{
    LABEL "Expert|de|Experte";
    ACCESS ONLINE;
    STYLE DIALOG;
    ITEMS 
    {
        menu_onl_l3_exp_system,
        menu_onl_l3_exp_sensors,
        menu_onl_l3_exp_communication,
        menu_onl_l3_exp_diagnostics
    }
}

MENU menu_onl_l3_adv_setup
{
    LABEL "Advanced setup|de|Erweitertes Setup";
    ACCESS ONLINE;
    ITEMS 
    {
		Header,
		ROWBREAK,
        phys_hw_write_protection,
        phys_ambient_alarm,
        phys_sensor_drift_monitoring,
        trans1_sens_drift_limit,
        trans1_corrosion_detection,
        trans2_sens_drift_limit,
        trans2_corrosion_detection
    }
}
#endif
MENU menu_onl_l3_diag_system_info
{
    LABEL "System information|de|Systeminformationen";
    ACCESS ONLINE;
    ITEMS 
    {
		#ifdef _V600_
		Header,
		ROWBREAK,
		#endif
        phys_software_rev,
        phys_serial_num,
        phys_enp_order_code,
        phys_enp_order_Ident,
        phys_tag_desc,
        phys_enp_enp_version,
        phys_blk_profile,
        phys_blk_profile_rev_string,
        phys_device_man_id,
        phys_device_id,
        phys_ident_number_display
    }
}

MENU menu_onl_l3_diag_meas_value
{
    LABEL "Measured values|de|Messwerte";
    ACCESS ONLINE;
    ITEMS 
    {
		#ifdef _V600_
		Header,
		ROWBREAK,
		#endif
        trans1_primary_value,
        trans1_secondary_value_1,
        trans1_rj_value,
        trans2_primary_value,
        trans2_secondary_value_1,
        trans2_rj_value,
		#ifdef _V600_
        menu_onl_l4_adv_min_max
		#endif
    }
}

MENU menu_onl_l3_diag_dev_test_reset
{
    LABEL "Device test/reset|de|Gerätetest/Reset";
    ACCESS ONLINE;
    ITEMS 
    {
		#ifdef _V600_
		Header,
		ROWBREAK,
		#endif
        phys_factory_reset
    }
}
#ifdef _V600_
MENU menu_onl_l3_exp_system
{
    LABEL "System|de|System";
    ACCESS ONLINE;
    ITEMS 
    {
		Header,
		ROWBREAK,
        phys_target_mode,
        phys_actual_mode,
        phys_ident_number,
        phys_descriptor,
        phys_message,
        phys_install_date,
        phys_tag_location,
        phys_signature,
        phys_hw_write_protection,
        phys_system_alarm_delay,
        phys_mains_filter,
        phys_ambient_alarm,
        menu_onl_l4_exp_display
    }
}

MENU menu_onl_l3_exp_sensors
{
    LABEL "Sensor|de|Sensorik";
    ACCESS ONLINE;
    ITEMS 
    {
		Header,
		ROWBREAK,
        menu_onl_l4_exp_sensor_1,
        menu_onl_l4_exp_sensor_2
    }
}

MENU menu_onl_l3_exp_communication
{
    LABEL "Communication|de|Kommunikation";
    ACCESS ONLINE;
    ITEMS 
    {
		Header,
		ROWBREAK,
        phys_device_address,
        phys_set_unit_to_bus,
        menu_onl_l4_exp_analog_input_1,
        menu_onl_l4_exp_analog_input_2,
        menu_onl_l4_exp_analog_input_3,
        menu_onl_l4_exp_analog_input_4
    }
}

MENU menu_onl_l3_exp_diagnostics
{
    LABEL "Diagnostics|de|Diagnose";
    ACCESS ONLINE;
    ITEMS 
    {
		Header,
		ROWBREAK,
        phys_diagnostic_code,
        phys_actual_error_code,
        phys_status_channel,
        phys_status_count,
        phys_diagnosis,
        phys_last_diagnostic_code,
        phys_last_status_channel,
        phys_clear_last_error,
        phys_feature_enabled,
        phys_feature_supported,
        phys_cond_status_diag,
        phys_service_locking,
        menu_onl_l4_exp_system_info,
        menu_onl_l4_exp_meas_value,
        menu_onl_l4_exp_min_max,
        menu_onl_l4_exp_dev_test_reset
    }
}
#endif
MENU menu_onl_l4_adv_min_max
{
    LABEL "Min/max values|de|Min-/Max-Werte";
    ACCESS ONLINE;
    ITEMS 
    {
		#ifdef _V600_
		Header,
		ROWBREAK,
		#endif
        trans1_pv_min_indicator,
        trans1_pv_max_indicator,
        trans1_min_sensor_value_1,
        trans1_max_sensor_value_1,
        trans2_pv_min_indicator,
        trans2_pv_max_indicator,
        trans2_min_sensor_value_1,
        trans2_max_sensor_value_1,
        trans1_rj_min_indicator,
        trans1_rj_max_indicator
    }
}
#ifdef _V600_
MENU menu_onl_l4_exp_display
{
    LABEL "Display|de|Anzeige";
    ACCESS ONLINE;
    ITEMS 
    {
		Header,
		ROWBREAK,
        disp_alternating_time,
        disp_source_1,
        disp_value_1,
        disp_format_1,
        disp_source_2,
        disp_value_2,
        disp_format_2,
        disp_source_3,
        disp_value_3,
        disp_format_3
    }
}

MENU menu_onl_l4_exp_sensor_1
{
    LABEL "Sensor 1|de|Sensor 1";
    ACCESS ONLINE;
    ITEMS 
    {
		Header,
		ROWBREAK,
        trans1_lin_type,
        trans1_input_range,
        trans1_primary_value_unit,
        trans1_sensor_connection,
        trans1_sensor_measure_type,
        trans1_comp_wire_1,
        trans1_bias_1,
        trans1_lower_sensor_limit,
        trans1_upper_sensor_limit,
        trans1_threshold_value,
        trans1_reference_junction_type,
        trans1_external_reference_junction_value,
        phys_sensor_drift_monitoring,
        trans1_sens_drift_limit,
        trans1_corrosion_detection,
        menu_onl_l5_exp_special_lin_1
    }
}

MENU menu_onl_l4_exp_sensor_2
{
    LABEL "Sensor 2|de|Sensor 2";
    ACCESS ONLINE;
    ITEMS 
    {
		Header,
		ROWBREAK,
        trans2_lin_type,
        trans2_input_range,
        trans2_primary_value_unit,
        trans2_sensor_connection,
        trans2_sensor_measure_type,
        trans2_comp_wire_1,
        trans2_bias_1,
        trans2_lower_sensor_limit,
        trans2_upper_sensor_limit,
        trans2_threshold_value,
        trans2_reference_junction_type,
        trans2_external_reference_junction_value,
        phys_sensor_drift_monitoring,
        trans2_sens_drift_limit,
        trans2_corrosion_detection,
        menu_onl_l5_exp_special_lin_2
    }
}

MENU menu_onl_l4_exp_system_info
{
    LABEL "System information|de|Systeminformationen";
    ACCESS ONLINE;
    ITEMS 
    {
		Header,
		ROWBREAK,
        phys_software_rev,
        phys_serial_num,
        phys_enp_order_code,
        phys_enp_order_Ident,
        phys_tag_desc,
        phys_enp_enp_version,
        phys_blk_profile,
        phys_blk_profile_rev_string,
        phys_device_man_id,
        phys_device_id,
        phys_ident_number_display,
        phys_updown_feat_supp
    }
}

MENU menu_onl_l4_exp_meas_value
{
    LABEL "Measured values|de|Messwerte";
    ACCESS ONLINE;
    ITEMS 
    {
		Header,
		ROWBREAK,
        trans1_primary_value,
        trans1_primary_value_status_quality,
        trans1_primary_value_status_limit,
        trans1_secondary_value_1,
        trans1_secondary_value_1_status_quality,
        trans1_secondary_value_1_status_limit,
        trans1_rj_value,
        trans1_rj_value_status_quality,
        trans1_rj_value_status_limit,
        trans1_sensor_raw_value,
        trans2_primary_value,
        trans2_primary_value_status_quality,
        trans2_primary_value_status_limit,
        trans2_secondary_value_1,
        trans2_secondary_value_1_status_quality,
        trans2_secondary_value_1_status_limit,
        trans2_rj_value,
        trans2_rj_value_status_quality,
        trans2_rj_value_status_limit,
        trans2_sensor_raw_value
    }
}

MENU menu_onl_l4_exp_min_max
{
    LABEL "Min/max values|de|Min-/Max-Werte";
    ACCESS ONLINE;
    ITEMS 
    {
		Header,
		ROWBREAK,
        trans1_pv_min_indicator,
        trans1_pv_max_indicator,
        trans1_min_sensor_value_1,
        trans1_max_sensor_value_1,
        trans2_pv_min_indicator,
        trans2_pv_max_indicator,
        trans2_min_sensor_value_1,
        trans2_max_sensor_value_1,
        trans1_rj_min_indicator,
        trans1_rj_max_indicator
    }
}

MENU menu_onl_l4_exp_dev_test_reset
{
    LABEL "Device test/reset|de|Gerätetest/Reset";
    ACCESS ONLINE;
    ITEMS 
    {
		Header,
		ROWBREAK,
        phys_factory_reset
    }
}

MENU menu_onl_l4_exp_analog_input_1
{
    LABEL "Analog Input 1|de|Analog Input 1";
    ACCESS ONLINE;
	STYLE DIALOG;
    ITEMS 
    {
		menu_onl_l4_exp_analog_input_1_page
	}
}

MENU menu_onl_l4_exp_analog_input_1_page
{
    LABEL "Analog Input 1|de|Analog Input 1";
    ACCESS ONLINE;
	STYLE PAGE;
    ITEMS 
    {
		Header,
		ROWBREAK,
		menu_onl_l4_exp_analog_input_1_group
	}
}

MENU menu_onl_l4_exp_analog_input_1_group
{
    LABEL "";
    ACCESS ONLINE;
	STYLE GROUP;
    ITEMS 
    {
        func1_AI_st_rev,
        func1_AI_tag_desc,
        func1_AI_target_mode,
        func1_actual_mode,
        func1_AI_channel,
        func1_current_state_alarm_sum,
        func1_unacknowledged_state_alarm_sum,
        func1_unreported_state_alarm_sum,
        func1_disabled_state_alarm_sum,
        func1_AI_out_unit_text,
        func1_AI_out_value,
        func1_AI_out_status_quality,
        func1_AI_out_status_limit,
        func1_AI_pv_ftime,
        func1_AI_pv_upper_range_value,
        func1_AI_pv_lower_range_value,
        func1_AI_out_upper_range_value,
        func1_AI_out_lower_range_value,
		COLUMNBREAK,
        func1_AI_out_unit,
        func1_AI_out_decimal_point,
        func1_AI_hi_hi_lim,
        func1_AI_hi_lim,
        func1_AI_lo_lim,
        func1_AI_lo_lo_lim,
        func1_AI_alarm_hys,
        func1_AI_FSafeType,
        func1_AI_FSafeValue,
        func1_AI_simulate_status_quality,
        func1_AI_simulate_status_limit,
        func1_AI_simulate_value,
        func1_AI_simulation_enabled
    }
}

MENU menu_onl_l4_exp_analog_input_2
{
    LABEL "Analog Input 2|de|Analog Input 2";
    ACCESS ONLINE;
	STYLE DIALOG;
    ITEMS 
    {
		menu_onl_l4_exp_analog_input_2_page
	}
}

MENU menu_onl_l4_exp_analog_input_2_page
{
    LABEL "Analog Input 2|de|Analog Input 2";
    ACCESS ONLINE;
	STYLE PAGE;
    ITEMS 
    {
		Header,
		ROWBREAK,
		menu_onl_l4_exp_analog_input_2_group
	}
}

MENU menu_onl_l4_exp_analog_input_2_group
{
    LABEL "";
    ACCESS ONLINE;
	STYLE GROUP;
    ITEMS 
    {
        func2_AI_st_rev,
        func2_AI_tag_desc,
        func2_AI_target_mode,
        func2_actual_mode,
        func2_AI_channel,
        func2_current_state_alarm_sum,
        func2_unacknowledged_state_alarm_sum,
        func2_unreported_state_alarm_sum,
        func2_disabled_state_alarm_sum,
        func2_AI_out_unit_text,
        func2_AI_out_value,
        func2_AI_out_status_quality,
        func2_AI_out_status_limit,
        func2_AI_pv_ftime,
        func2_AI_pv_upper_range_value,
        func2_AI_pv_lower_range_value,
        func2_AI_out_upper_range_value,
        func2_AI_out_lower_range_value,
		COLUMNBREAK,
        func2_AI_out_unit,
        func2_AI_out_decimal_point,
        func2_AI_hi_hi_lim,
        func2_AI_hi_lim,
        func2_AI_lo_lim,
        func2_AI_lo_lo_lim,
        func2_AI_alarm_hys,
        func2_AI_FSafeType,
        func2_AI_FSafeValue,
        func2_AI_simulate_status_quality,
        func2_AI_simulate_status_limit,
        func2_AI_simulate_value,
        func2_AI_simulation_enabled
    }
}

MENU menu_onl_l4_exp_analog_input_3
{
    LABEL "Analog Input 3|de|Analog Input 3";
    ACCESS ONLINE;
	STYLE DIALOG;
    ITEMS 
    {
		menu_onl_l4_exp_analog_input_3_page
	}
}

MENU menu_onl_l4_exp_analog_input_3_page
{
    LABEL "Analog Input 3|de|Analog Input 3";
    ACCESS ONLINE;
	STYLE PAGE;
    ITEMS 
    {
		Header,
		ROWBREAK,
		menu_onl_l4_exp_analog_input_3_group
	}
}

MENU menu_onl_l4_exp_analog_input_3_group
{
    LABEL "";
    ACCESS ONLINE;
	STYLE GROUP;
    ITEMS 
    {
        func3_AI_st_rev,
        func3_AI_tag_desc,
        func3_AI_target_mode,
        func3_actual_mode,
        func3_AI_channel,
        func3_current_state_alarm_sum,
        func3_unacknowledged_state_alarm_sum,
        func3_unreported_state_alarm_sum,
        func3_disabled_state_alarm_sum,
        func3_AI_out_unit_text,
        func3_AI_out_value,
        func3_AI_out_status_quality,
        func3_AI_out_status_limit,
        func3_AI_pv_ftime,
        func3_AI_pv_upper_range_value,
        func3_AI_pv_lower_range_value,
        func3_AI_out_upper_range_value,
        func3_AI_out_lower_range_value,
		COLUMNBREAK,
        func3_AI_out_unit,
        func3_AI_out_decimal_point,
        func3_AI_hi_hi_lim,
        func3_AI_hi_lim,
        func3_AI_lo_lim,
        func3_AI_lo_lo_lim,
        func3_AI_alarm_hys,
        func3_AI_FSafeType,
        func3_AI_FSafeValue,
        func3_AI_simulate_status_quality,
        func3_AI_simulate_status_limit,
        func3_AI_simulate_value,
        func3_AI_simulation_enabled
    }
}

MENU menu_onl_l4_exp_analog_input_4
{
    LABEL "Analog Input 4|de|Analog Input 4";
    ACCESS ONLINE;
	STYLE DIALOG;
    ITEMS 
    {
		menu_onl_l4_exp_analog_input_4_page
	}
}

MENU menu_onl_l4_exp_analog_input_4_page
{
    LABEL "Analog Input 4|de|Analog Input 4";
    ACCESS ONLINE;
	STYLE PAGE;
    ITEMS 
    {
		Header,
		ROWBREAK,
		menu_onl_l4_exp_analog_input_4_group
	}
}

MENU menu_onl_l4_exp_analog_input_4_group
{
    LABEL "";
    ACCESS ONLINE;
	STYLE GROUP;
    ITEMS 
    {
        func4_AI_st_rev,
        func4_AI_tag_desc,
        func4_AI_target_mode,
        func4_actual_mode,
        func4_AI_channel,
        func4_current_state_alarm_sum,
        func4_unacknowledged_state_alarm_sum,
        func4_unreported_state_alarm_sum,
        func4_disabled_state_alarm_sum,
        func4_AI_out_unit_text,
        func4_AI_out_value,
        func4_AI_out_status_quality,
        func4_AI_out_status_limit,
        func4_AI_pv_ftime,
        func4_AI_pv_upper_range_value,
        func4_AI_pv_lower_range_value,
        func4_AI_out_upper_range_value,
        func4_AI_out_lower_range_value,
		COLUMNBREAK,
        func4_AI_out_unit,
        func4_AI_out_decimal_point,
        func4_AI_hi_hi_lim,
        func4_AI_hi_lim,
        func4_AI_lo_lim,
        func4_AI_lo_lo_lim,
        func4_AI_alarm_hys,
        func4_AI_FSafeType,
        func4_AI_FSafeValue,
        func4_AI_simulate_status_quality,
        func4_AI_simulate_status_limit,
        func4_AI_simulate_value,
        func4_AI_simulation_enabled
    }
}

MENU menu_onl_l5_exp_special_lin_1
{
    LABEL "Special linearization 1|de|Spezielle Linearisierung 1";
    ACCESS ONLINE;
    ITEMS 
    {
		Header,
		ROWBREAK,
        trans1_cvd_min,
        trans1_cvd_max,
        trans1_cal_vandusen_R0,
        trans1_cal_vandusen_A,
        trans1_cal_vandusen_B,
        trans1_cal_vandusen_C,
        trans1_cal_method,
        trans1_cal_point_lo,
        trans1_cal_point_hi,
        trans1_cal_min_span,
        trans1_poly_coeff_min,
        trans1_poly_coeff_max,
        trans1_poly_coeff_R0,
        trans1_poly_coeff_A,
        trans1_poly_coeff_B,
        trans1_poly_coeff_C,
        trans1_sensor_serial_number
    }
}

MENU menu_onl_l5_exp_special_lin_2
{
    LABEL "Special linearization 2|de|Spezielle Linearisierung 2";
    ACCESS ONLINE;
    ITEMS 
    {
		Header,
		ROWBREAK,
        trans2_cvd_min,
        trans2_cvd_max,
        trans2_cal_vandusen_R0,
        trans2_cal_vandusen_A,
        trans2_cal_vandusen_B,
        trans2_cal_vandusen_C,
        trans2_cal_method,
        trans2_cal_point_lo,
        trans2_cal_point_hi,
        trans2_cal_min_span,
        trans2_poly_coeff_min,
        trans2_poly_coeff_max,
        trans2_poly_coeff_R0,
        trans2_poly_coeff_A,
        trans2_poly_coeff_B,
        trans2_poly_coeff_C,
        trans2_sensor_serial_number
    }
}
#endif
/***************************************************************************************
** Remedy information
***************************************************************************************/

/* Import Remedy information */

IMPORT "PBPA_EH_1551_0101_Remedyinfo.ddl"
{
    EVERYTHING;

    REDEFINITIONS
    {
    }
}

/***************************************************************************************
** Menu Process Variables
***************************************************************************************/
#ifdef _V600_
/* Import Menu Process Variables */

IMPORT "PBPA_EH_1551_0101_Process_Variables.ddl"
{
    EVERYTHING;

    REDEFINITIONS
    {
    }
}
#else
IMPORT "PBPA_EH_1551_0101_Process_Variables_PDM5.ddl"
{
    EVERYTHING;

    REDEFINITIONS
    {
    }
}
#endif