/***********************************************************************/
/*    Transducer Block 1: Modbus TB                                    */
/***********************************************************************/

BLOCK transducer_block_1
{
    TYPE      TRANSDUCER;
    NUMBER    1;
}

trans1_blk_reserve                          LIKE VARIABLE    phys_blk_reserve
{
}

VARIABLE trans1_blk_object
{
    LABEL       [blk_block_object];
    HELP        [blk_block_object_help];
    CLASS       CONTAINED;
    TYPE        ENUMERATED(1)
    {
        {    3,    [blk_block_object_TRANSDUCER]        }
    }
    HANDLING    READ;
}

VARIABLE trans1_blk_parent_class
{
    LABEL       [blk_parent_class];
    HELP        [trans_blk_parent_class_help];
    CLASS       CONTAINED;
    TYPE        ENUMERATED(1)
    {
        {    128,    [MT_trans1_blk_parent_class_128]   }
    }
    HANDLING    READ;
}

VARIABLE trans1_blk_class
{
    LABEL       [blk_class];
    HELP        [trans_blk_class_help];
    CLASS       CONTAINED;
    TYPE        ENUMERATED(1)
    {
        DEFAULT_VALUE    128;
        {    128,        [MT_trans1_blk_class]    }
    }
    HANDLING    READ;
}
trans1_blk_dd_reference                     LIKE VARIABLE    phys_blk_dd_reference
{
}

trans1_blk_dd_rev                           LIKE VARIABLE    phys_blk_dd_rev
{
}

trans1_blk_profile                          LIKE VARIABLE    phys_blk_profile
{
}

trans1_blk_profile_rev                      LIKE VARIABLE    phys_blk_profile_rev
{
}

trans1_blk_execution_time                   LIKE VARIABLE    phys_blk_execution_time
{
}

trans1_blk_num_parameters                   LIKE VARIABLE    phys_blk_num_parameters
{
}

trans1_blk_index_view_1                     LIKE VARIABLE    phys_blk_index_view_1
{
}

trans1_blk_num_view_lists                   LIKE VARIABLE    phys_blk_num_view_lists
{
}

trans1_st_rev                               LIKE VARIABLE    phys_st_rev
{
}

trans1_tag_desc                             LIKE VARIABLE    phys_tag_desc
{
    REDEFINE LABEL        [MT_trans_tag_desc];
}

trans1_strategy                             LIKE VARIABLE    phys_strategy
{
}

trans1_alert_key                            LIKE VARIABLE    phys_alert_key
{
}

trans1_target_mode                          LIKE VARIABLE    phys_target_mode
{
}

trans1_actual_mode                          LIKE VARIABLE    phys_actual_mode
{
}

trans1_permitted_mode                       LIKE VARIABLE    phys_permitted_mode
{
}

trans1_normal_mode                          LIKE VARIABLE    phys_normal_mode
{
}

trans1_current_state_alarm_sum              LIKE VARIABLE    phys_current_state_alarm_sum
{
}

trans1_unacknowledged_state_alarm_sum       LIKE VARIABLE    phys_unacknowledged_state_alarm_sum
{
}

trans1_unreported_state_alarm_sum           LIKE VARIABLE    phys_unreported_state_alarm_sum
{
}

trans1_disabled_state_alarm_sum             LIKE VARIABLE    phys_disabled_state_alarm_sum
{
}

/*---------------------------------------------------------------------*/
/*    TB-1 : Additional Parameter                                      */
/*---------------------------------------------------------------------*/
VARIABLE trans1_primary_value
{
    LABEL   [MT_primary_value];
    HELP    [MT_primary_value_help];
    CLASS   OUTPUT & DYNAMIC;
    TYPE    FLOAT
    {
        DEFAULT_VALUE    0.0;
    }
    HANDLING    READ;
}

VARIABLE trans1_primary_value_status_quality
{
    LABEL       [status_quality];
    CLASS       OUTPUT & DYNAMIC;
    TYPE        ENUMERATED (1)
    {
        DEFAULT_VALUE    0;
        STATUS_OUTPUT_NO_RCAS
    }
}

trans1_primary_value_status_limit           LIKE VARIABLE    trans1_primary_value_status_quality
{
    REDEFINE LABEL       [status_limit];
    REDEFINE TYPE        ENUMERATED (1)
    {
        STATUS_OUTPUT_LIMIT
    }
}

VARIABLE trans1_secondary_value
{
    LABEL   [MT_secondary_value];
    HELP    [MT_secondary_value_help];
    CLASS   OUTPUT & DYNAMIC;
    TYPE    FLOAT
    {
        DEFAULT_VALUE    0.0;
    }
    HANDLING    READ;
}

VARIABLE trans1_secondary_value_status_quality
{
    LABEL       [status_quality];
    CLASS       OUTPUT & DYNAMIC;
    TYPE        ENUMERATED (1)
    {
        DEFAULT_VALUE    0;
        STATUS_OUTPUT_NO_RCAS
    }
}

trans1_secondary_value_status_limit         LIKE VARIABLE    trans1_secondary_value_status_quality
{
    REDEFINE LABEL       [status_limit];
    REDEFINE TYPE        ENUMERATED (1)
    {
        STATUS_OUTPUT_LIMIT
    }
}

VARIABLE trans1_third_value
{
    LABEL   [MT_third_value];
    HELP    [MT_third_value_help];
    CLASS   OUTPUT & DYNAMIC;
    TYPE    FLOAT
    {
        DEFAULT_VALUE    0.0;
    }
    HANDLING    READ;
}

VARIABLE trans1_third_value_status_quality
{
    LABEL       [status_quality];
    CLASS       OUTPUT & DYNAMIC;
    TYPE        ENUMERATED (1)
    {
        DEFAULT_VALUE    0;
        STATUS_OUTPUT_NO_RCAS
    }
}

trans1_third_value_status_limit             LIKE VARIABLE    trans1_third_value_status_quality
{
    REDEFINE LABEL       [status_limit];
    REDEFINE TYPE        ENUMERATED (1)
    {
        STATUS_OUTPUT_LIMIT
    }
}

VARIABLE trans1_fourth_value
{
    LABEL   [MT_fourth_value];
    HELP    [MT_fourth_value_help];
    CLASS   OUTPUT & DYNAMIC;
    TYPE    FLOAT
    {
        DEFAULT_VALUE    0.0;
    }
    HANDLING    READ;
}

VARIABLE trans1_fourth_value_status_quality
{
    LABEL       [status_quality];
    CLASS       OUTPUT & DYNAMIC;
    TYPE        ENUMERATED (1)
    {
        DEFAULT_VALUE    0;
        STATUS_OUTPUT_NO_RCAS
    }
}

trans1_fourth_value_status_limit            LIKE VARIABLE    trans1_fourth_value_status_quality
{
    REDEFINE LABEL       [status_limit];
    REDEFINE TYPE        ENUMERATED (1)
    {
        STATUS_OUTPUT_LIMIT
    }
}

/***********************************************************************/
/*    Modbus Address : 500                                             */
/***********************************************************************/

//VARIABLE    trans1_sensor_channel
//{
//    LABEL           [MT_sensor_channel];
//    HELP            [MT_sensor_channel_help];
//    CLASS           CONTAINED;
//    TYPE            ENUMERATED (1)
//    {
//        DEFAULT_VALUE    0;
//        { 0, [MT_sensor_channel_0], [MT_sensor_channel_0_help]},
//        { 1, [MT_sensor_channel_1], [MT_sensor_channel_1_help]}
//    }
//    HANDLING        READ;
////    VALIDITY
////        IF (trans1_sensor_type >= 128)
////            {TRUE;}
////        ELSE
////            {FALSE;}
//}

VARIABLE    trans1_sensor_type
{
    LABEL           [MT_sensor_type];
    HELP            [MT_sensor_type_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
    {
        DEFAULT_VALUE    1;
        _ANALOG_CHANNEL_SENSOR_TYPE,
        _ISM_CHANNEL_SENSOR_TYPE
    }
    HANDLING        READ & WRITE;
	POST_EDIT_ACTIONS
	{
        method_sensor_type_post_edit_actions
	}     
}

METHOD method_sensor_type_post_edit_actions
{
    LABEL       "method_sensor_type_post_edit_actions";
    DEFINITION
    {
    func1_AI_2_channel = 1;     //degC
    func1_AI_2_out_unit = 1001;
    func1_AI_2_out_decimal_point = 2;
    func1_AI_2_pv_lower_range_value = -40;
    func1_AI_2_pv_upper_range_value = 200;
    func1_AI_2_out_lower_range_value = -40;
    func1_AI_2_out_upper_range_value = 200;     
    func1_AI_2_lo_lo_lim = -40;
    func1_AI_2_lo_lim = -40;
    func1_AI_2_hi_lim = 200;
    func1_AI_2_hi_hi_lim = 200;

    func1_AI_3_channel = 3;     //None
    func1_AI_3_out_unit = 40004;
    func1_AI_3_out_decimal_point = 0;
    func1_AI_3_pv_lower_range_value = 0;
    func1_AI_3_pv_upper_range_value = 100;
    func1_AI_3_out_lower_range_value = 0;
    func1_AI_3_out_upper_range_value = 100;     
    func1_AI_3_lo_lo_lim = 0;
    func1_AI_3_lo_lim = 0;
    func1_AI_3_hi_lim = 100;
    func1_AI_3_hi_hi_lim = 100;   

    func1_AI_4_channel = 3;
    func1_AI_4_out_unit = 40004;
    func1_AI_4_out_decimal_point = 0;
    func1_AI_4_pv_lower_range_value = 0;
    func1_AI_4_pv_upper_range_value = 100;
    func1_AI_4_out_lower_range_value = 0;
    func1_AI_4_out_upper_range_value = 100;     
    func1_AI_4_lo_lo_lim = 0;
    func1_AI_4_lo_lim = 0;
    func1_AI_4_hi_lim = 100;
    func1_AI_4_hi_hi_lim = 100; 
 
    switch(trans1_sensor_type)
    {
        case 1:
        case 129:
        case 130:
            func1_AI_1_channel = 10;            //pH
            func1_AI_1_out_unit = 1422;
            func1_AI_1_out_decimal_point = 2;
            func1_AI_1_pv_lower_range_value = 2;
            func1_AI_1_pv_upper_range_value = 12;
            func1_AI_1_out_lower_range_value = 2;
            func1_AI_1_out_upper_range_value = 12;    
            func1_AI_1_lo_lo_lim = -2;
            func1_AI_1_lo_lim = -2;
            func1_AI_1_hi_lim = 20;
            func1_AI_1_hi_hi_lim = 20;            
            break;
        case 3:
        case 4:
        case 131:
        case 132:
            func1_AI_1_channel = 30;            //ms/cm
            func1_AI_1_out_unit = 1302;
            func1_AI_1_out_decimal_point = 2;
            func1_AI_1_pv_lower_range_value = 0;
            func1_AI_1_pv_upper_range_value = 600;
            func1_AI_1_out_lower_range_value = 0;
            func1_AI_1_out_upper_range_value = 600;    
            func1_AI_1_lo_lo_lim = 0;
            func1_AI_1_lo_lim = 0;
            func1_AI_1_hi_lim = 1000;
            func1_AI_1_hi_hi_lim = 1000;
            break;          
        case 5:
        case 133:
        case 137:
            func1_AI_1_channel = 20;            //%air
            func1_AI_1_out_unit = 34000;
            func1_AI_1_out_decimal_point = 2;
            func1_AI_1_pv_lower_range_value = 0;
            func1_AI_1_pv_upper_range_value = 500;
            func1_AI_1_out_lower_range_value = 0;
            func1_AI_1_out_upper_range_value = 500;  
            func1_AI_1_lo_lo_lim = 0;
            func1_AI_1_lo_lim = 0;
            func1_AI_1_hi_lim = 500;
            func1_AI_1_hi_hi_lim = 500;
            break;              
        case 6:
        case 7:
        case 134:
        case 135:
        case 136:
            func1_AI_1_channel = 25;            //ppb O2
            func1_AI_1_out_unit = 1424;
            func1_AI_1_out_decimal_point = 0;
            func1_AI_1_pv_lower_range_value = 0; 
            func1_AI_1_pv_upper_range_value = 50000;
            func1_AI_1_out_lower_range_value = 0;
            func1_AI_1_out_upper_range_value = 50000;    
            func1_AI_1_lo_lo_lim = 0;
            func1_AI_1_lo_lim = 0;
            func1_AI_1_hi_lim = 50000;
            func1_AI_1_hi_hi_lim = 50000;
            break; 
        case 138:
            func1_AI_1_channel = 51;            //hpa 
            func1_AI_1_out_unit = 1136;
            func1_AI_1_out_decimal_point = 1;
            func1_AI_1_pv_lower_range_value = 0;
            func1_AI_1_pv_upper_range_value = 2000;
            func1_AI_1_out_lower_range_value = 0;
            func1_AI_1_out_upper_range_value = 2000;    
            func1_AI_1_lo_lo_lim = 0;
            func1_AI_1_lo_lim = 0;
            func1_AI_1_hi_lim = 2000;
            func1_AI_1_hi_hi_lim = 2000;
            break;
        case 139:
            func1_AI_1_channel = 60;            //hpa
            func1_AI_1_out_unit = 1136;
            func1_AI_1_out_decimal_point = 1;
            func1_AI_1_pv_lower_range_value = 0;
            func1_AI_1_pv_upper_range_value = 99999;
            func1_AI_1_out_lower_range_value = 0;
            func1_AI_1_out_upper_range_value = 99999;    
            func1_AI_1_lo_lo_lim = 0;
            func1_AI_1_lo_lim = 0;
            func1_AI_1_hi_lim = 99999;
            func1_AI_1_hi_hi_lim = 99999;
            break;
        case 140:
            func1_AI_1_channel = 65;            //ppb O3
            func1_AI_1_out_unit = 1124;
            func1_AI_1_out_decimal_point = 0;
            func1_AI_1_pv_lower_range_value = 0;
            func1_AI_1_pv_upper_range_value = 50000;
            func1_AI_1_out_lower_range_value = 0;
            func1_AI_1_out_upper_range_value = 50000;    
            func1_AI_1_lo_lo_lim = 0;
            func1_AI_1_lo_lim = 0;
            func1_AI_1_hi_lim = 50000; 
            func1_AI_1_hi_hi_lim = 50000; 
            break;            
    }

    ACKNOWLEDGE("Some of AI blocks parameters are changed to default value when sensor is changed.\n"  \
                "1 Check AI blocks parameters and download to device\n"                                \
                "2 Close application software and open again to reload configration");

    }
}

VARIABLE    trans1_auto_recognize
{
    LABEL           [MT_auto_recognize];
    HELP            [MT_auto_recognize_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
    {
        DEFAULT_VALUE    1;
        { 0, [MT_no],  [MT_no_help]  },
        { 1, [MT_yes], [MT_yes_help] }
    }
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_primary_value_aver
{
    LABEL           [MT_average_value_pv];
    HELP            [MT_average_value_pv_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
    {
        DEFAULT_VALUE    4;
        { 0, [MT_average_value_none],    [MT_average_value_none_help]    },
        { 1, [MT_average_value_low],     [MT_average_value_low_help]     },
        { 2, [MT_average_value_medium],  [MT_average_value_medium_help]  },
        { 3, [MT_average_value_high],    [MT_average_value_high_help]    },
        { 4, [MT_average_value_special], [MT_average_value_special_help] }
    }
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_secondary_value_aver
{
    LABEL           [MT_average_value_sv];
    HELP            [MT_average_value_sv_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
    {
        DEFAULT_VALUE    4;
        { 0, [MT_average_value_none],    [MT_average_value_none_help]    },
        { 1, [MT_average_value_low],     [MT_average_value_low_help]     },
        { 2, [MT_average_value_medium],  [MT_average_value_medium_help]  },
        { 3, [MT_average_value_high],    [MT_average_value_high_help]    },
        { 4, [MT_average_value_special], [MT_average_value_special_help] }
    }
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_third_value_aver
{
    LABEL           [MT_average_value_tv];
    HELP            [MT_average_value_tv_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
    {
        DEFAULT_VALUE    4;
        { 0, [MT_average_value_none],    [MT_average_value_none_help]    },
        { 1, [MT_average_value_low],     [MT_average_value_low_help]     },
        { 2, [MT_average_value_medium],  [MT_average_value_medium_help]  },
        { 3, [MT_average_value_high],    [MT_average_value_high_help]    },
        { 4, [MT_average_value_special], [MT_average_value_special_help] }
    }
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_fourth_value_aver
{
    LABEL           [MT_average_value_qv];
    HELP            [MT_average_value_qv_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
    {
        DEFAULT_VALUE    4;
        { 0, [MT_average_value_none],    [MT_average_value_none_help]    },
        { 1, [MT_average_value_low],     [MT_average_value_low_help]     },
        { 2, [MT_average_value_medium],  [MT_average_value_medium_help]  },
        { 3, [MT_average_value_high],    [MT_average_value_high_help]    },
        { 4, [MT_average_value_special], [MT_average_value_special_help] }
    }
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_device_time              //Device Date
{
    LABEL           [MT_device_time];
    HELP            [MT_device_time_help];
    CLASS           CONTAINED;
	TYPE		    DATE_AND_TIME
	{
		DEFAULT_VALUE  "";//GetCurrentDateAndTime();
	}
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_alarm_flags
{
    LABEL           [MT_alarm_flags];
    HELP            [MT_alarm_flags_help];
    CLASS           CONTAINED;
    TYPE            BIT_ENUMERATED (4)
    {
        { 0x00000001,  [MT_alarm_flags_bit0],  [MT_alarm_flags_bit0_help]    },
        { 0x00000002,  [MT_alarm_flags_bit1],  [MT_alarm_flags_bit1_help]    },
        { 0x00000004,  [MT_alarm_flags_bit2],  [MT_alarm_flags_bit2_help]    },
        { 0x00000008,  [MT_alarm_flags_bit3],  [MT_alarm_flags_bit3_help]    },
        { 0x00000010,  [MT_alarm_flags_bit4],  [MT_alarm_flags_bit4_help]    },
        { 0x00000020,  [MT_alarm_flags_bit5],  [MT_alarm_flags_bit5_help]    },
        { 0x00000040,  [MT_alarm_flags_bit6],  [MT_alarm_flags_bit6_help]    },
        { 0x00000080,  [MT_alarm_flags_bit7],  [MT_alarm_flags_bit7_help]    },
        { 0x00000100,  [MT_alarm_flags_bit8],  [MT_alarm_flags_bit8_help]    },
        { 0x00000200,  [MT_alarm_flags_bit9],  [MT_alarm_flags_bit9_help]    },
        { 0x00000400,  [MT_alarm_flags_bit10], [MT_alarm_flags_bit10_help]   },
        { 0x00000800,  [MT_alarm_flags_bit11], [MT_alarm_flags_bit11_help]   },
        { 0x00001000,  [MT_alarm_flags_bit12], [MT_alarm_flags_bit12_help]   },
        { 0x00002000,  [MT_alarm_flags_bit13], [MT_alarm_flags_bit13_help]   },
        { 0x00004000,  [MT_alarm_flags_bit14], [MT_alarm_flags_bit14_help]   },
        { 0x00008000,  [MT_alarm_flags_bit15], [MT_alarm_flags_bit15_help]   },
        { 0x00010000,  [MT_alarm_flags_bit16], [MT_alarm_flags_bit16_help]   },
        { 0x00020000,  [MT_alarm_flags_bit17], [MT_alarm_flags_bit17_help]   },
        { 0x00040000,  [MT_alarm_flags_bit18], [MT_alarm_flags_bit18_help]   },
        { 0x00080000,  [MT_alarm_flags_bit19], [MT_alarm_flags_bit19_help]   },
        { 0x00100000,  [MT_alarm_flags_bit20], [MT_alarm_flags_bit20_help]   },
        { 0x00200000,  [MT_alarm_flags_bit21], [MT_alarm_flags_bit21_help]   },
        { 0x00400000,  [MT_alarm_flags_bit22], [MT_alarm_flags_bit22_help]   },
        { 0x00800000,  [MT_alarm_flags_bit23], [MT_alarm_flags_bit23_help]   },
        { 0x01000000,  [MT_alarm_flags_bit24], [MT_alarm_flags_bit24_help]   }
    }
	STYLE		"MULTILINE 30 25";
    HANDLING        READ & WRITE;
}

/***********************************************************************/
/*    Modbus Address : 1000                                            */
/***********************************************************************/

VARIABLE    trans1_temp_sensor_type         //RTD_TYPE
{
    LABEL           [MT_temp_sensor_type];
    HELP            [MT_temp_sensor_type_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
    {
        DEFAULT_VALUE    0;
        { 0, [MT_temp_sensor_type_auto],	[MT_temp_sensor_type_auto_help]   },
        { 1, [MT_temp_sensor_type_ntc22k],	[MT_temp_sensor_type_ntc22k_help] },
        { 2, [MT_temp_sensor_type_pt1000],	[MT_temp_sensor_type_pt1000_help] },
        { 3, [MT_temp_sensor_type_pt100],	[MT_temp_sensor_type_pt100_help]  },
        { 4, [MT_temp_sensor_type_fixed],	[MT_temp_sensor_type_fixed_help]  }
    }

    HANDLING        READ & WRITE;
}

VARIABLE    trans1_temp_fixed_value_degc    //Meas Fixed
{
    LABEL           [MT_temp_fixed_value_degc];
    HELP            [MT_temperature_value_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        MIN_VALUE   -9999;
        MAX_VALUE   99999;
        DEFAULT_VALUE    25;
    }
    CONSTANT_UNIT   [unit_1001];
    HANDLING        READ & WRITE;
    VALIDITY
        IF (trans1_temp_sensor_type == 4)
            {TRUE;}
        ELSE
            {FALSE;}
}

VARIABLE    trans1_temp_cal_fixed_value     //Cal Fixed
{
    LABEL           [MT_temp_cal_fixed_value];
    HELP            [MT_temp_cal_fixed_value_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        MIN_VALUE   -9999;
        MAX_VALUE   99999;
        DEFAULT_VALUE    25;
    }
    CONSTANT_UNIT   [unit_1001];
    HANDLING        READ & WRITE;
    VALIDITY
        IF ((trans1_temp_sensor_type == 4)&&(trans1_sensor_type == 1))
            {TRUE;}
        ELSE
            {FALSE;}    
}

VARIABLE    trans1_raw_temp                 //Raw Value
{
    LABEL           [MT_raw_temp];
    HELP            [MT_raw_temp_help];
    CLASS           CONTAINED & DYNAMIC;
    TYPE            FLOAT
    {
        DISPLAY_FORMAT ".2f";
    }     
    HANDLING        READ;
}

VARIABLE    trans1_raw_temp_unit
{
    LABEL           [MT_raw_temp_unit];
    HELP            [MT_raw_temp_unit_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (2)
    {
        IF(SENSOR_CHANNEL_ANALOG)
        {
            { 1281, [unit_1281],    [unit_1281_help] }
        }
        ELSE
        {
            { 1001, [unit_1001],    [unit_1001_help] }
        }
        
    }
    HANDLING        READ;
}

/***********************************************************************/
/*    Modbus Address : 1100                                            */
/***********************************************************************/

VARIABLE    trans1_cal_drift                //Stability
{
    LABEL           [MT_stability];
    HELP            [MT_stability_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (2)
    {
        DEFAULT_VALUE    0;
        IF(SENSOR_PH || SENSOR_CO2)
        {
            { 0, [MT_stability_medium], [MT_stability_medium_help] },
    		{ 1, [MT_stability_manual], [MT_stability_manual_help] },
            { 3, [MT_stability_low],    [MT_stability_low_help]    },    		
            { 2, [MT_stability_high],   [MT_stability_high_help]   }
        }
        ELSE
        {
            { 0, [MT_stability_medium], [MT_stability_medium_help] },
            { 1, [MT_stability_manual], [MT_stability_manual_help] }
        }
    }

    HANDLING        READ & WRITE;
}

VARIABLE    trans1_cal_slope
{
    LABEL           [MT_cal_slope];
    HELP            [MT_cal_slope_help];
    CLASS           CONTAINED;
    TYPE            FLOAT;
    HANDLING        READ;
}

VARIABLE    trans1_cal_offset
{
    LABEL           [MT_cal_offset];
    HELP            [MT_cal_offset_help];
    CLASS           CONTAINED;
    TYPE            FLOAT;
    HANDLING        READ;
}

VARIABLE    trans1_cal_point
{
    LABEL           [MT_cal_point];
    HELP            [MT_cal_point_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        DISPLAY_FORMAT ".3f";
    }
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_o2_cal_unit//trans1_cal_unit1
{
    LABEL           [MT_cal_unit];
    HELP            [MT_cal_unit_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (2)
    {
        _O2_CAL_UNIT
    }
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_cal_recode
{
    LABEL           [MT_cal_recode];
    HELP            [MT_cal_recode_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
    {
        DEFAULT_VALUE    0;
		{ 0, [MT_cal_recode_0], [MT_cal_recode_0_help]},
		{ 1, [MT_cal_recode_1], [MT_cal_recode_1_help]}
    }
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_cal_recode_point
{
    LABEL           [MT_cal_recode_point];
    HELP            [MT_cal_recode_point_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
    {
        DEFAULT_VALUE    0;
        { 0, [MT_cal_recode_point_0], [MT_cal_recode_point_0_help]},
		{ 1, [MT_cal_recode_point_1], [MT_cal_recode_point_1_help]}
    }
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_cal_save_type
{
    LABEL           [MT_cal_save_type];
    HELP            [MT_cal_save_type_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (2)
    {
        DEFAULT_VALUE    0;
		{ 0, [MT_cal_save_type_0], [MT_cal_save_type_0_help] },
		{ 1, [MT_cal_save_type_1], [MT_cal_save_type_1_help] },
		{ 2, [MT_cal_save_type_2], [MT_cal_save_type_2_help] }
    }
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_entry_cal_edit           //MeasCal_Action
{
    LABEL           [MT_entry_cal_edit];
    HELP            [MT_entry_cal_edit_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
    {
        DEFAULT_VALUE    0;
	    { 0, [MT_entry_cal_edit_0], [MT_entry_cal_edit_0_help] },
        { 1, [MT_entry_cal_edit_1],	[MT_entry_cal_edit_1_help] }
    }
    HANDLING        READ;
}

VARIABLE    trans1_entry_cal_point          //MeasCal_Point
{
    LABEL           [MT_entry_cal_point];
    HELP            [MT_entry_cal_point_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
    {
        DEFAULT_VALUE    0;
        { 0, [MT_entry_cal_point_0], [MT_entry_cal_point_0_help] },
        { 1, [MT_entry_cal_point_1], [MT_entry_cal_point_1_help] }
    }
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_cal_mode
{
    LABEL           [MT_entry_cal_mode];
    HELP            [MT_entry_cal_mode_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (2)
    {
        DEFAULT_VALUE    0;
        {   0, [MT_entry_cal_mode_00], [MT_entry_cal_mode_00_help]  },
        {   1, [MT_entry_cal_mode_01], [MT_entry_cal_mode_01_help]  },
        {   2, [MT_entry_cal_mode_02], [MT_entry_cal_mode_02_help]  },
        {   3, [MT_entry_cal_mode_03], [MT_entry_cal_mode_03_help]  },
        {   4, [MT_entry_cal_mode_04], [MT_entry_cal_mode_04_help]  },
        {  18, [MT_entry_cal_mode_18], [MT_entry_cal_mode_18_help]  },
        {   5, [MT_entry_cal_mode_05], [MT_entry_cal_mode_05_help]  },
        {   6, [MT_entry_cal_mode_06], [MT_entry_cal_mode_06_help]  },
        {   7, [MT_entry_cal_mode_07], [MT_entry_cal_mode_07_help]  },
        {   8, [MT_entry_cal_mode_08], [MT_entry_cal_mode_08_help]  },
        {   9, [MT_entry_cal_mode_09], [MT_entry_cal_mode_09_help]  },
        {  10, [MT_entry_cal_mode_10], [MT_entry_cal_mode_10_help]  },
        {  11, [MT_entry_cal_mode_11], [MT_entry_cal_mode_11_help]  },
        {  12, [MT_entry_cal_mode_12], [MT_entry_cal_mode_12_help]  },
        {  13, [MT_entry_cal_mode_13], [MT_entry_cal_mode_13_help]  },
        {  14, [MT_entry_cal_mode_14], [MT_entry_cal_mode_14_help]  },
        {  15, [MT_entry_cal_mode_15], [MT_entry_cal_mode_15_help]  },
        {  16, [MT_entry_cal_mode_16], [MT_entry_cal_mode_16_help]  },
        {  17, [MT_entry_cal_mode_17], [MT_entry_cal_mode_17_help]  },
        {  19, [MT_entry_cal_mode_19], [MT_entry_cal_mode_19_help]  },
        {  20, [MT_entry_cal_mode_20], [MT_entry_cal_mode_20_help]  },
        {  21, [MT_entry_cal_mode_21], [MT_entry_cal_mode_21_help]  },
        {  22, [MT_entry_cal_mode_22], [MT_entry_cal_mode_22_help]  },
        {  23, [MT_entry_cal_mode_23], [MT_entry_cal_mode_23_help]  },
        {  24, [MT_entry_cal_mode_24], [MT_entry_cal_mode_24_help]  },
        {  25, [MT_entry_cal_mode_25], [MT_entry_cal_mode_25_help]  }
    }

    HANDLING        READ & WRITE;
}

VARIABLE    trans1_cal_flags
{
    LABEL           [MT_cal_flags];
    HELP            [MT_cal_flags_help];
    CLASS           CONTAINED & DYNAMIC;
    TYPE            BIT_ENUMERATED (2)
    {
        DEFAULT_VALUE  0xE0;
        { 0x0001, [MT_cal_flags_bit00], [MT_cal_flags_bit00_help] },
        { 0x0002, [MT_cal_flags_bit01], [MT_cal_flags_bit01_help] },
        { 0x0004, [MT_cal_flags_bit02], [MT_cal_flags_bit02_help] },
        { 0x0008, [MT_cal_flags_bit03], [MT_cal_flags_bit03_help] },
        { 0x0010, [MT_cal_flags_bit04], [MT_cal_flags_bit04_help] },
        { 0x0020, [MT_cal_flags_bit05], [MT_cal_flags_bit05_help] },
        { 0x0040, [MT_cal_flags_bit06], [MT_cal_flags_bit06_help] },
        { 0x0080, [MT_cal_flags_bit07], [MT_cal_flags_bit07_help] },
        { 0x0100, [MT_cal_flags_bit08], [MT_cal_flags_bit08_help] },
        { 0x0200, [MT_cal_flags_bit09], [MT_cal_flags_bit09_help] },
        { 0x0400, [MT_cal_flags_bit10], [MT_cal_flags_bit10_help] },
        { 0x0800, [MT_cal_flags_bit11], [MT_cal_flags_bit11_help] },
        { 0x1000, [MT_cal_flags_bit12], [MT_cal_flags_bit12_help] },
        { 0x2000, [MT_cal_flags_bit13], [MT_cal_flags_bit13_help] }/*,
        { 0x8000, [MT_cal_flags_bit15], [MT_cal_flags_bit15_help] }*/
    }
    STYLE		"MULTILINE 14 25";
    HANDLING        READ;
}

VARIABLE    trans1_cal_value1
{
    LABEL           [MT_cal_value];
    HELP            [MT_cal_value_help];
    CLASS           CONTAINED & DYNAMIC;
    TYPE            FLOAT
    {
        DISPLAY_FORMAT ".3f";
    }
    HANDLING        READ;
}

VARIABLE    trans1_cal_unitcode
{
    LABEL           [MT_cal_unitcode];
    HELP            [MT_cal_unitcode_help];
    CLASS           CONTAINED & DYNAMIC;
    TYPE            ENUMERATED (2)
    {
        _CAL_UNITCODE
    }
    HANDLING        READ;
}

/***********************************************************************/
/*    Modbus Address : 1200                                            */
/***********************************************************************/

VARIABLE    trans1_ph_buffer_mode           //BUFFER
{
    LABEL           [MT_ph_buffer_mode];
    HELP            [MT_ph_buffer_mode_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
	{
        DEFAULT_VALUE    0;
        {   0, [MT_ph_buffer_mode_00], [MT_ph_buffer_mode_00_help]  },
        {   1, [MT_ph_buffer_mode_01], [MT_ph_buffer_mode_01_help]  },
        {   2, [MT_ph_buffer_mode_02], [MT_ph_buffer_mode_02_help]  },
        {   3, [MT_ph_buffer_mode_03], [MT_ph_buffer_mode_03_help]  },
        {   4, [MT_ph_buffer_mode_04], [MT_ph_buffer_mode_04_help]  },
        {   5, [MT_ph_buffer_mode_05], [MT_ph_buffer_mode_05_help]  },
        {   6, [MT_ph_buffer_mode_06], [MT_ph_buffer_mode_06_help]  },
        {   7, [MT_ph_buffer_mode_07], [MT_ph_buffer_mode_07_help]  },
        {   8, [MT_ph_buffer_mode_08], [MT_ph_buffer_mode_08_help]  },
        {   9, [MT_ph_buffer_mode_09], [MT_ph_buffer_mode_09_help]  },
        {  10, [MT_ph_buffer_mode_10], [MT_ph_buffer_mode_10_help]  }
	}

    HANDLING        READ & WRITE;
}

VARIABLE    trans1_ph_stc_ref_mode
{
    LABEL           [MT_ph_stc_ref_mode];
    HELP            [MT_ph_stc_ref_mode_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
	{
        DEFAULT_VALUE    1;
		{ 0, [MT_yes], [MT_yes_help] },
		{ 1, [MT_no],  [MT_no_help]  }
	}
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_ph_slope_display
{
    LABEL           [MT_ph_slope_display];
    HELP            [MT_ph_slope_display_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
	{
        DEFAULT_VALUE    0;
		{ 0, [MT_ph_slope_display_0], [MT_ph_slope_display_0_help]  },
		{ 1, [MT_ph_slope_display_1], [MT_ph_slope_display_1_help]  }
	}
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_ph_offset_display
{
    LABEL           [MT_ph_offset_display];
    HELP            [MT_ph_offset_display_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
	{
        DEFAULT_VALUE    0;
		{ 0, [MT_ph_offset_display_0], [MT_ph_offset_display_0_help]  },
		{ 1, [MT_ph_offset_display_1], [MT_ph_offset_display_1_help]  }
	}
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_ph_stc_ref_temp
{
    LABEL           [MT_ph_stc_ref_temp];
    HELP            [MT_ph_stc_ref_temp_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        MIN_VALUE       -40.0;
        MAX_VALUE       200.0;
        DEFAULT_VALUE   25.0;
    }
    CONSTANT_UNIT   [unit_1001];
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_ph_stc_ref_value
{
    LABEL           [MT_ph_stc_ref_value];
    HELP            [MT_ph_stc_ref_value_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        MIN_VALUE   -99999;
        MAX_VALUE   999999;
        DEFAULT_VALUE    0;
    }
    CONSTANT_UNIT   [MT_unit_ph_degc];
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_ph_ip
{
    LABEL           [MT_ph_ip];
    HELP            [MT_ph_ip_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        MIN_VALUE     -2.0;
        MAX_VALUE     16.0;
        DEFAULT_VALUE 7.0;
    }
    CONSTANT_UNIT   [unit_1422];
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_ph_salinity
{
    LABEL           [MT_ph_salinity];
    HELP            [MT_ph_salinity_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        MIN_VALUE     0.0;
        MAX_VALUE     60.0;
        DEFAULT_VALUE 28.0;
    }
    CONSTANT_UNIT   [unit_1105];
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_ph_hco3
{
    LABEL           [MT_ph_hco3];
    HELP            [MT_ph_hco3_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        MIN_VALUE     0.0;
        MAX_VALUE     0.255;
        DEFAULT_VALUE 0.05;
    }
    CONSTANT_UNIT   [unit_1399];
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_ph_totpres_unit
{
    LABEL           [MT_ph_totpres_unit];
    HELP            [MT_ph_totpres_unit_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (2)
    {
        DEFAULT_VALUE 1157;
		{ 1133,	[unit_1133],	[unit_1133_help]	},
		{ 1136,	[unit_1136],	[unit_1136_help]	},
		{ 1138,	[unit_1138],	[unit_1138_help]	},
		{ 1141,	[unit_1141],	[unit_1141_help]	},
		{ 1157,	[unit_1157],	[unit_1157_help]	}
    }
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_ph_totpres
{
    LABEL           [MT_ph_totpres];
    HELP            [MT_ph_totpres_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        //MIN_VALUE     0.0;
        //MAX_VALUE     9999.0;
        DEFAULT_VALUE 750.1;
    }
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_ph_mv
{
    LABEL           [MT_ph_mv];
    HELP            [MT_ph_mv_help];
    CLASS           CONTAINED & DYNAMIC;
    TYPE            FLOAT
    {
        DISPLAY_FORMAT ".1f";
    }
    CONSTANT_UNIT   [unit_1243];
    HANDLING        READ;
    VALIDITY
        IF(SENSOR_PH || SENSOR_CO2)    {TRUE;}
        ELSE             {FALSE;}
}

VARIABLE    trans1_orp_mv
{
    LABEL           [MT_orp_mv];
    HELP            [MT_orp_mv_help];
    CLASS           CONTAINED & DYNAMIC;
    TYPE            FLOAT
    {
        DISPLAY_FORMAT ".1f";
    }
    CONSTANT_UNIT   [unit_1243];
    HANDLING        READ;
    VALIDITY
        IF(SENSOR_PH && SENSOR_CHANNEL_DIGITAL)    {TRUE;}
        ELSE             {FALSE;}
}

VARIABLE    trans1_ph_raw_rr
{
    LABEL           [MT_ph_raw_rr];
    HELP            [MT_ph_raw_rr_help];
    CLASS           CONTAINED & DYNAMIC;
    TYPE            FLOAT
    {
        DISPLAY_FORMAT ".0f";
    }
    CONSTANT_UNIT   [unit_1284];
    HANDLING        READ;
    VALIDITY
        IF(SENSOR_PH_RR)    {TRUE;}
        ELSE             {FALSE;}
}

VARIABLE    trans1_ph_raw_rg
{
    LABEL           [MT_ph_raw_rg];
    HELP            [MT_ph_raw_rg_help];
    CLASS           CONTAINED & DYNAMIC;
    TYPE            FLOAT
    {
        DISPLAY_FORMAT ".0f";
    }
    CONSTANT_UNIT   [unit_1283];
    HANDLING        READ;
    VALIDITY
        IF(SENSOR_PH || SENSOR_CO2)    {TRUE;}
        ELSE             {FALSE;}
}

VARIABLE    trans1_ph_raw_rpna
{
    LABEL           [MT_ph_raw_rpna];
    HELP            [MT_ph_raw_rpna_help];
    CLASS           CONTAINED & DYNAMIC;
    TYPE            FLOAT
    {
        DISPLAY_FORMAT ".0f";
    }
    CONSTANT_UNIT   [unit_1283];
    HANDLING        READ;
    VALIDITY
        IF(SENSOR_PH_RPNA)    {TRUE;}
        ELSE             {FALSE;}
}

/***********************************************************************/
/*    Modbus Address : 1300                                            */
/***********************************************************************/

VARIABLE    trans1_o2_cal_pre_unit          //CAL_PRESSURE_UNIT
{
    LABEL           [MT_o2_cal_pre_unit];
    HELP            [MT_o2_cal_pre_unit_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (2)
    {
        DEFAULT_VALUE 1157;
		{ 1133,	[unit_1133],	[unit_1133_help]	},
		{ 1136,	[unit_1136],	[unit_1136_help]	},
		{ 1138,	[unit_1138],	[unit_1138_help]	},
		{ 1141,	[unit_1141],	[unit_1141_help]	},
		{ 1157,	[unit_1157],	[unit_1157_help]	}
    }
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_o2_cal_pre_value         //CAL_PRESSURE
{
    LABEL           [MT_o2_cal_pre_value];
    HELP            [MT_o2_cal_pre_value_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        MIN_VALUE   0.0;
        MAX_VALUE   99999.0;
        DEFAULT_VALUE 759.81248;
    }
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_o2_pro_pre_select        //PROC_PRESSURE_SOURCE
{
    LABEL           [MT_o2_pro_pre_select];
    HELP            [MT_o2_pro_pre_select_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
	{
        DEFAULT_VALUE 0;
        { 0, [MT_o2_pro_pre_select_0], [MT_o2_pro_pre_select_0_help] },
		{ 1, [MT_o2_pro_pre_select_1], [MT_o2_pro_pre_select_1_help] },
		{ 2, [MT_o2_pro_pre_select_2], [MT_o2_pro_pre_select_2_help] }
	}

    HANDLING        READ & WRITE;
}

VARIABLE    trans1_o2_pro_pre_mode          //ProcCal Pres Source
{
    LABEL           [MT_o2_pro_pre_mode];
    HELP            [MT_o2_pro_pre_mode_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
	{
        DEFAULT_VALUE 1;
		{ 0, [MT_o2_pro_pre_mode_00], [MT_o2_pro_pre_mode_00_help] },
		{ 1, [MT_o2_pro_pre_mode_01], [MT_o2_pro_pre_mode_01_help] }
	}

    HANDLING        READ & WRITE;
}

VARIABLE    trans1_o2_pro_pre_unit          //PROC_PRESSURE_UNIT
{
    LABEL           [MT_o2_pro_pre_unit];
    HELP            [MT_o2_pro_pre_unit_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (2)
    {
        DEFAULT_VALUE 1157;
		{ 1133,	[unit_1133],	[unit_1133_help]	},
		{ 1136,	[unit_1136],	[unit_1136_help]	},
		{ 1138,	[unit_1138],	[unit_1138_help]	},
		{ 1141,	[unit_1141],	[unit_1141_help]	},
		{ 1157,	[unit_1157],	[unit_1157_help]	}
    }
    HANDLING        READ & WRITE;
    VALIDITY
	IF(trans1_o2_pro_pre_select == 0) 	{TRUE;}
	ELSE 			                    {FALSE;}    
}

VARIABLE    trans1_o2_pro_pre_value
{
    LABEL           [MT_o2_pro_pre_value];
    HELP            [MT_o2_pro_pre_value_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        MIN_VALUE   0.0;
        MAX_VALUE   99999.0;
        DEFAULT_VALUE 759.81248;
    }
    HANDLING        READ & WRITE;
    VALIDITY
	IF(trans1_o2_pro_pre_select == 0) 	{TRUE;}
	ELSE 			                    {FALSE;}      
}

VARIABLE    trans1_ain_4ma_pre
{
    LABEL           [MT_ain_4ma_pre];
    HELP            [MT_ain_4ma_pre_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        MIN_VALUE   0.0;
        MAX_VALUE   99999.0;
        DEFAULT_VALUE 0.0;
    }
    HANDLING        READ & WRITE;
    VALIDITY
	IF(trans1_o2_pro_pre_select == 1) 	{TRUE;}
	ELSE 			                    {FALSE;}      
}

VARIABLE    trans1_ain_4ma_pre_unit
{
    LABEL           [MT_ain_4ma_pre_unit];
    HELP            [MT_ain_4ma_pre_unit_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (2)
    {
        DEFAULT_VALUE 1136;
		{ 1133,	[unit_1133],	[unit_1133_help]	},
		{ 1136,	[unit_1136],	[unit_1136_help]	},
		{ 1138,	[unit_1138],	[unit_1138_help]	},
		{ 1141,	[unit_1141],	[unit_1141_help]	},
		{ 1157,	[unit_1157],	[unit_1157_help]	}
    }
    HANDLING        READ & WRITE;
    VALIDITY
	IF(trans1_o2_pro_pre_select == 1) 	{TRUE;}
	ELSE 			                    {FALSE;}     
}

VARIABLE    trans1_ain_20ma_pre
{
    LABEL           [MT_ain_20ma_pre];
    HELP            [MT_ain_20ma_pre_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        MIN_VALUE   0.0;
        MAX_VALUE   99999.0;
        DEFAULT_VALUE 2000.0;
    }
    HANDLING        READ & WRITE;
    VALIDITY
	IF(trans1_o2_pro_pre_select == 1) 	{TRUE;}
	ELSE 			                    {FALSE;}     
}

VARIABLE    trans1_ain_20ma_pre_unit
{
    LABEL           [MT_ain_20ma_pre_unit];
    HELP            [MT_ain_20ma_pre_unit_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (2)
    {
        DEFAULT_VALUE 1136;
		{ 1133,	[unit_1133],	[unit_1133_help]	},
		{ 1136,	[unit_1136],	[unit_1136_help]	},
		{ 1138,	[unit_1138],	[unit_1138_help]	},
		{ 1141,	[unit_1141],	[unit_1141_help]	},
		{ 1157,	[unit_1157],	[unit_1157_help]	}
    }
    HANDLING        READ & WRITE;
    VALIDITY
	IF(trans1_o2_pro_pre_select == 1) 	{TRUE;}
	ELSE 			                    {FALSE;}     
}

VARIABLE    trans1_o2_sailinity
{
    LABEL           [MT_o2_sailinity];
    HELP            [MT_o2_sailinity_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        MIN_VALUE   0.0;
        MAX_VALUE   99999.0;
        DEFAULT_VALUE 0.0;
    }
    CONSTANT_UNIT   [MT_unit_g_kg];
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_o2_meas_humidity
{
    LABEL           [MT_o2_meas_humidity];
    HELP            [MT_o2_meas_humidity_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        MIN_VALUE       0.0;
        MAX_VALUE       100.0;
        DEFAULT_VALUE   100.0;
    }
    CONSTANT_UNIT   [unit_1342];
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_o2_meas_polar
{
    LABEL           [MT_o2_meas_polar];
    HELP            [MT_o2_meas_polar_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        MIN_VALUE       -1000.0;
        MAX_VALUE       1000.0;
        DEFAULT_VALUE   -674.0;
    }
    CONSTANT_UNIT   [unit_1243];
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_o2_cal_polar
{
    LABEL           [MT_o2_cal_polar];
    HELP            [MT_o2_cal_polar_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        MIN_VALUE       -1000.0;
        MAX_VALUE       1000.0;
        DEFAULT_VALUE   -674.0;
    }
    CONSTANT_UNIT   [unit_1243];
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_led_mode
{
    LABEL           [MT_led_mode];
    HELP            [MT_led_mode_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
	{
        DEFAULT_VALUE   1;
		{ 0, [MT_led_mode_0], [MT_led_mode_0_help] },
		{ 1, [MT_led_mode_1], [MT_led_mode_1_help] },
		{ 2, [MT_led_mode_2], [MT_led_mode_2_help] }
	}

    HANDLING        READ & WRITE;
}

VARIABLE    trans1_led_toff
{
    LABEL           [MT_led_toff];
    HELP            [MT_led_toff_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        MIN_VALUE       10.0;
        MAX_VALUE       60.0;
        DEFAULT_VALUE   40.0;
    }
    CONSTANT_UNIT   [unit_1001];
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_sample_rate
{
    LABEL           [MT_sample_rate];
    HELP            [MT_sample_rate_help];
    CLASS           CONTAINED;
    TYPE 	        UNSIGNED_INTEGER (1)
    {
        MIN_VALUE   1;
        MAX_VALUE   60;
        DEFAULT_VALUE   10;
    }
    CONSTANT_UNIT   [unit_1054];   // Second
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_proccal_mode
{
    LABEL           [MT_proccal_mode];
    HELP            [MT_proccal_mode_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
	{
        DEFAULT_VALUE   1;
		{ 1, [MT_proccal_mode_1], [MT_proccal_mode_1_help] },
		{ 0, [MT_proccal_mode_0], [MT_proccal_mode_0_help] }
	}

    HANDLING        READ & WRITE;
}

VARIABLE    trans1_o2_current
{
    LABEL           [MT_o2_current];
    HELP            [MT_o2_current_help];
    CLASS           CONTAINED & DYNAMIC;
    TYPE            FLOAT
    {
        DISPLAY_FORMAT ".3f";
    }

    CONSTANT_UNIT   [unit_1213];
    HANDLING        READ;
    VALIDITY
        IF(SENSOR_O2)    {TRUE;}
        ELSE             {FALSE;}
}

VARIABLE    trans1_o2_optical
{
    LABEL           [MT_o2_optical];
    HELP            [MT_o2_optical_help];
    CLASS           CONTAINED & DYNAMIC;
    TYPE            FLOAT
    {
        DISPLAY_FORMAT ".2f";
    }

    CONSTANT_UNIT   [unit_1005];
    HANDLING        READ;
    VALIDITY
        IF(SENSOR_O2_OPT)    {TRUE;}
        ELSE                 {FALSE;}
}

VARIABLE    trans1_ain_raw_value
{
    LABEL           [MT_ain_raw_value];
    HELP            [MT_ain_raw_value_help];
    CLASS           CONTAINED & DYNAMIC;
    TYPE            FLOAT
    {
        DISPLAY_FORMAT ".2f";
    }    
    CONSTANT_UNIT   [unit_1211];
    HANDLING        READ;
    VALIDITY
	IF((SENSOR_O2||SENSOR_O2_OPT)) 	{TRUE;}
	ELSE 					        {FALSE;}    
}

/***********************************************************************/
/*    Modbus Address : 1400                                            */
/***********************************************************************/

VARIABLE    trans1_pv_com_mode
{
    LABEL           [MT_pv_com_mode];
    HELP            [MT_pv_com_mode_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
	{
        DEFAULT_VALUE   0;
		{ 0, [MT_com_mode_0], [MT_com_mode_0_help] },
#ifdef _DTM_
        { 1, [MT_com_mode_1_DTM], [MT_com_mode_1_help] },
        { 2, [MT_com_mode_2_DTM], [MT_com_mode_2_help] },	
#else        
		{ 1, [MT_com_mode_1], [MT_com_mode_1_help] },
		{ 2, [MT_com_mode_2], [MT_com_mode_2_help] },
#endif		
		{ 3, [MT_com_mode_3], [MT_com_mode_3_help] },
		{ 4, [MT_com_mode_4], [MT_com_mode_4_help] },
		{ 5, [MT_com_mode_5], [MT_com_mode_5_help] },
		{ 6, [MT_com_mode_6], [MT_com_mode_6_help] },
		{ 7, [MT_com_mode_7], [MT_com_mode_7_help] },
		{ 8, [MT_com_mode_8], [MT_com_mode_8_help] },
		{ 9, [MT_com_mode_9], [MT_com_mode_9_help] },
		{ 10, [MT_com_mode_10], [MT_com_mode_10_help] }
	}

    HANDLING        READ & WRITE;
}

VARIABLE    trans1_sv_com_mode
{
    LABEL           [MT_sv_com_mode];
    HELP            [MT_sv_com_mode_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
	{
        DEFAULT_VALUE   0;
		{ 0, [MT_com_mode_0], [MT_com_mode_0_help] },
#ifdef _DTM_
        { 1, [MT_com_mode_1_DTM], [MT_com_mode_1_help] },
        { 2, [MT_com_mode_2_DTM], [MT_com_mode_2_help] },   
#else        
        { 1, [MT_com_mode_1], [MT_com_mode_1_help] },
        { 2, [MT_com_mode_2], [MT_com_mode_2_help] },
#endif
		{ 3, [MT_com_mode_3], [MT_com_mode_3_help] },
		{ 4, [MT_com_mode_4], [MT_com_mode_4_help] },
		{ 5, [MT_com_mode_5], [MT_com_mode_5_help] },
		{ 6, [MT_com_mode_6], [MT_com_mode_6_help] },
		{ 7, [MT_com_mode_7], [MT_com_mode_7_help] },
		{ 8, [MT_com_mode_8], [MT_com_mode_8_help] },
		{ 9, [MT_com_mode_9], [MT_com_mode_9_help] },
		{ 10, [MT_com_mode_10], [MT_com_mode_10_help] }
	}

    HANDLING        READ & WRITE;
}

VARIABLE    trans1_tv_com_mode
{
    LABEL           [MT_tv_com_mode];
    HELP            [MT_tv_com_mode_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
	{
        DEFAULT_VALUE   0;
		{ 0, [MT_com_mode_0], [MT_com_mode_0_help] },
#ifdef _DTM_
        { 1, [MT_com_mode_1_DTM], [MT_com_mode_1_help] },
        { 2, [MT_com_mode_2_DTM], [MT_com_mode_2_help] },   
#else        
        { 1, [MT_com_mode_1], [MT_com_mode_1_help] },
        { 2, [MT_com_mode_2], [MT_com_mode_2_help] },
#endif
		{ 3, [MT_com_mode_3], [MT_com_mode_3_help] },
		{ 4, [MT_com_mode_4], [MT_com_mode_4_help] },
		{ 5, [MT_com_mode_5], [MT_com_mode_5_help] },
		{ 6, [MT_com_mode_6], [MT_com_mode_6_help] },
		{ 7, [MT_com_mode_7], [MT_com_mode_7_help] },
		{ 8, [MT_com_mode_8], [MT_com_mode_8_help] },
		{ 9, [MT_com_mode_9], [MT_com_mode_9_help] },
		{ 10, [MT_com_mode_10], [MT_com_mode_10_help] }
	}

    HANDLING        READ & WRITE;
}

VARIABLE    trans1_qv_com_mode
{
    LABEL           [MT_qv_com_mode];
    HELP            [MT_qv_com_mode_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
	{
        DEFAULT_VALUE   0;
		{ 0, [MT_com_mode_0], [MT_com_mode_0_help] },
#ifdef _DTM_
        { 1, [MT_com_mode_1_DTM], [MT_com_mode_1_help] },
        { 2, [MT_com_mode_2_DTM], [MT_com_mode_2_help] },   
#else        
        { 1, [MT_com_mode_1], [MT_com_mode_1_help] },
        { 2, [MT_com_mode_2], [MT_com_mode_2_help] },
#endif
		{ 3, [MT_com_mode_3], [MT_com_mode_3_help] },
		{ 4, [MT_com_mode_4], [MT_com_mode_4_help] },
		{ 5, [MT_com_mode_5], [MT_com_mode_5_help] },
		{ 6, [MT_com_mode_6], [MT_com_mode_6_help] },
		{ 7, [MT_com_mode_7], [MT_com_mode_7_help] },
		{ 8, [MT_com_mode_8], [MT_com_mode_8_help] },
		{ 9, [MT_com_mode_9], [MT_com_mode_9_help] },
		{ 10, [MT_com_mode_10], [MT_com_mode_10_help] }
	}

    HANDLING        READ & WRITE;
}

VARIABLE    trans1_pv_linear_val
{
    LABEL           [MT_pv_linear_val];
    HELP            [MT_pv_linear_val_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        MIN_VALUE       0.0;
        MAX_VALUE       99.99;
        DEFAULT_VALUE   2.0;
    }
    CONSTANT_UNIT   [MT_unit_per_degc];
    HANDLING        READ & WRITE;
    VALIDITY
        IF((trans1_pv_com_mode==1)||(trans1_pv_com_mode==2))    {TRUE;}
        ELSE               {FALSE;}
}

VARIABLE    trans1_sv_linear_val
{
    LABEL           [MT_sv_linear_val];
    HELP            [MT_sv_linear_val_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        MIN_VALUE       0.0;
        MAX_VALUE       99.99;
        DEFAULT_VALUE   2.0;
    }
    CONSTANT_UNIT   [MT_unit_per_degc];
    HANDLING        READ & WRITE;
    VALIDITY
        IF((trans1_sv_com_mode==1)||(trans1_sv_com_mode==2))    {TRUE;}
        ELSE               {FALSE;}
}

VARIABLE    trans1_tv_linear_val
{
    LABEL           [MT_tv_linear_val];
    HELP            [MT_tv_linear_val_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        MIN_VALUE       0.0;
        MAX_VALUE       99.99;
        DEFAULT_VALUE   2.0;
    }
    CONSTANT_UNIT   [MT_unit_per_degc];
    HANDLING        READ & WRITE;
    VALIDITY
        IF((trans1_tv_com_mode==1)||(trans1_tv_com_mode==2))    {TRUE;}
        ELSE               {FALSE;}
}

VARIABLE    trans1_qv_linear_val
{
    LABEL           [MT_qv_linear_val];
    HELP            [MT_qv_linear_val_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        MIN_VALUE       0.0;
        MAX_VALUE       99.99;
        DEFAULT_VALUE   2.0;
    }
    CONSTANT_UNIT   [MT_unit_per_degc];
    HANDLING        READ & WRITE;
    VALIDITY
        IF((trans1_qv_com_mode==1)||(trans1_qv_com_mode==2))    {TRUE;}
        ELSE               {FALSE;}
}

VARIABLE    trans1_cal_com_mode
{
    LABEL           [MT_cal_com_mode];
    HELP            [MT_cal_com_mode_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
	{
        DEFAULT_VALUE   0;
		{ 0, [MT_com_mode_0], [MT_com_mode_0_help] },
#ifdef _DTM_
        { 1, [MT_com_mode_1_DTM], [MT_com_mode_1_help] },
        { 2, [MT_com_mode_2_DTM], [MT_com_mode_2_help] },   
#else        
        { 1, [MT_com_mode_1], [MT_com_mode_1_help] },
        { 2, [MT_com_mode_2], [MT_com_mode_2_help] },
#endif
		{ 3, [MT_com_mode_3], [MT_com_mode_3_help] },
		{ 4, [MT_com_mode_4], [MT_com_mode_4_help] },
		{ 5, [MT_com_mode_5], [MT_com_mode_5_help] },
		{ 6, [MT_com_mode_6], [MT_com_mode_6_help] },
		{ 7, [MT_com_mode_7], [MT_com_mode_7_help] },
		{ 8, [MT_com_mode_8], [MT_com_mode_8_help] },
		{ 9, [MT_com_mode_9], [MT_com_mode_9_help] },
		{ 10, [MT_com_mode_10], [MT_com_mode_10_help] }
	}

    HANDLING        READ & WRITE;
}

VARIABLE    trans1_cal_linear_val
{
    LABEL           [MT_cal_linear_val];
    HELP            [MT_cal_linear_val_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        MIN_VALUE       0.0;
        MAX_VALUE       99.99;
        DEFAULT_VALUE   2.0;
    }
    CONSTANT_UNIT   [MT_unit_per_degc];
    HANDLING        READ & WRITE;
    VALIDITY
        IF((trans1_cal_com_mode==1)||(trans1_cal_com_mode==2))    {TRUE;}
        ELSE               {FALSE;}    
}

VARIABLE    trans1_raw_resist
{
    LABEL           [MT_raw_resist];
    HELP            [MT_raw_resist_help];
    CLASS           CONTAINED & DYNAMIC;
    TYPE            FLOAT
    {
        DISPLAY_FORMAT ".2f";
    }
    CONSTANT_UNIT   [unit_1281];
    HANDLING        READ;
    VALIDITY
	IF(SENSOR_COND) 	{TRUE;}
	ELSE 				{FALSE;}    
}

/***********************************************************************/
/*    Modbus Address : 1500                                            */
/***********************************************************************/

VARIABLE    trans1_co2_solub_mode
{
    LABEL           [MT_co2_solub_mode];
    HELP            [MT_co2_solub_mode_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
	{
        DEFAULT_VALUE   0;
		{ 0, [MT_co2_solub_mode_0], [MT_co2_solub_mode_0_help] },
		{ 1, [MT_co2_solub_mode_1], [MT_co2_solub_mode_1_help] },
		{ 2, [MT_co2_solub_mode_2], [MT_co2_solub_mode_2_help] },
		{ 3, [MT_co2_solub_mode_3], [MT_co2_solub_mode_3_help] }
	}
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_co2_soulb_value
{
    LABEL           [MT_co2_soulb_value];
    HELP            [MT_co2_soulb_value_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        MIN_VALUE       0.0;
        MAX_VALUE       99999.0;
        DEFAULT_VALUE   1.467;
    }
    CONSTANT_UNIT   [unit_1105];
    HANDLING        READ & WRITE;
    VALIDITY
        IF(trans1_co2_solub_mode == 3)    {TRUE;}
        ELSE               {FALSE;}
}

VARIABLE    trans1_co2_temp_factor
{
    LABEL           [MT_co2_temp_factor];
    HELP            [MT_co2_temp_factor_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        MIN_VALUE       0.0;
        MAX_VALUE       99999.0;
        DEFAULT_VALUE   2400;
    }
    HANDLING        READ & WRITE;
    VALIDITY
        IF( trans1_co2_solub_mode == 3)    {TRUE;}
        ELSE               {FALSE;}
}

VARIABLE    trans1_co2_ramp_raw
{
    LABEL           [MT_co2_ramp_raw];
    HELP            [MT_co2_ramp_raw_help];
    CLASS           CONTAINED & DYNAMIC;
    TYPE            FLOAT
    {
        DISPLAY_FORMAT ".2f";
    }

    CONSTANT_UNIT   [MT_unit_mv_s];
    HANDLING        READ;
    VALIDITY
	IF(SENSOR_CO2_B) 	{TRUE;}
	ELSE 					{FALSE;}    
}

/***********************************************************************/
/*    Modbus Address : 2000                                            */
/***********************************************************************/

VARIABLE    trans1_sensor_name
{
    LABEL           [MT_sensor_name];
    HELP            [MT_sensor_name_help];
    CLASS           CONTAINED;
    TYPE            ASCII (14);
    HANDLING        READ;  
}

VARIABLE    trans1_sensor_pn
{
    LABEL           [MT_sensor_pn];
    HELP            [MT_sensor_pn_help];
    CLASS           CONTAINED;
    TYPE            ASCII (8);
    HANDLING        READ;  
}

VARIABLE    trans1_sensor_sn
{
    LABEL           [MT_sensor_sn];
    HELP            [MT_sensor_sn_help];
    CLASS           CONTAINED;
    TYPE            ASCII (14);
    HANDLING        READ;
}

VARIABLE    trans1_sensor_fw
{
    LABEL           [MT_sensor_fw];
    HELP            [MT_sensor_fw_help];
    CLASS           CONTAINED;
    TYPE            ASCII (6);
    HANDLING        READ;
}

VARIABLE    trans1_sensor_hw
{
    LABEL           [MT_sensor_hw];
    HELP            [MT_sensor_hw_help];
    CLASS           CONTAINED;
    TYPE            ASCII (6);
    HANDLING        READ;  
}

VARIABLE    trans1_functions_enable_flag
{
    LABEL           [MT_functions_enable_flag];
    HELP            [MT_functions_enable_flag_help];
    CLASS           CONTAINED & DYNAMIC;
    TYPE            BIT_ENUMERATED (4)
    {
        DEFAULT_VALUE   0x0000FFFF;
        { 0x00000001,	[MT_func_en_flag_bit00],	[MT_func_en_flag_bit00_help]  },
        { 0x00000002,	[MT_func_en_flag_bit01],	[MT_func_en_flag_bit01_help]  },
        { 0x00000004,	[MT_func_en_flag_bit02],	[MT_func_en_flag_bit02_help]  },
        { 0x00000008,	[MT_func_en_flag_bit03],	[MT_func_en_flag_bit03_help]  },
        { 0x00000010,	[MT_func_en_flag_bit04],	[MT_func_en_flag_bit04_help]  },
        { 0x00000020,	[MT_func_en_flag_bit05],	[MT_func_en_flag_bit05_help]  },
        { 0x00000040,	[MT_func_en_flag_bit06],	[MT_func_en_flag_bit06_help]  },
        { 0x00000080,	[MT_func_en_flag_bit07],	[MT_func_en_flag_bit07_help]  },
        { 0x00000100,	[MT_func_en_flag_bit08],	[MT_func_en_flag_bit08_help]  },
        { 0x00000200,	[MT_func_en_flag_bit09],	[MT_func_en_flag_bit09_help]  },
        { 0x00000400,	[MT_func_en_flag_bit10],	[MT_func_en_flag_bit10_help]  },
        { 0x00000800,	[MT_func_en_flag_bit11],	[MT_func_en_flag_bit11_help]  },
        { 0x00001000,	[MT_func_en_flag_bit12],	[MT_func_en_flag_bit12_help]  },
        { 0x00002000,	[MT_func_en_flag_bit13],	[MT_func_en_flag_bit13_help]  },
        { 0x00004000,	[MT_func_en_flag_bit14],	[MT_func_en_flag_bit14_help]  },
        { 0x00008000,	[MT_func_en_flag_bit15],	[MT_func_en_flag_bit15_help]  },
        { 0x00010000,	[MT_func_en_flag_bit16],	[MT_func_en_flag_bit16_help]  }
    }
    HANDLING        READ;
}

/***********************************************************************/
/*    Modbus Address : 2100                                            */
/***********************************************************************/

VARIABLE    trans1_operationg_days
{
    LABEL           [MT_operationg_days];
    HELP            [MT_operationg_days_help];
	CLASS           CONTAINED & DYNAMIC;
    TYPE            FLOAT
    {
        DISPLAY_FORMAT ".2f";
    }
    CONSTANT_UNIT   [unit_1060];
    HANDLING        READ;
    VALIDITY
        IF((trans1_functions_enable_flag & _OPERATION_DAY_ENABLE))    {TRUE;}
        ELSE                        {FALSE;}
}

VARIABLE    trans1_max_temperature
{
    LABEL           [MT_max_temperature];
    HELP            [MT_max_temperature_help];
	CLASS           CONTAINED & DYNAMIC;
    CONSTANT_UNIT   [unit_1001];
    TYPE            FLOAT
    {
        DISPLAY_FORMAT ".2f";
    }
    HANDLING        READ;
    VALIDITY
        IF((trans1_functions_enable_flag & _MAX_TEMP_ENABLE))    {TRUE;}
        ELSE                        {FALSE;}
}

VARIABLE    trans1_max_temperture_date
{
    LABEL           [MT_max_temperture_date];
    HELP            [MT_max_temperture_date_help];
	CLASS           CONTAINED & DYNAMIC;
    TYPE            DATE_AND_TIME;
    HANDLING        READ;
    VALIDITY
        IF((trans1_functions_enable_flag & _MAX_TEMP_DATE_ENABLE))    {TRUE;}
        ELSE                        {FALSE;}
}

VARIABLE    trans1_cur_ttm_in_days
{
    LABEL           [MT_cur_ttm_in_days];
    HELP            [MT_cur_ttm_in_days_help];
	CLASS           CONTAINED & DYNAMIC;
    TYPE            UNSIGNED_INTEGER (2);
    CONSTANT_UNIT   [unit_1060];
    HANDLING        READ;
    VALIDITY
        IF((trans1_functions_enable_flag & _TTM_ENABLE))    {TRUE;}
        ELSE                        {FALSE;}
}

VARIABLE    trans1_cur_ttm_in_per
{
    LABEL           [MT_cur_ttm_in_per];
    HELP            [MT_cur_ttm_in_per_help];
	CLASS           CONTAINED & DYNAMIC;
    TYPE            UNSIGNED_INTEGER (2);
    CONSTANT_UNIT   [unit_1342];
    HANDLING        READ;
    VALIDITY
        IF((trans1_functions_enable_flag & _TTM_ENABLE))   {TRUE;}
        ELSE                        {FALSE;}
}

VARIABLE    trans1_cur_act_in_days
{
    LABEL           [MT_cur_act_in_days];
    HELP            [MT_cur_act_in_days_help];
	CLASS           CONTAINED & DYNAMIC;
    TYPE            UNSIGNED_INTEGER (2);
    CONSTANT_UNIT   [unit_1060];
    HANDLING        READ;
    VALIDITY
        IF((trans1_functions_enable_flag & _ACT_ENABLE))   {TRUE;}
        ELSE                        {FALSE;}
}

VARIABLE    trans1_cur_act_in_per
{
    LABEL           [MT_cur_act_in_per];
    HELP            [MT_cur_act_in_per_help];
	CLASS           CONTAINED & DYNAMIC;
    TYPE            UNSIGNED_INTEGER (2);
    CONSTANT_UNIT   [unit_1342];
    HANDLING        READ;
    VALIDITY
        IF((trans1_functions_enable_flag & _ACT_ENABLE))   {TRUE;}
        ELSE                        {FALSE;}
}

VARIABLE    trans1_dli_in_days
{
    LABEL           [MT_dli_in_days];
    HELP            [MT_dli_in_days_help];
	CLASS           CONTAINED & DYNAMIC;
    TYPE            UNSIGNED_INTEGER (2);
    CONSTANT_UNIT   [unit_1060];
    HANDLING        READ;
    VALIDITY
        IF((trans1_functions_enable_flag & _DLI_ENABLE))   {TRUE;}
        ELSE                        {FALSE;}
}

VARIABLE    trans1_dli_in_per
{
    LABEL           [MT_dli_in_per];
    HELP            [MT_dli_in_per_help];
	CLASS           CONTAINED & DYNAMIC;
    TYPE            UNSIGNED_INTEGER (2);
    CONSTANT_UNIT   [unit_1342];
    HANDLING        READ;
    VALIDITY
        IF((trans1_functions_enable_flag & _DLI_ENABLE))   {TRUE;}
        ELSE                        {FALSE;}
}

VARIABLE    trans1_cip_cur_counter
{
    LABEL           [MT_cip_cur_counter];
    HELP            [MT_cip_cur_counter_help];
	CLASS           CONTAINED & DYNAMIC;
    TYPE            UNSIGNED_INTEGER (2);
    HANDLING        READ;
    VALIDITY
        IF((trans1_functions_enable_flag & _CIP_ENABLE))    {TRUE;}
        ELSE                        {FALSE;}
}

VARIABLE    trans1_sip_cur_counter
{
    LABEL           [MT_sip_cur_counter];
    HELP            [MT_sip_cur_counter_help];
	CLASS           CONTAINED & DYNAMIC;
    TYPE            UNSIGNED_INTEGER (2);
    HANDLING        READ;
    VALIDITY
        IF((trans1_functions_enable_flag & _SIP_ENABLE))    {TRUE;}
        ELSE                        {FALSE;}
}

VARIABLE    trans1_autoclave_counter
{
    LABEL           [MT_autoclave_counter];
    HELP            [MT_autoclave_counter_help];
	CLASS           CONTAINED & DYNAMIC;
    TYPE            UNSIGNED_INTEGER (2);
    HANDLING        READ;
    VALIDITY
        IF((trans1_functions_enable_flag & _AUTOCLAVE_ENABLE))    {TRUE;}
        ELSE                        {FALSE;}
}

VARIABLE    trans1_san_cycle
{
    LABEL           [MT_san_cycle];
    HELP            [MT_san_cycle_help];
	CLASS           CONTAINED & DYNAMIC;
    TYPE            FLOAT
    {
        DISPLAY_FORMAT ".0f";
    }

    HANDLING        READ;
    VALIDITY
        IF(trans1_functions_enable_flag & _SAN_CYCLE_ENABLE)    {TRUE;}
        ELSE                        {FALSE;}
}

/***********************************************************************/
/*    Modbus Address : 2200                                            */
/***********************************************************************/

VARIABLE    trans1_cip_temperature
{
    LABEL           [MT_cip_temp];
    HELP            [MT_cip_temp_help];
	CLASS           CONTAINED;
    TYPE            FLOAT
    {
        MIN_VALUE       30;
        MAX_VALUE       100.0;
        DEFAULT_VALUE   55.0;
    }
	CONSTANT_UNIT   [unit_1001];
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_odo_cal_unit
{
    LABEL           [MT_cal_unit];
    HELP            [MT_cal_unit_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (2)
    {
        DEFAULT_VALUE   20;
		_ODO_CAL_UNIT
    }
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_cip_limit
{
    LABEL           [MT_cip_limit];
    HELP            [MT_cip_limit_help];
	CLASS           CONTAINED;
    TYPE            UNSIGNED_INTEGER (2)
    {
        MIN_VALUE       0;
        MAX_VALUE       254;
        DEFAULT_VALUE   0;
    }
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_sip_temperature
{
    LABEL           [MT_sip_temp];
    HELP            [MT_sip_temp_help];
	CLASS           CONTAINED;
    TYPE            FLOAT
    {
        MIN_VALUE       90.0;
        MAX_VALUE       130.0;
        DEFAULT_VALUE   115.0;
    }
	CONSTANT_UNIT   [unit_1001];
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_co2_p_cal_unit
{
    LABEL           [MT_cal_unit];
    HELP            [MT_cal_unit_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (2)
    {
        DEFAULT_VALUE   50;
		_CO2_P_CAL_UNIT
    }
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_sip_limit
{
    LABEL           [MT_sip_limit];
    HELP            [MT_sip_limit_help];
	CLASS           CONTAINED;
    TYPE            UNSIGNED_INTEGER (2)
    {
        MIN_VALUE       0;
        MAX_VALUE       254;
        DEFAULT_VALUE   0;
    }
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_autoclave_limit
{
    LABEL           [MT_autoclave_limit];
    HELP            [MT_autoclave_limit_help];
	CLASS           CONTAINED;
    TYPE            UNSIGNED_INTEGER (2)
    {
        MIN_VALUE       0;
        MAX_VALUE       254;
        DEFAULT_VALUE   0;
    }
    HANDLING        READ & WRITE;
    VALIDITY
	IF(SENSOR_COND) 	{FALSE;}
	ELSE 				{TRUE;}    
}

VARIABLE    trans1_max_ttm_in_days
{
    LABEL           [MT_max_ttm_in_days];
    HELP            [MT_max_ttm_in_days_help];
	CLASS           CONTAINED;
    TYPE            UNSIGNED_INTEGER (2)
    {
        MIN_VALUE       0;
        MAX_VALUE       10200;
        DEFAULT_VALUE   0;
    }
    CONSTANT_UNIT   [unit_1060];
    HANDLING        READ & WRITE;
    VALIDITY
	IF(SENSOR_COND) 	{FALSE;}
	ELSE 				{TRUE;}    
}

VARIABLE    trans1_max_act_in_days
{
    LABEL           [MT_max_act_in_days];
    HELP            [MT_max_act_in_days_help];
	CLASS           CONTAINED;
    TYPE            UNSIGNED_INTEGER (2)
    {
        MIN_VALUE       0;
        MAX_VALUE       175;
        DEFAULT_VALUE   0;
    }
    CONSTANT_UNIT   [unit_1060];
    HANDLING        READ & WRITE;
    VALIDITY
	IF(SENSOR_COND) 	{FALSE;}
	ELSE 				{TRUE;}     
}

VARIABLE    trans1_ph_stress_adj
{
    LABEL           [MT_ph_stress_adj];
    HELP            [MT_ph_stress_adj_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
	{
        DEFAULT_VALUE   1;
		{ 0, [MT_ph_stress_adj_0], [MT_ph_stress_adj_0_help] },
		{ 1, [MT_ph_stress_adj_1], [MT_ph_stress_adj_1_help] },
		{ 2, [MT_ph_stress_adj_2], [MT_ph_stress_adj_2_help] }
	}
    HANDLING        READ & WRITE;
    VALIDITY
	IF((SENSOR_PH)) 	{TRUE;}
	ELSE 					        {FALSE;}      
}

VARIABLE    trans1_reset_cycle_ctr
{
    LABEL           [MT_reset_cycle_ctr];
    HELP            [MT_reset_cycle_ctr_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (2)
	{
        DEFAULT_VALUE   255;
		{ 0, [MT_reset_cycle_ctr_0], [MT_reset_cycle_ctr_0_help] },
		{ 1, [MT_reset_cycle_ctr_1], [MT_reset_cycle_ctr_1_help] },
		{ 2, [MT_reset_cycle_ctr_2], [MT_reset_cycle_ctr_2_help] },
		{ 3, [MT_reset_cycle_ctr_3], [MT_reset_cycle_ctr_3_help] },
		{ 4, [MT_reset_cycle_ctr_4], [MT_reset_cycle_ctr_4_help] },
		{ 5, [MT_reset_cycle_ctr_5], [MT_reset_cycle_ctr_5_help] },
		{ 6, [MT_reset_cycle_ctr_6], [MT_reset_cycle_ctr_6_help] },
        { 255, [MT_reset_cycle_ctr_255], [MT_reset_cycle_ctr_255_help] }
	}
    HANDLING        READ & WRITE;
}

//VARIABLE    trans1_sensor_change
//{
//    LABEL           [MT_sensor_change];
//    HELP            [MT_sensor_change_help];
//    CLASS           CONTAINED;
//    TYPE            ENUMERATED (1)
//	{
//		{ 0, [MT_sensor_change_0], [MT_sensor_change_0_help] },
//		{ 1, [MT_sensor_change_1], [MT_sensor_change_1_help] },
//		{ 2, [MT_sensor_change_2], [MT_sensor_change_2_help] }
//	}
//    HANDLING        READ & WRITE;
//}

VARIABLE    trans1_sensor_status_change
{
    LABEL           [MT_sensor_status_change];
    HELP            [MT_sensor_status_change_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
    {
        DEFAULT_VALUE   1;
        { 0, [MT_yes], [MT_yes_help] },
        { 1, [MT_no],  [MT_no_help]  }
    }

    HANDLING        READ & WRITE;
}

/***********************************************************************/
/*    Modbus Address : 2250                                            */
/***********************************************************************/
VARIABLE    trans1_san_max_cycles
{
    LABEL           [MT_san_max_cycles];
    HELP            [MT_san_max_cycles_help];
    CLASS           CONTAINED;
    TYPE            UNSIGNED_INTEGER (2)
    {
        MIN_VALUE       0;
        MAX_VALUE       254;
        DEFAULT_VALUE   0;
    }
    HANDLING        READ & WRITE;
    VALIDITY
        IF(SENSOR_O3 && SENSOR_CONNECTED)    {TRUE;}
        ELSE             {FALSE;}
}

VARIABLE    trans1_conc_max
{
    LABEL           [MT_conc_max];
    HELP            [MT_conc_max_help];
    CLASS           CONTAINED;
    TYPE            UNSIGNED_INTEGER (2)
    {
        MIN_VALUE       0;
        MAX_VALUE       1020;
        DEFAULT_VALUE   0;
    }
    CONSTANT_UNIT   [unit_1424];
    HANDLING        READ & WRITE;
    VALIDITY
        IF(SENSOR_O3 && SENSOR_CONNECTED)    {TRUE;}
        ELSE             {FALSE;}
}

VARIABLE    trans1_conc_min
{
    LABEL           [MT_conc_min];
    HELP            [MT_conc_min_help];
    CLASS           CONTAINED;
    TYPE            UNSIGNED_INTEGER (2)
    {
        MIN_VALUE       0;
        MAX_VALUE       1020;
        DEFAULT_VALUE   0;
    }
    CONSTANT_UNIT   [unit_1424];
    HANDLING        READ & WRITE;
    VALIDITY
        IF(SENSOR_O3 && SENSOR_CONNECTED)    {TRUE;}
        ELSE             {FALSE;}
}

VARIABLE    trans1_cycle_time
{
    LABEL           [MT_cycle_time];
    HELP            [MT_cycle_time_help];
    CLASS           CONTAINED;
    TYPE            UNSIGNED_INTEGER (2)
    {
        MIN_VALUE       0;
        MAX_VALUE       510;
        DEFAULT_VALUE   0;
    }
    CONSTANT_UNIT   [unit_1058];
    HANDLING        READ & WRITE;
    VALIDITY
        IF(SENSOR_O3 && SENSOR_CONNECTED)    {TRUE;}
        ELSE             {FALSE;}
}

VARIABLE    trans1_o3_current
{
    LABEL           [MT_o3_current];
    HELP            [MT_o3_current_help];
    CLASS           CONTAINED & DYNAMIC;
    TYPE            FLOAT
    {
        DISPLAY_FORMAT ".3f";
    }
    CONSTANT_UNIT   [unit_1213];
    HANDLING        READ;
    VALIDITY
	IF(SENSOR_O3) 	{TRUE;}
	ELSE 		    {FALSE;}    
}

/***********************************************************************/
/*    Modbus Address : 1600                                            */
/***********************************************************************/

VARIABLE    trans1_last_cal_date
{
    LABEL           [MT_last_cal_date];
    HELP            [MT_last_cal_date_help];
    CLASS           CONTAINED;
    TYPE            DATE_AND_TIME;
    HANDLING        READ;
    VALIDITY
        IF(SENSOR_DIGITAL_CONNECT_ONLY)      {TRUE;}
        ELSE                            {FALSE;}
}

VARIABLE    trans1_enable_flag
{
    LABEL           [MT_enable_flag];
    HELP            [MT_enable_flag_help];
    CLASS           CONTAINED;
    TYPE            BIT_ENUMERATED (2)
    {
        { 0x01, [MT_enable_flag_1], [MT_enable_flag_1_help] },
        { 0x02, [MT_enable_flag_2], [MT_enable_flag_2_help] }
    }
    HANDLING        READ;
}

VARIABLE    trans1_offset_unit1_code /*to be changed*/
{
    LABEL           [MT_offset_unit1_code];
    HELP            [MT_offset_unit1_code_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (2)
    {
        /*pH sensor:Offset(pH,mV), Slope(%,mV/pH)*/
        /*O2 sensor:slope and offset(nA)*/
        /*Cond sensor:/cm,Ohm-cm*/
        /*O2 Optical:degree*/
        /*Other:Not Used*/
        DEFAULT_VALUE 1422;
		{ 1422,	[unit_1422],	[unit_1422_help]	},
		{ 1243,	[unit_1243],	[unit_1243_help]	},
		{ 1342,	[unit_1342],	[unit_1342_help]	},
		{ 1585,	[MT_unit_mv_ph],[MT_unit_mv_ph]	    },
		{ 1213,	[unit_1213],	[unit_1213_help]	},
		{ 1607,	[MT_unit__cm],	[MT_unit__cm]	    },
		{ 1295,	[unit_1295],	[unit_1295_help]	},
		{ 1005,	[unit_1005],	[unit_1005_help]	},
		{40005, [MT_unit_40005],[MT_unit_40005_help]},
		{ 1424, [unit_1424],    [unit_1424_help]    },
		{40004, [MT_unit_40004],[MT_unit_40004_help]},
		{ 1996,	[not_used],     " "					}

    }
    HANDLING        READ;
}

VARIABLE    trans1_offset_unit2_code /*to be changed*/
{
    LABEL           [MT_offset_unit2_code];
    HELP            [MT_offset_unit2_code_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (2)
    {
        /*pH sensor:Offset(pH,mV), Slope(%,mV/pH)*/
        /*O2 sensor:slope and offset(nA)*/
        /*Cond sensor:/cm,Ohm-cm*/
        /*O2 Optical:degree*/
        /*Other:Not Used*/
        DEFAULT_VALUE 1243;
		{ 1422,	[unit_1422],	[unit_1422_help]	},
		{ 1243,	[unit_1243],	[unit_1243_help]	},
		{ 1342,	[unit_1342],	[unit_1342_help]	},
		{ 1585,	[MT_unit_mv_ph],[MT_unit_mv_ph]	    },
		{ 1213,	[unit_1213],	[unit_1213_help]	},
		{ 1607,	[MT_unit__cm],	[MT_unit__cm]	    },
		{ 1295,	[unit_1295],	[unit_1295_help]	},
		{ 1005,	[unit_1005],	[unit_1005_help]	},
		{40005, [MT_unit_40005],[MT_unit_40005_help]},
		{ 1424, [unit_1424],    [unit_1424_help]    },
		{40004, [MT_unit_40004],[MT_unit_40004_help]},
		{ 1996,	[not_used],     " "					}


    }
    HANDLING        READ;
}

VARIABLE    trans1_slope_unit1_code /*to be changed*/
{
    LABEL           [MT_slope_unit1_code];
    HELP            [MT_slope_unit1_code_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (2)
    {
        /*pH sensor:Offset(pH,mV), Slope(%,mV/pH)*/
        /*O2 sensor:slope and offset(nA)*/
        /*Cond sensor:cm-1,Ohm-cm*/
        /*O2 Optical:None*/
        /*Other:Not Used*/
        DEFAULT_VALUE 1342;
		{ 1422,	[unit_1422],	[unit_1422_help]	},
		{ 1243,	[unit_1243],	[unit_1243_help]	},
		{ 1342,	[unit_1342],	[unit_1342_help]	},
		{ 1585,	[MT_unit_mv_ph],[MT_unit_mv_ph]	    },
		{ 1213,	[unit_1213],	[unit_1213_help]	},
		{ 1607,	[MT_unit__cm],	[MT_unit__cm]	    },
		{ 1295,	[unit_1295],	[unit_1295_help]	},
		{ 1005,	[unit_1005],	[unit_1005_help]	},
		{40005, [MT_unit_40005],[MT_unit_40005_help]},
		{ 1424, [unit_1424],    [unit_1424_help]    },
		{40004, [MT_unit_40004],[MT_unit_40004_help]},
		{ 1996,	[not_used],     " "					}
    }
    HANDLING        READ;
}

VARIABLE    trans1_slope_unit2_code /*to be changed*/
{
    LABEL           [MT_slope_unit2_code];
    HELP            [MT_slope_unit2_code_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (2)
    {
        /*pH sensor:Offset(pH,mV), Slope(%,mV/pH)*/
        /*O2 sensor:slope and offset(nA)*/
        /*Cond sensor:cm-1,Ohm-cm*/
        /*O2 Optical:None*/
        /*Other:Not Used*/
        DEFAULT_VALUE 1585;
		{ 1422,	[unit_1422],	[unit_1422_help]	},
		{ 1243,	[unit_1243],	[unit_1243_help]	},
		{ 1342,	[unit_1342],	[unit_1342_help]	},
		{ 1585,	[MT_unit_mv_ph],[MT_unit_mv_ph]	    },
		{ 1213,	[unit_1213],	[unit_1213_help]	},
		{ 1607,	[MT_unit__cm],	[MT_unit__cm]	    },
		{ 1295,	[unit_1295],	[unit_1295_help]	},
		{ 1005,	[unit_1005],	[unit_1005_help]	},
		{40005, [MT_unit_40005],[MT_unit_40005_help]},
		{ 1424, [unit_1424],    [unit_1424_help]    },
		{40004, [MT_unit_40004],[MT_unit_40004_help]},
		{ 1996,	[not_used],     " "					}

    }
    HANDLING        READ;
}

VARIABLE    trans1_offset_with_unit1    //ACT_O1
{
    LABEL           [MT_offset_with_unit1];
    HELP            [MT_offset_with_unit1_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        DEFAULT_VALUE 7;
    }
    HANDLING        READ;
}

VARIABLE    trans1_offset_with_unit2    //ACT_O2
{
    LABEL           [MT_offset_with_unit2];
    HELP            [MT_offset_with_unit2_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        DEFAULT_VALUE 0;
    }
    HANDLING        READ;
    VALIDITY
        IF(OFFSET_UNIT2_ENABLE)     {TRUE;}
        ELSE                        {FALSE;}
}

VARIABLE    trans1_slope_with_unit1    //ACT_S1
{
    LABEL           [MT_slope_with_unit1];
    HELP            [MT_slope_with_unit1_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        DEFAULT_VALUE 100;
    }
    HANDLING        READ;
}

VARIABLE    trans1_slope_with_unit2    //ACT_S2
{
    LABEL           [MT_slope_with_unit2];
    HELP            [MT_slope_with_unit2_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        DEFAULT_VALUE 59.16;
    }
    HANDLING        READ;
    VALIDITY
        IF(SLOPE_UNIT2_ENABLE)      {TRUE;}
        ELSE                        {FALSE;}
}

VARIABLE    trans1_mv_offset
{
    LABEL           [MT_mv_offset];
    HELP            [MT_mv_offset_help];
    CLASS           CONTAINED;
    TYPE            FLOAT;
    HANDLING        READ;
    VALIDITY
        IF(trans1_enable_flag & 0x01)    {TRUE;}
        ELSE                             {FALSE;}
}

VARIABLE    trans1_pt_slope
{
    LABEL           [MT_pt_slope];
    HELP            [MT_pt_slope_help];
    CLASS           CONTAINED;
    TYPE            FLOAT;
    HANDLING        READ;
    VALIDITY
        IF(trans1_enable_flag & 0x02)   {TRUE;}
        ELSE                            {FALSE;}
}

VARIABLE    trans1_pt_offset
{
    LABEL           [MT_pt_offset];
    HELP            [MT_pt_offset_help];
    CLASS           CONTAINED;
    TYPE            FLOAT;
    HANDLING        READ;
    VALIDITY
        IF(trans1_enable_flag & 0x02)    {TRUE;}
        ELSE                        {FALSE;}
}

VARIABLE    trans1_ntc22k_offset
{
    LABEL           [MT_ntc22k_offset];
    HELP            [MT_ntc22k_offset_help];
    CLASS           CONTAINED;
    TYPE            FLOAT;
    HANDLING        READ;
    VALIDITY
        IF(trans1_enable_flag & 0x02)    {TRUE;}
        ELSE                        {FALSE;}
}

/***********************************************************************/
/*    Modbus Address : 1700                                            */
/***********************************************************************/

VARIABLE    trans1_fact_date
{
    LABEL           [MT_fact_date];
    HELP            [MT_fact_date_help];
    CLASS           CONTAINED;
    TYPE            DATE_AND_TIME;
    HANDLING        READ;
}

VARIABLE    trans1_fact_o1
{
    LABEL           [MT_fact_o1];
    HELP            [MT_fact_o1_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        DEFAULT_VALUE 7;
    }
    HANDLING        READ;
}

VARIABLE    trans1_fact_o2
{
    LABEL           [MT_fact_o2];
    HELP            [MT_fact_o2_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        DEFAULT_VALUE 0;
    }
    HANDLING        READ;
    VALIDITY
        IF(OFFSET_UNIT2_ENABLE)     {TRUE;}
        ELSE                        {FALSE;}
}

VARIABLE    trans1_fact_s1
{
    LABEL           [MT_fact_s1];
    HELP            [MT_fact_s1_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        DEFAULT_VALUE 100;
    }
    HANDLING        READ;
}

VARIABLE    trans1_fact_s2
{
    LABEL           [MT_fact_s2];
    HELP            [MT_fact_s2_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        DEFAULT_VALUE 59.16;
    }
    HANDLING        READ;
    VALIDITY
        IF(SLOPE_UNIT2_ENABLE)      {TRUE;}
        ELSE                        {FALSE;}
}

VARIABLE    trans1_history_block_enable
{
    LABEL           [MT_history_block_enable];
    HELP            [MT_history_block_enable_help];
    CLASS           CONTAINED;
    TYPE            BIT_ENUMERATED (2)
    {
        { 0x01, [MT_his_blk_en_bit0], [MT_his_blk_en_bit0_help] },
        { 0x02, [MT_his_blk_en_bit1], [MT_his_blk_en_bit1_help] },
        { 0x04, [MT_his_blk_en_bit2], [MT_his_blk_en_bit2_help] },
        { 0x08, [MT_his_blk_en_bit3], [MT_his_blk_en_bit3_help] }
    }
    HANDLING        READ;
}

VARIABLE    trans1_1st_date
{
    LABEL           [MT_1st_date];
    HELP            [MT_1st_date_help];
    CLASS           CONTAINED;
    TYPE            DATE_AND_TIME;
    HANDLING        READ;
    VALIDITY
        IF((trans1_history_block_enable & 0x01))    {TRUE;}
        ELSE                                        {FALSE;}
}
VARIABLE    trans1_1st_o1   //1Adj O1
{
    LABEL           [MT_1st_o1];
    HELP            [MT_1st_o1_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        DEFAULT_VALUE 7;
    }
    HANDLING        READ;
    VALIDITY
        IF((trans1_history_block_enable & 0x01))    {TRUE;}
        ELSE                                        {FALSE;}    
}

VARIABLE    trans1_1st_o2
{
    LABEL           [MT_1st_o2];
    HELP            [MT_1st_o2_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        DEFAULT_VALUE 0;
    }
    HANDLING        READ;
    VALIDITY
        IF((trans1_history_block_enable & 0x01)&&OFFSET_UNIT2_ENABLE)    {TRUE;}
        ELSE                                                             {FALSE;}
}

VARIABLE    trans1_1st_s1
{
    LABEL           [MT_1st_s1];
    HELP            [MT_1st_s1_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        DEFAULT_VALUE 100;
    }
    HANDLING        READ;
    VALIDITY
        IF((trans1_history_block_enable & 0x01))    {TRUE;}
        ELSE                                        {FALSE;}    
}

VARIABLE    trans1_1st_s2
{
    LABEL           [MT_1st_s2];
    HELP            [MT_1st_s2_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        DEFAULT_VALUE 59.16;
    }
    HANDLING        READ;
    VALIDITY
        IF((trans1_history_block_enable & 0x01)&&SLOPE_UNIT2_ENABLE)    {TRUE;}
        ELSE                                                            {FALSE;}
}

VARIABLE    trans1_cal1_date
{
    LABEL           [MT_cal1_date];
    HELP            [MT_cal1_date_help];
    CLASS           CONTAINED;
    TYPE            DATE_AND_TIME;
    HANDLING        READ;
    VALIDITY
        IF((trans1_history_block_enable & 0x02))    {TRUE;}
        ELSE                                        {FALSE;}
}
VARIABLE    trans1_cal1_o1      //CAL1_O1
{
    LABEL           [MT_cal1_o1];
    HELP            [MT_cal1_o1_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        DEFAULT_VALUE 7;
    }
    HANDLING        READ;
    VALIDITY
        IF((trans1_history_block_enable & 0x02))    {TRUE;}
        ELSE                                        {FALSE;}   
}

VARIABLE    trans1_cal1_o2
{
    LABEL           [MT_cal1_o2];
    HELP            [MT_cal1_o2_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        DEFAULT_VALUE 0;
    }
    HANDLING        READ;
    VALIDITY
        IF((trans1_history_block_enable & 0x02)&&OFFSET_UNIT2_ENABLE)    {TRUE;}
        ELSE                                                             {FALSE;}
}

VARIABLE    trans1_cal1_s1
{
    LABEL           [MT_cal1_s1];
    HELP            [MT_cal1_s1_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        DEFAULT_VALUE 100;
    }
    HANDLING        READ;
    VALIDITY
        IF((trans1_history_block_enable & 0x02))    {TRUE;}
        ELSE                                        {FALSE;}  

}

VARIABLE    trans1_cal1_s2
{
    LABEL           [MT_cal1_s2];
    HELP            [MT_cal1_s2_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        DEFAULT_VALUE 59.16;
    }
    HANDLING        READ;
    VALIDITY
        IF((trans1_history_block_enable & 0x02)&&SLOPE_UNIT2_ENABLE)    {TRUE;}
        ELSE                                                            {FALSE;}
}

VARIABLE    trans1_cal2_date
{
    LABEL           [MT_cal2_date];
    HELP            [MT_cal2_date_help];
    CLASS           CONTAINED;
    TYPE            DATE_AND_TIME;
    HANDLING        READ;
    VALIDITY
        IF((trans1_history_block_enable & 0x04))    {TRUE;}
        ELSE                                        {FALSE;}
}
VARIABLE    trans1_cal2_o1
{
    LABEL           [MT_cal2_o1];
    HELP            [MT_cal2_o1_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        DEFAULT_VALUE 7;
    }
    HANDLING        READ;
    VALIDITY
        IF((trans1_history_block_enable & 0x04))    {TRUE;}
        ELSE                                        {FALSE;}    
}

VARIABLE    trans1_cal2_o2
{
    LABEL           [MT_cal2_o2];
    HELP            [MT_cal2_o2_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        DEFAULT_VALUE 0;
    }
    HANDLING        READ;
    VALIDITY
        IF((trans1_history_block_enable & 0x04)&&OFFSET_UNIT2_ENABLE)       {TRUE;}
        ELSE                                                                {FALSE;}
}

VARIABLE    trans1_cal2_s1
{
    LABEL           [MT_cal2_s1];
    HELP            [MT_cal2_s1_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        DEFAULT_VALUE 100;
    }
    HANDLING        READ;
    VALIDITY
        IF((trans1_history_block_enable & 0x04))    {TRUE;}
        ELSE                                        {FALSE;}

}

VARIABLE    trans1_cal2_s2
{
    LABEL           [MT_cal2_s2];
    HELP            [MT_cal2_s2_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        DEFAULT_VALUE 59.16;
    }
    HANDLING        READ;
    VALIDITY
        IF((trans1_history_block_enable & 0x04)&&SLOPE_UNIT2_ENABLE)    {TRUE;}
        ELSE                                                            {FALSE;}
}

VARIABLE    trans1_cal3_date
{
    LABEL           [MT_cal3_date];
    HELP            [MT_cal3_date_help];
    CLASS           CONTAINED;
    TYPE            DATE_AND_TIME;
    HANDLING        READ;
    VALIDITY
        IF((trans1_history_block_enable & 0x08))    {TRUE;}
        ELSE                                        {FALSE;}
}
VARIABLE    trans1_cal3_o1
{
    LABEL           [MT_cal3_o1];
    HELP            [MT_cal3_o1_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        DEFAULT_VALUE 7;
    }
    HANDLING        READ;
    VALIDITY
		IF((trans1_history_block_enable & 0x08))    {TRUE;}
    	ELSE                                        {FALSE;}

}

VARIABLE    trans1_cal3_o2
{
    LABEL           [MT_cal3_o2];
    HELP            [MT_cal3_o2_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        DEFAULT_VALUE 0;
    }
    HANDLING        READ;
    VALIDITY
        IF((trans1_history_block_enable & 0x08)&&OFFSET_UNIT2_ENABLE)       {TRUE;}
        ELSE                                                                {FALSE;}
}

VARIABLE    trans1_cal3_s1
{
    LABEL           [MT_cal3_s1];
    HELP            [MT_cal3_s1_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        DEFAULT_VALUE 100;
    }
    HANDLING        READ;
	VALIDITY
		IF((trans1_history_block_enable & 0x08))    {TRUE;}
		ELSE                                        {FALSE;}

}

VARIABLE    trans1_cal3_s2
{
    LABEL           [MT_cal3_s2];
    HELP            [MT_cal3_s2_help];
    CLASS           CONTAINED;
    TYPE            FLOAT
    {
        DEFAULT_VALUE 59.16;
    }
    HANDLING        READ;
    VALIDITY
        IF((trans1_history_block_enable & 0x08)&&SLOPE_UNIT2_ENABLE)    {TRUE;}
        ELSE                                                            {FALSE;}
}

/***********************************************************************/
/*    Modbus Address : 1800                                            */
/***********************************************************************/

VARIABLE    trans1_transmitter_name
{
    LABEL           [MT_transmitter_name];
    HELP            [MT_transmitter_name_help];
    CLASS           CONTAINED;
    TYPE            ASCII (20)
    {
        DEFAULT_VALUE  DEF_TRANSMITTER_NAME;
    }
    HANDLING        READ;
}

VARIABLE    trans1_transmitter_pn
{
    LABEL           [MT_transmitter_pn];
    HELP            [MT_transmitter_pn_help];
    CLASS           CONTAINED;
    TYPE            ASCII (8)
    {
        DEFAULT_VALUE  DEF_TRANSMITTER_PN;
    }
    HANDLING        READ;
}

VARIABLE    trans1_transmitter_model
{
    LABEL           [MT_transmitter_model];
    HELP            [MT_transmitter_model_help];
    CLASS           CONTAINED;
    TYPE            ASCII (10)
    {
        DEFAULT_VALUE  DEVICE_NAME;
    }
    HANDLING        READ;
}

VARIABLE    trans1_transmitter_model_id
{
    LABEL           [MT_transmitter_model_id];
    HELP            [MT_transmitter_model_id_help];
    CLASS           CONTAINED;
//    TYPE            UNSIGNED_INTEGER (2);
    TYPE            ENUMERATED (2)
    {
        DEFAULT_VALUE 1;
		{ 1,	[MT_model_id_1],	[MT_model_id_1_help]	},
		{ 2,	[MT_model_id_2],	[MT_model_id_2_help]	}
    }
    HANDLING        READ;
}

VARIABLE    trans1_transmitter_sn
{
    LABEL           [MT_transmitter_sn];
    HELP            [MT_transmitter_sn_help];
    CLASS           CONTAINED;
    TYPE            ASCII (16)
    {
        DEFAULT_VALUE  "xxxxxxxxx";
    }
    HANDLING        READ;
}

VARIABLE    trans1_mainboard_fw
{
    LABEL           [MT_transmitter_fw];
    HELP            [MT_transmitter_fw_help];
    CLASS           CONTAINED;
    TYPE            ASCII (8)
    {
        DEFAULT_VALUE  "1.0.00";
    }
    HANDLING        READ;
}

VARIABLE    trans1_mainboard_hw
{
    LABEL           [MT_transmitter_hw];
    HELP            [MT_transmitter_hw_help];
    CLASS           CONTAINED;
    TYPE            UNSIGNED_INTEGER (2)
    {
        DEFAULT_VALUE  1;
    }
    HANDLING        READ;
}

VARIABLE    trans1_sensorboard_fw
{
    LABEL           [MT_sensorboard_fw];
    HELP            [MT_sensorboard_fw_help];
    CLASS           CONTAINED;
    TYPE            ASCII (8)
    {
        DEFAULT_VALUE  "1.0.00";
    }
    HANDLING        READ;
}

VARIABLE    trans1_sensorboard_hw
{
    LABEL           [MT_sensorboard_hw];
    HELP            [MT_sensorboard_hw_help];
    CLASS           CONTAINED;
    TYPE            UNSIGNED_INTEGER (2)
    {
        DEFAULT_VALUE  12;
    }
    HANDLING        READ;
}

VARIABLE    trans1_ffboard_fw
{
    LABEL           [MT_ffboard_fw];
    HELP            [MT_ffboard_fw_help];
    CLASS           CONTAINED;
    TYPE            UNSIGNED_INTEGER (1)
    {
        DEFAULT_VALUE  2;
    }
    HANDLING        READ;
}

VARIABLE    trans1_ffboard_hw
{
    LABEL           [MT_ffboard_hw];
    HELP            [MT_ffboard_hw_help];
    CLASS           CONTAINED;
    TYPE            UNSIGNED_INTEGER (1)
    {
        DEFAULT_VALUE  1;
    }
    HANDLING        READ;
}

//VARIABLE    trans1_protocol_version
//{
//    LABEL           [MT_protocol_version];
//    HELP            [MT_protocol_version_help];
//    CLASS           CONTAINED;
////    TYPE            UNSIGNED_INTEGER (1);
//    TYPE            ENUMERATED (1)
//    {
//        DEFAULT_VALUE 1;
//		{ 4,	[MT_protocol_version_4],	[MT_protocol_version_4_help]	},
//		{ 1,	[MT_protocol_version_1],	[MT_protocol_version_1_help]	}
//    }
//    HANDLING        READ;
//}

VARIABLE    trans1_soft_lock
{
    LABEL           [MT_soft_lock];
    HELP            [MT_soft_lock_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (1)
    {
        DEFAULT_VALUE 0;
		{ 0, [MT_soft_lock_0],	[MT_soft_lock_0_help]	},
		{ 1, [MT_soft_lock_0],	[MT_soft_lock_1_help]	}
    }
    HANDLING        READ;
}

/***********************************************************************/
/*                                                                     */
/***********************************************************************/
VARIABLE    trans1_cond_cal_unit
{
    LABEL           [MT_cal_unit];
    HELP            [MT_cal_unit_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (2)
    {
        DEFAULT_VALUE   30;
		_COND_CAL_UNIT
    }
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_res_cal_unit
{
    LABEL           [MT_cal_unit];
    HELP            [MT_cal_unit_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (2)
    {
        DEFAULT_VALUE   33;
		_RES_CAL_UNIT
    }
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_co2_b_1point_unit
{
    LABEL           [MT_cal_unit];
    HELP            [MT_cal_unit_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (2)
    {
        DEFAULT_VALUE   60;
		_CO2_B_1POINT_UNIT
    }
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_co2_b_procal_unit
{
    LABEL           [MT_cal_unit];
    HELP            [MT_cal_unit_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (2)
    {
        DEFAULT_VALUE   60;
		_CO2_B_PROCAL_UNIT
    }
    HANDLING        READ & WRITE;
}

VARIABLE    trans1_o3_cal_unit
{
    LABEL           [MT_cal_unit];
    HELP            [MT_cal_unit_help];
    CLASS           CONTAINED;
    TYPE            ENUMERATED (2)
    {
        DEFAULT_VALUE   64;
		_O3_CAL_UNIT
    }
    HANDLING        READ & WRITE;
}

/***********************************************************************/
/*    Local Variable                                                   */
/***********************************************************************/
VARIABLE    trans1_cal_slope1
{
    LABEL           [MT_cal_slope];
    HELP            [MT_cal_slope_help];
    CLASS           LOCAL;
    TYPE            FLOAT;
}

VARIABLE    trans1_cal_offset1
{
    LABEL           [MT_cal_offset];
    HELP            [MT_cal_offset_help];
    CLASS           LOCAL;
    TYPE            FLOAT;
}

/*---------------------------------------------------------------------*/
/*    TB-1 : Units                                                     */
/*---------------------------------------------------------------------*/

UNIT    unit_raw_temp_unit
{
    trans1_raw_temp_unit :
        trans1_raw_temp
}

UNIT    unit_ph_totpres_unit
{
    trans1_ph_totpres_unit :
        trans1_ph_totpres
}

UNIT    unit_trans1_o2_cal_pre_unit
{
    trans1_o2_cal_pre_unit :
        trans1_o2_cal_pre_value
}

UNIT    unit_trans1_o2_pro_pre_unit
{
    trans1_o2_pro_pre_unit :
        trans1_o2_pro_pre_value
}

UNIT    unit_trans1_ain_4ma_pre_unit
{
    trans1_ain_4ma_pre_unit :
        trans1_ain_4ma_pre
}
 
UNIT    unit_trans1_ain_20ma_pre_unit
{
    trans1_ain_20ma_pre_unit :
        trans1_ain_20ma_pre
}
 
   
UNIT    unit_offset_unit1_code
{
    trans1_offset_unit1_code :
        trans1_offset_with_unit1,
        trans1_fact_o1,
        trans1_1st_o1,
        trans1_cal1_o1,
        trans1_cal2_o1,
        trans1_cal3_o1
}

UNIT    unit_offset_unit2_code
{
    trans1_offset_unit2_code :
        trans1_offset_with_unit2,
        trans1_fact_o2,
        trans1_1st_o2,
        trans1_cal1_o2,
        trans1_cal2_o2,
        trans1_cal3_o2
}

UNIT    unit_slope_unit1_code
{
    trans1_slope_unit1_code :
        trans1_slope_with_unit1,
        trans1_fact_s1,
        trans1_1st_s1,
        trans1_cal1_s1,
        trans1_cal2_s1,
        trans1_cal3_s1
}

UNIT    unit_slope_unit2_code
{
    trans1_slope_unit2_code :
        trans1_slope_with_unit2,
        trans1_fact_s2,
        trans1_1st_s2,
        trans1_cal1_s2,
        trans1_cal2_s2,
        trans1_cal3_s2
}

/***********************************************************************/
/*    TB-1 : COMMAND                                                   */
/***********************************************************************/

COMMAND read_trans1_blk
{
    BLOCK transducer_block_1;
    INDEX 0;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_blk_reserve,
            trans1_blk_object,
            trans1_blk_parent_class,
            trans1_blk_class,
            trans1_blk_dd_reference,
            trans1_blk_dd_rev,
            trans1_blk_profile,
            trans1_blk_profile_rev,
            trans1_blk_execution_time,
            trans1_blk_num_parameters,
            trans1_blk_index_view_1,
            trans1_blk_num_view_lists
        }
    }
}

COMMAND read_trans1_st_rev
{
    BLOCK transducer_block_1;
    INDEX 1;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_st_rev
        }
    }
}


COMMAND read_trans1_tag_desc
{
    BLOCK transducer_block_1;
    INDEX 2;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_tag_desc
        }
    }
}

COMMAND write_trans1_tag_desc
{
    BLOCK transducer_block_1;
    INDEX 2;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_tag_desc
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_strategy
{
    BLOCK transducer_block_1;
    INDEX 3;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_strategy
        }
    }
}

COMMAND write_trans1_strategy
{
    BLOCK transducer_block_1;
    INDEX 3;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_strategy
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_alert_key
{
    BLOCK transducer_block_1;
    INDEX 4;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_alert_key
        }
    }
}

COMMAND write_trans1_alert_key
{
    BLOCK transducer_block_1;
    INDEX 4;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_alert_key
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_target_mode
{
    BLOCK transducer_block_1;
    INDEX 5;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_target_mode
        }
    }
}

COMMAND write_trans1_target_mode
{
    BLOCK transducer_block_1;
    INDEX 5;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_target_mode
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_mode
{
    BLOCK transducer_block_1;
    INDEX 6;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_actual_mode,
            trans1_permitted_mode,
            trans1_normal_mode
        }
    }
}

COMMAND read_trans1_alarm
{
    BLOCK transducer_block_1;
    INDEX 7;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_current_state_alarm_sum,
            trans1_unacknowledged_state_alarm_sum,
            trans1_unreported_state_alarm_sum,
            trans1_disabled_state_alarm_sum
        }
    }
}

/*---------------------------------------------------------------------*/
/*    TB-1 : Additional Parameter                                      */
/*---------------------------------------------------------------------*/

COMMAND read_trans1_primary_value
{
    BLOCK transducer_block_1;
    INDEX 8;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_primary_value,
            trans1_primary_value_status_quality <0xFC>,
            trans1_primary_value_status_limit   <0x03>
        }
    }
}

COMMAND read_trans1_secondary_value
{
    BLOCK transducer_block_1;
    INDEX 9;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_secondary_value,
            trans1_secondary_value_status_quality <0xFC>,
            trans1_secondary_value_status_limit   <0x03>
        }
    }
}

COMMAND read_trans1_third_value
{
    BLOCK transducer_block_1;
    INDEX 10;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_third_value,
            trans1_third_value_status_quality <0xFC>,
            trans1_third_value_status_limit   <0x03>
        }
    }
}

COMMAND read_trans1_fourth_value
{
    BLOCK transducer_block_1;
    INDEX 11;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_fourth_value,
            trans1_fourth_value_status_quality <0xFC>,
            trans1_fourth_value_status_limit   <0x03>
        }
    }
}

/***********************************************************************/
/*    Modbus Address : 500                                             */
/***********************************************************************/

//COMMAND read_trans1_sensor_channel
//{
//    BLOCK transducer_block_1;
//    INDEX 12;
//    OPERATION READ;
//    TRANSACTION
//    {
//        REQUEST
//        {
//        }
//        REPLY
//        {
//            trans1_sensor_channel
//        }
//    }
//}

COMMAND read_trans1_sensor_type
{
    BLOCK transducer_block_1;
    INDEX 13;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_sensor_type
        }
    }
}

COMMAND write_trans1_sensor_type
{
    BLOCK transducer_block_1;
    INDEX 13;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_sensor_type
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_auto_recognize
{
    BLOCK transducer_block_1;
    INDEX 14;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_auto_recognize
        }
    }
}

COMMAND write_trans1_auto_recognize
{
    BLOCK transducer_block_1;
    INDEX 14;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_auto_recognize
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_primary_value_aver
{
    BLOCK transducer_block_1;
    INDEX 15;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_primary_value_aver
        }
    }
}

COMMAND write_trans1_primary_value_aver
{
    BLOCK transducer_block_1;
    INDEX 15;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_primary_value_aver
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_secondary_value_aver
{
    BLOCK transducer_block_1;
    INDEX 16;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_secondary_value_aver
        }
    }
}

COMMAND write_trans1_secondary_value_aver
{
    BLOCK transducer_block_1;
    INDEX 16;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_secondary_value_aver
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_third_value_aver
{
    BLOCK transducer_block_1;
    INDEX 17;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_third_value_aver
        }
    }
}

COMMAND write_trans1_third_value_aver
{
    BLOCK transducer_block_1;
    INDEX 17;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_third_value_aver
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_fourth_value_aver
{
    BLOCK transducer_block_1;
    INDEX 18;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_fourth_value_aver
        }
    }
}

COMMAND write_trans1_fourth_value_aver
{
    BLOCK transducer_block_1;
    INDEX 18;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_fourth_value_aver
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_device_time
{
    BLOCK transducer_block_1;
    INDEX 19;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_device_time
        }
    }
}

COMMAND write_trans1_device_time
{
    BLOCK transducer_block_1;
    INDEX 19;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_device_time
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_alarm_flags
{
    BLOCK transducer_block_1;
    INDEX 20;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_alarm_flags
        }
    }
}

COMMAND write_trans1_alarm_flags
{
    BLOCK transducer_block_1;
    INDEX 20;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_alarm_flags
        }
        REPLY
        {
        }
    }
}

/***********************************************************************/
/*    Modbus Address : 1000                                            */
/***********************************************************************/

COMMAND read_trans1_temp_sensor_type
{
    BLOCK transducer_block_1;
    INDEX 23;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_temp_sensor_type
        }
    }
}

COMMAND write_trans1_temp_sensor_type
{
    BLOCK transducer_block_1;
    INDEX 23;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_temp_sensor_type
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_temp_fixed_value_degc
{
    BLOCK transducer_block_1;
    INDEX 24;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_temp_fixed_value_degc
        }
    }
}

COMMAND write_trans1_temp_fixed_value_degc
{
    BLOCK transducer_block_1;
    INDEX 24;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_temp_fixed_value_degc
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_temp_cal_fixed_value
{
    BLOCK transducer_block_1;
    INDEX 25;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_temp_cal_fixed_value
        }
    }
}

COMMAND write_trans1_temp_cal_fixed_value
{
    BLOCK transducer_block_1;
    INDEX 25;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_temp_cal_fixed_value
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_raw_temp
{
    BLOCK transducer_block_1;
    INDEX 26;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_raw_temp
        }
    }
}


COMMAND read_trans1_raw_temp_unit
{
    BLOCK transducer_block_1;
    INDEX 27;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_raw_temp_unit
        }
    }
}


/***********************************************************************/
/*    Modbus Address : 1100                                            */
/***********************************************************************/

COMMAND read_trans1_cal_drift
{
    BLOCK transducer_block_1;
    INDEX 28;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal_drift
        }
    }
}

COMMAND write_trans1_cal_drift
{
    BLOCK transducer_block_1;
    INDEX 28;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_cal_drift
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_cal_slope
{
    BLOCK transducer_block_1;
    INDEX 29;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal_slope
        }
    }
}

COMMAND read_trans1_cal_offset
{
    BLOCK transducer_block_1;
    INDEX 30;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal_offset
        }
    }
}

COMMAND read_trans1_cal_point
{
    BLOCK transducer_block_1;
    INDEX 31;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal_point
        }
    }
}

COMMAND write_trans1_cal_point
{
    BLOCK transducer_block_1;
    INDEX 31;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_cal_point
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_o2_cal_unit
{
    BLOCK transducer_block_1;
    INDEX 32;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_o2_cal_unit
        }
    }
}

COMMAND write_trans1_o2_cal_unit
{
    BLOCK transducer_block_1;
    INDEX 32;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_o2_cal_unit
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_cal_recode
{
    BLOCK transducer_block_1;
    INDEX 33;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal_recode
        }
    }
}

COMMAND write_trans1_cal_recode
{
    BLOCK transducer_block_1;
    INDEX 33;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_cal_recode
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_cal_recode_point
{
    BLOCK transducer_block_1;
    INDEX 34;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal_recode_point
        }
    }
}

COMMAND write_trans1_cal_recode_point
{
    BLOCK transducer_block_1;
    INDEX 34;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_cal_recode_point
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_cal_save_type
{
    BLOCK transducer_block_1;
    INDEX 35;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal_save_type
        }
    }
}

COMMAND write_trans1_cal_save_type
{
    BLOCK transducer_block_1;
    INDEX 35;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_cal_save_type
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_entry_cal_edit
{
    BLOCK transducer_block_1;
    INDEX 36;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_entry_cal_edit
        }
    }
}

COMMAND write_trans1_entry_cal_edit
{
    BLOCK transducer_block_1;
    INDEX 36;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_entry_cal_edit
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_entry_cal_point
{
    BLOCK transducer_block_1;
    INDEX 37;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_entry_cal_point
        }
    }
}

COMMAND write_trans1_entry_cal_point
{
    BLOCK transducer_block_1;
    INDEX 37;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_entry_cal_point
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_cal_mode
{
    BLOCK transducer_block_1;
    INDEX 38;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal_mode
        }
    }
}

COMMAND write_trans1_cal_mode
{
    BLOCK transducer_block_1;
    INDEX 38;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_cal_mode
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_cal_flags
{
    BLOCK transducer_block_1;
    INDEX 39;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal_flags
        }
    }
}

COMMAND read_trans1_cal_value1
{
    BLOCK transducer_block_1;
    INDEX 40;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal_value1
        }
    }
}

COMMAND read_trans1_cal_unitcode
{
    BLOCK transducer_block_1;
    INDEX 41;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal_unitcode
        }
    }
}

/***********************************************************************/
/*    Modbus Address : 1200                                            */
/***********************************************************************/

COMMAND read_trans1_ph_buffer_mode
{
    BLOCK transducer_block_1;
    INDEX 42;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_ph_buffer_mode
        }
    }
}

COMMAND write_trans1_ph_buffer_mode
{
    BLOCK transducer_block_1;
    INDEX 42;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_ph_buffer_mode
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_ph_stc_ref_mode
{
    BLOCK transducer_block_1;
    INDEX 43;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_ph_stc_ref_mode
        }
    }
}

COMMAND write_trans1_ph_stc_ref_mode
{
    BLOCK transducer_block_1;
    INDEX 43;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_ph_stc_ref_mode
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_ph_slope_display
{
    BLOCK transducer_block_1;
    INDEX 44;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_ph_slope_display
        }
    }
}

COMMAND write_trans1_ph_slope_display
{
    BLOCK transducer_block_1;
    INDEX 44;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_ph_slope_display
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_ph_offset_display
{
    BLOCK transducer_block_1;
    INDEX 45;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_ph_offset_display
        }
    }
}

COMMAND write_trans1_ph_offset_display
{
    BLOCK transducer_block_1;
    INDEX 45;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_ph_offset_display
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_ph_stc_ref_temp
{
    BLOCK transducer_block_1;
    INDEX 46;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_ph_stc_ref_temp
        }
    }
}

COMMAND write_trans1_ph_stc_ref_temp
{
    BLOCK transducer_block_1;
    INDEX 46;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_ph_stc_ref_temp
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_ph_stc_ref_value
{
    BLOCK transducer_block_1;
    INDEX 47;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_ph_stc_ref_value
        }
    }
}

COMMAND write_trans1_ph_stc_ref_value
{
    BLOCK transducer_block_1;
    INDEX 47;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_ph_stc_ref_value
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_ph_ip
{
    BLOCK transducer_block_1;
    INDEX 48;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_ph_ip
        }
    }
}

COMMAND write_trans1_ph_ip
{
    BLOCK transducer_block_1;
    INDEX 48;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_ph_ip
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_ph_salinity
{
    BLOCK transducer_block_1;
    INDEX 49;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_ph_salinity
        }
    }
}

COMMAND write_trans1_ph_salinity
{
    BLOCK transducer_block_1;
    INDEX 49;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_ph_salinity
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_ph_hco3
{
    BLOCK transducer_block_1;
    INDEX 50;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_ph_hco3
        }
    }
}

COMMAND write_trans1_ph_hco3
{
    BLOCK transducer_block_1;
    INDEX 50;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_ph_hco3
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_ph_totpres_unit
{
    BLOCK transducer_block_1;
    INDEX 51;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_ph_totpres_unit
        }
    }
}

COMMAND write_trans1_ph_totpres_unit
{
    BLOCK transducer_block_1;
    INDEX 51;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_ph_totpres_unit
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_ph_totpres
{
    BLOCK transducer_block_1;
    INDEX 52;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_ph_totpres
        }
    }
}

COMMAND write_trans1_ph_totpres
{
    BLOCK transducer_block_1;
    INDEX 52;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_ph_totpres
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_ph_mv
{
    BLOCK transducer_block_1;
    INDEX 53;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_ph_mv
        }
    }
}

COMMAND read_trans1_orp_mv
{
    BLOCK transducer_block_1;
    INDEX 54;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_orp_mv
        }
    }
}

COMMAND read_trans1_ph_raw_rr
{
    BLOCK transducer_block_1;
    INDEX 55;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_ph_raw_rr
        }
    }
}

COMMAND read_trans1_ph_raw_rg
{
    BLOCK transducer_block_1;
    INDEX 56;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_ph_raw_rg
        }
    }
}

COMMAND read_trans1_ph_raw_rpna
{
    BLOCK transducer_block_1;
    INDEX 57;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_ph_raw_rpna
        }
    }
}

/***********************************************************************/
/*    Modbus Address : 1300                                            */
/***********************************************************************/

COMMAND read_trans1_o2_cal_pre_unit
{
    BLOCK transducer_block_1;
    INDEX 58;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_o2_cal_pre_unit
        }
    }
}

COMMAND write_trans1_o2_cal_pre_unit
{
    BLOCK transducer_block_1;
    INDEX 58;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_o2_cal_pre_unit
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_o2_cal_pre_value
{
    BLOCK transducer_block_1;
    INDEX 59;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_o2_cal_pre_value
        }
    }
}

COMMAND write_trans1_o2_cal_pre_value
{
    BLOCK transducer_block_1;
    INDEX 59;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_o2_cal_pre_value
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_o2_pro_pre_select
{
    BLOCK transducer_block_1;
    INDEX 60;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_o2_pro_pre_select
        }
    }
}

COMMAND write_trans1_o2_pro_pre_select
{
    BLOCK transducer_block_1;
    INDEX 60;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_o2_pro_pre_select
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_o2_pro_pre_mode
{
    BLOCK transducer_block_1;
    INDEX 61;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_o2_pro_pre_mode
        }
    }
}

COMMAND write_trans1_o2_pro_pre_mode
{
    BLOCK transducer_block_1;
    INDEX 61;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_o2_pro_pre_mode
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_o2_pro_pre_unit
{
    BLOCK transducer_block_1;
    INDEX 62;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_o2_pro_pre_unit
        }
    }
}

COMMAND write_trans1_o2_pro_pre_unit
{
    BLOCK transducer_block_1;
    INDEX 62;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_o2_pro_pre_unit
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_o2_pro_pre_value
{
    BLOCK transducer_block_1;
    INDEX 63;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_o2_pro_pre_value
        }
    }
}

COMMAND write_trans1_o2_pro_pre_value
{
    BLOCK transducer_block_1;
    INDEX 63;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_o2_pro_pre_value
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_ain_4ma_pre
{
    BLOCK transducer_block_1;
    INDEX 64;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_ain_4ma_pre
        }
    }
}

COMMAND write_trans1_ain_4ma_pre
{
    BLOCK transducer_block_1;
    INDEX 64;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_ain_4ma_pre
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_ain_4ma_pre_unit
{
    BLOCK transducer_block_1;
    INDEX 65;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_ain_4ma_pre_unit
        }
    }
}

COMMAND write_trans1_ain_4ma_pre_unit
{
    BLOCK transducer_block_1;
    INDEX 65;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_ain_4ma_pre_unit
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_ain_20ma_pre
{
    BLOCK transducer_block_1;
    INDEX 66;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_ain_20ma_pre
        }
    }
}

COMMAND write_trans1_ain_20ma_pre
{
    BLOCK transducer_block_1;
    INDEX 66;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_ain_20ma_pre
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_ain_20ma_pre_unit
{
    BLOCK transducer_block_1;
    INDEX 67;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_ain_20ma_pre_unit
        }
    }
}

COMMAND write_trans1_ain_20ma_pre_unit
{
    BLOCK transducer_block_1;
    INDEX 67;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_ain_20ma_pre_unit
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_o2_sailinity
{
    BLOCK transducer_block_1;
    INDEX 68;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_o2_sailinity
        }
    }
}

COMMAND write_trans1_o2_sailinity
{
    BLOCK transducer_block_1;
    INDEX 68;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_o2_sailinity
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_o2_meas_humidity
{
    BLOCK transducer_block_1;
    INDEX 69;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_o2_meas_humidity
        }
    }
}

COMMAND write_trans1_o2_meas_humidity
{
    BLOCK transducer_block_1;
    INDEX 69;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_o2_meas_humidity
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_o2_meas_polar
{
    BLOCK transducer_block_1;
    INDEX 70;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_o2_meas_polar
        }
    }
}

COMMAND write_trans1_o2_meas_polar
{
    BLOCK transducer_block_1;
    INDEX 70;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_o2_meas_polar
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_o2_cal_polar
{
    BLOCK transducer_block_1;
    INDEX 71;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_o2_cal_polar
        }
    }
}

COMMAND write_trans1_o2_cal_polar
{
    BLOCK transducer_block_1;
    INDEX 71;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_o2_cal_polar
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_led_mode
{
    BLOCK transducer_block_1;
    INDEX 72;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_led_mode
        }
    }
}

COMMAND write_trans1_led_mode
{
    BLOCK transducer_block_1;
    INDEX 72;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_led_mode
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_led_toff
{
    BLOCK transducer_block_1;
    INDEX 73;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_led_toff
        }
    }
}

COMMAND write_trans1_led_toff
{
    BLOCK transducer_block_1;
    INDEX 73;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_led_toff
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_sample_rate
{
    BLOCK transducer_block_1;
    INDEX 74;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_sample_rate
        }
    }
}

COMMAND write_trans1_sample_rate
{
    BLOCK transducer_block_1;
    INDEX 74;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_sample_rate
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_proccal_mode
{
    BLOCK transducer_block_1;
    INDEX 75;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_proccal_mode
        }
    }
}

COMMAND write_trans1_proccal_mode
{
    BLOCK transducer_block_1;
    INDEX 75;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_proccal_mode
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_o2_current
{
    BLOCK transducer_block_1;
    INDEX 76;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_o2_current
        }
    }
}

COMMAND read_trans1_o2_optical
{
    BLOCK transducer_block_1;
    INDEX 77;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_o2_optical
        }
    }
}

COMMAND read_trans1_ain_raw_value
{
    BLOCK transducer_block_1;
    INDEX 78;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_ain_raw_value
        }
    }
}

/***********************************************************************/
/*    Modbus Address : 1400                                            */
/***********************************************************************/

COMMAND read_trans1_pv_com_mode
{
    BLOCK transducer_block_1;
    INDEX 79;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_pv_com_mode
        }
    }
}

COMMAND write_trans1_pv_com_mode
{
    BLOCK transducer_block_1;
    INDEX 79;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_pv_com_mode
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_sv_com_mode
{
    BLOCK transducer_block_1;
    INDEX 80;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_sv_com_mode
        }
    }
}

COMMAND write_trans1_sv_com_mode
{
    BLOCK transducer_block_1;
    INDEX 80;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_sv_com_mode
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_tv_com_mode
{
    BLOCK transducer_block_1;
    INDEX 81;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_tv_com_mode
        }
    }
}

COMMAND write_trans1_tv_com_mode
{
    BLOCK transducer_block_1;
    INDEX 81;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_tv_com_mode
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_qv_com_mode
{
    BLOCK transducer_block_1;
    INDEX 82;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_qv_com_mode
        }
    }
}

COMMAND write_trans1_qv_com_mode
{
    BLOCK transducer_block_1;
    INDEX 82;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_qv_com_mode
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_pv_linear_val
{
    BLOCK transducer_block_1;
    INDEX 83;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_pv_linear_val
        }
    }
}

COMMAND write_trans1_pv_linear_val
{
    BLOCK transducer_block_1;
    INDEX 83;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_pv_linear_val
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_sv_linear_val
{
    BLOCK transducer_block_1;
    INDEX 84;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_sv_linear_val
        }
    }
}

COMMAND write_trans1_sv_linear_val
{
    BLOCK transducer_block_1;
    INDEX 84;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_sv_linear_val
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_tv_linear_val
{
    BLOCK transducer_block_1;
    INDEX 85;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_tv_linear_val
        }
    }
}

COMMAND write_trans1_tv_linear_val
{
    BLOCK transducer_block_1;
    INDEX 85;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_tv_linear_val
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_qv_linear_val
{
    BLOCK transducer_block_1;
    INDEX 86;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_qv_linear_val
        }
    }
}

COMMAND write_trans1_qv_linear_val
{
    BLOCK transducer_block_1;
    INDEX 86;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_qv_linear_val
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_cal_com_mode
{
    BLOCK transducer_block_1;
    INDEX 87;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal_com_mode
        }
    }
}

COMMAND write_trans1_cal_com_mode
{
    BLOCK transducer_block_1;
    INDEX 87;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_cal_com_mode
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_cal_linear_val
{
    BLOCK transducer_block_1;
    INDEX 88;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal_linear_val
        }
    }
}

COMMAND write_trans1_cal_linear_val
{
    BLOCK transducer_block_1;
    INDEX 88;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_cal_linear_val
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_raw_resist
{
    BLOCK transducer_block_1;
    INDEX 89;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_raw_resist
        }
    }
}

/***********************************************************************/
/*    Modbus Address : 1500                                            */
/***********************************************************************/

COMMAND read_trans1_co2_solub_mode
{
    BLOCK transducer_block_1;
    INDEX 90;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_co2_solub_mode
        }
    }
}

COMMAND write_trans1_co2_solub_mode
{
    BLOCK transducer_block_1;
    INDEX 90;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_co2_solub_mode
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_co2_soulb_value
{
    BLOCK transducer_block_1;
    INDEX 91;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_co2_soulb_value
        }
    }
}

COMMAND write_trans1_co2_soulb_value
{
    BLOCK transducer_block_1;
    INDEX 91;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_co2_soulb_value
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_co2_temp_factor
{
    BLOCK transducer_block_1;
    INDEX 92;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_co2_temp_factor
        }
    }
}

COMMAND write_trans1_co2_temp_factor
{
    BLOCK transducer_block_1;
    INDEX 92;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_co2_temp_factor
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_co2_ramp_raw
{
    BLOCK transducer_block_1;
    INDEX 93;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_co2_ramp_raw
        }
    }
}

/***********************************************************************/
/*    Modbus Address : 2000                                            */
/***********************************************************************/

COMMAND read_trans1_sensor_name
{
    BLOCK transducer_block_1;
    INDEX 94;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_sensor_name
        }
    }
}

COMMAND read_trans1_sensor_pn
{
    BLOCK transducer_block_1;
    INDEX 95;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_sensor_pn
        }
    }
}

COMMAND read_trans1_sensor_sn
{
    BLOCK transducer_block_1;
    INDEX 96;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_sensor_sn
        }
    }
}

COMMAND read_trans1_sensor_fw
{
    BLOCK transducer_block_1;
    INDEX 97;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_sensor_fw
        }
    }
}

COMMAND read_trans1_sensor_hw
{
    BLOCK transducer_block_1;
    INDEX 98;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_sensor_hw
        }
    }
}

COMMAND read_trans1_functions_enable_flag
{
    BLOCK transducer_block_1;
    INDEX 99;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_functions_enable_flag
        }
    }
}

/***********************************************************************/
/*    Modbus Address : 2100                                            */
/***********************************************************************/

COMMAND read_trans1_operationg_days
{
    BLOCK transducer_block_1;
    INDEX 100;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_operationg_days
        }
    }
}

COMMAND read_trans1_max_temperature
{
    BLOCK transducer_block_1;
    INDEX 101;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_max_temperature
        }
    }
}

COMMAND read_trans1_max_temperture_date
{
    BLOCK transducer_block_1;
    INDEX 102;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_max_temperture_date
        }
    }
}

COMMAND read_trans1_cur_ttm_in_days
{
    BLOCK transducer_block_1;
    INDEX 103;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cur_ttm_in_days
        }
    }
}

COMMAND read_trans1_cur_ttm_in_per
{
    BLOCK transducer_block_1;
    INDEX 104;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cur_ttm_in_per
        }
    }
}

COMMAND read_trans1_cur_act_in_days
{
    BLOCK transducer_block_1;
    INDEX 105;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cur_act_in_days
        }
    }
}

COMMAND read_trans1_cur_act_in_per
{
    BLOCK transducer_block_1;
    INDEX 106;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cur_act_in_per
        }
    }
}

COMMAND read_trans1_dli_in_days
{
    BLOCK transducer_block_1;
    INDEX 107;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_dli_in_days
        }
    }
}

COMMAND read_trans1_dli_in_per
{
    BLOCK transducer_block_1;
    INDEX 108;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_dli_in_per
        }
    }
}

COMMAND read_trans1_cip_cur_counter
{
    BLOCK transducer_block_1;
    INDEX 109;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cip_cur_counter
        }
    }
}

COMMAND read_trans1_sip_cur_counter
{
    BLOCK transducer_block_1;
    INDEX 110;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_sip_cur_counter
        }
    }
}

COMMAND read_trans1_autoclave_counter
{
    BLOCK transducer_block_1;
    INDEX 111;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_autoclave_counter
        }
    }
}

COMMAND read_trans1_san_cycle
{
    BLOCK transducer_block_1;
    INDEX 183;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_san_cycle
        }
    }
}
/***********************************************************************/
/*    Modbus Address : 2200                                            */
/***********************************************************************/

COMMAND read_trans1_cip_temperature
{
    BLOCK transducer_block_1;
    INDEX 112;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cip_temperature
        }
    }
}

COMMAND write_trans1_cip_temperature
{
    BLOCK transducer_block_1;
    INDEX 112;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_cip_temperature
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_odo_cal_unit
{
    BLOCK transducer_block_1;
    INDEX 113;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_odo_cal_unit
        }
    }
}

COMMAND write_trans1_odo_cal_unit
{
    BLOCK transducer_block_1;
    INDEX 113;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_odo_cal_unit
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_cip_limit
{
    BLOCK transducer_block_1;
    INDEX 114;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cip_limit
        }
    }
}

COMMAND write_trans1_cip_limit
{
    BLOCK transducer_block_1;
    INDEX 114;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_cip_limit
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_sip_temperature
{
    BLOCK transducer_block_1;
    INDEX 115;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_sip_temperature
        }
    }
}

COMMAND write_trans1_sip_temperature
{
    BLOCK transducer_block_1;
    INDEX 115;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_sip_temperature
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_co2_p_cal_unit
{
    BLOCK transducer_block_1;
    INDEX 116;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_co2_p_cal_unit
        }
    }
}

COMMAND write_trans1_co2_p_cal_unit
{
    BLOCK transducer_block_1;
    INDEX 116;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_co2_p_cal_unit
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_sip_limit
{
    BLOCK transducer_block_1;
    INDEX 117;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_sip_limit
        }
    }
}

COMMAND write_trans1_sip_limit
{
    BLOCK transducer_block_1;
    INDEX 117;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_sip_limit
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_autoclave_limit
{
    BLOCK transducer_block_1;
    INDEX 118;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_autoclave_limit
        }
    }
}

COMMAND write_trans1_autoclave_limit
{
    BLOCK transducer_block_1;
    INDEX 118;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_autoclave_limit
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_max_ttm_in_days
{
    BLOCK transducer_block_1;
    INDEX 119;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_max_ttm_in_days
        }
    }
}

COMMAND write_trans1_max_ttm_in_days
{
    BLOCK transducer_block_1;
    INDEX 119;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_max_ttm_in_days
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_max_act_in_days
{
    BLOCK transducer_block_1;
    INDEX 120;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_max_act_in_days
        }
    }
}

COMMAND write_trans1_max_act_in_days
{
    BLOCK transducer_block_1;
    INDEX 120;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_max_act_in_days
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_ph_stress_adj
{
    BLOCK transducer_block_1;
    INDEX 121;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_ph_stress_adj
        }
    }
}

COMMAND write_trans1_ph_stress_adj
{
    BLOCK transducer_block_1;
    INDEX 121;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_ph_stress_adj
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_reset_cycle_ctr
{
    BLOCK transducer_block_1;
    INDEX 122;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_reset_cycle_ctr
        }
    }
}

COMMAND write_trans1_reset_cycle_ctr
{
    BLOCK transducer_block_1;
    INDEX 122;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_reset_cycle_ctr
        }
        REPLY
        {
        }
    }
}

//COMMAND read_trans1_sensor_change
//{
//    BLOCK transducer_block_1;
//    INDEX 123;
//    OPERATION READ;
//    TRANSACTION
//    {
//        REQUEST
//        {
//        }
//        REPLY
//        {
//            trans1_sensor_change
//        }
//    }
//}
//
//COMMAND write_trans1_sensor_change
//{
//    BLOCK transducer_block_1;
//    INDEX 123;
//    OPERATION WRITE;
//    TRANSACTION
//    {
//        REQUEST
//        {
//            trans1_sensor_change
//        }
//        REPLY
//        {
//        }
//    }
//}

COMMAND read_trans1_sensor_status_change
{
    BLOCK transducer_block_1;
    INDEX 124;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_sensor_status_change
        }
    }
}

COMMAND write_trans1_sensor_status_change
{
    BLOCK transducer_block_1;
    INDEX 124;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_sensor_status_change
        }
        REPLY
        {
        }
    }
}

/***********************************************************************/
/*    Modbus Address : 1600                                            */
/***********************************************************************/

COMMAND read_trans1_last_cal_date
{
    BLOCK transducer_block_1;
    INDEX 125;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_last_cal_date
        }
    }
}

COMMAND read_trans1_enable_flag
{
    BLOCK transducer_block_1;
    INDEX 126;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_enable_flag
        }
    }
}

COMMAND read_trans1_offset_unit1_code
{
    BLOCK transducer_block_1;
    INDEX 127;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_offset_unit1_code
        }
    }
}

COMMAND read_trans1_offset_unit2_code
{
    BLOCK transducer_block_1;
    INDEX 128;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_offset_unit2_code
        }
    }
}

COMMAND read_trans1_slope_unit1_code
{
    BLOCK transducer_block_1;
    INDEX 129;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_slope_unit1_code
        }
    }
}

COMMAND read_trans1_slope_unit2_code
{
    BLOCK transducer_block_1;
    INDEX 130;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_slope_unit2_code
        }
    }
}

COMMAND read_trans1_offset_with_unit1
{
    BLOCK transducer_block_1;
    INDEX 131;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_offset_with_unit1
        }
    }
}

COMMAND read_trans1_offset_with_unit2
{
    BLOCK transducer_block_1;
    INDEX 132;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_offset_with_unit2
        }
    }
}

COMMAND read_trans1_slope_with_unit1
{
    BLOCK transducer_block_1;
    INDEX 133;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_slope_with_unit1
        }
    }
}

COMMAND read_trans1_slope_with_unit2
{
    BLOCK transducer_block_1;
    INDEX 134;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_slope_with_unit2
        }
    }
}

COMMAND read_trans1_mv_offset
{
    BLOCK transducer_block_1;
    INDEX 135;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_mv_offset
        }
    }
}

COMMAND read_trans1_pt_slope
{
    BLOCK transducer_block_1;
    INDEX 136;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_pt_slope
        }
    }
}

COMMAND read_trans1_pt_offset
{
    BLOCK transducer_block_1;
    INDEX 137;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_pt_offset
        }
    }
}

COMMAND read_trans1_ntc22k_offset
{
    BLOCK transducer_block_1;
    INDEX 138;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_ntc22k_offset
        }
    }
}

/***********************************************************************/
/*    Modbus Address : 1700                                            */
/***********************************************************************/

COMMAND read_trans1_fact_date
{
    BLOCK transducer_block_1;
    INDEX 139;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_fact_date
        }
    }
}

COMMAND read_trans1_fact_o1
{
    BLOCK transducer_block_1;
    INDEX 140;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_fact_o1
        }
    }
}

COMMAND read_trans1_fact_o2
{
    BLOCK transducer_block_1;
    INDEX 141;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_fact_o2
        }
    }
}

COMMAND read_trans1_fact_s1
{
    BLOCK transducer_block_1;
    INDEX 142;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_fact_s1
        }
    }
}

COMMAND read_trans1_fact_s2
{
    BLOCK transducer_block_1;
    INDEX 143;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_fact_s2
        }
    }
}

COMMAND read_trans1_history_block_enable
{
    BLOCK transducer_block_1;
    INDEX 144;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_history_block_enable
        }
    }
}

COMMAND read_trans1_1st_date
{
    BLOCK transducer_block_1;
    INDEX 145;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_1st_date
        }
    }
}

COMMAND read_trans1_1st_o1
{
    BLOCK transducer_block_1;
    INDEX 146;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_1st_o1
        }
    }
}

COMMAND read_trans1_1st_o2
{
    BLOCK transducer_block_1;
    INDEX 147;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_1st_o2
        }
    }
}

COMMAND read_trans1_1st_s1
{
    BLOCK transducer_block_1;
    INDEX 148;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_1st_s1
        }
    }
}

COMMAND read_trans1_1st_s2
{
    BLOCK transducer_block_1;
    INDEX 149;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_1st_s2
        }
    }
}

COMMAND read_trans1_cal1_date
{
    BLOCK transducer_block_1;
    INDEX 150;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal1_date
        }
    }
}

COMMAND read_trans1_cal1_o1
{
    BLOCK transducer_block_1;
    INDEX 151;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal1_o1
        }
    }
}

COMMAND read_trans1_cal1_o2
{
    BLOCK transducer_block_1;
    INDEX 152;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal1_o2
        }
    }
}

COMMAND read_trans1_cal1_s1
{
    BLOCK transducer_block_1;
    INDEX 153;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal1_s1
        }
    }
}

COMMAND read_trans1_cal1_s2
{
    BLOCK transducer_block_1;
    INDEX 154;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal1_s2
        }
    }
}

COMMAND read_trans1_cal2_date
{
    BLOCK transducer_block_1;
    INDEX 155;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal2_date
        }
    }
}

COMMAND read_trans1_cal2_o1
{
    BLOCK transducer_block_1;
    INDEX 156;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal2_o1
        }
    }
}

COMMAND read_trans1_cal2_o2
{
    BLOCK transducer_block_1;
    INDEX 157;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal2_o2
        }
    }
}

COMMAND read_trans1_cal2_s1
{
    BLOCK transducer_block_1;
    INDEX 158;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal2_s1
        }
    }
}

COMMAND read_trans1_cal2_s2
{
    BLOCK transducer_block_1;
    INDEX 159;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal2_s2
        }
    }
}

COMMAND read_trans1_cal3_date
{
    BLOCK transducer_block_1;
    INDEX 160;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal3_date
        }
    }
}

COMMAND read_trans1_cal3_o1
{
    BLOCK transducer_block_1;
    INDEX 161;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal3_o1
        }
    }
}

COMMAND read_trans1_cal3_o2
{
    BLOCK transducer_block_1;
    INDEX 162;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal3_o2
        }
    }
}

COMMAND read_trans1_cal3_s1
{
    BLOCK transducer_block_1;
    INDEX 163;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal3_s1
        }
    }
}

COMMAND read_trans1_cal3_s2
{
    BLOCK transducer_block_1;
    INDEX 164;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cal3_s2
        }
    }
}

/***********************************************************************/
/*    Modbus Address : 1800                                            */
/***********************************************************************/

COMMAND read_trans1_transmitter_name
{
    BLOCK transducer_block_1;
    INDEX 165;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_transmitter_name
        }
    }
}

COMMAND read_trans1_transmitter_pn
{
    BLOCK transducer_block_1;
    INDEX 166;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_transmitter_pn
        }
    }
}

COMMAND read_trans1_transmitter_model
{
    BLOCK transducer_block_1;
    INDEX 167;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_transmitter_model
        }
    }
}

COMMAND read_trans1_transmitter_model_id
{
    BLOCK transducer_block_1;
    INDEX 168;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_transmitter_model_id
        }
    }
}

COMMAND read_trans1_transmitter_sn
{
    BLOCK transducer_block_1;
    INDEX 169;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_transmitter_sn
        }
    }
}

COMMAND read_trans1_mainboard_fw
{
    BLOCK transducer_block_1;
    INDEX 170;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_mainboard_fw
        }
    }
}

COMMAND read_trans1_mainboard_hw
{
    BLOCK transducer_block_1;
    INDEX 171;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_mainboard_hw
        }
    }
}

COMMAND read_trans1_sensorboard_fw
{
    BLOCK transducer_block_1;
    INDEX 172;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_sensorboard_fw
        }
    }
}

COMMAND read_trans1_sensorboard_hw
{
    BLOCK transducer_block_1;
    INDEX 173;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_sensorboard_hw
        }
    }
}

COMMAND read_trans1_ffboard_fw
{
    BLOCK transducer_block_1;
    INDEX 174;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_ffboard_fw
        }
    }
}

COMMAND read_trans1_ffboard_hw
{
    BLOCK transducer_block_1;
    INDEX 175;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_ffboard_hw
        }
    }
}

//COMMAND read_trans1_protocol_version
//{
//    BLOCK transducer_block_1;
//    INDEX 176;
//    OPERATION READ;
//    TRANSACTION
//    {
//        REQUEST
//        {
//        }
//        REPLY
//        {
//            trans1_protocol_version
//        }
//    }
//}

/***********************************************************************/
/*    Modbus Address : 2250                                            */
/***********************************************************************/

COMMAND read_trans1_san_max_cycles
{
    BLOCK transducer_block_1;
    INDEX 177;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_san_max_cycles
        }
    }
}

COMMAND write_trans1_san_max_cycles
{
    BLOCK transducer_block_1;
    INDEX 177;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_san_max_cycles
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_conc_max
{
    BLOCK transducer_block_1;
    INDEX 178;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_conc_max
        }
    }
}

COMMAND write_trans1_conc_max
{
    BLOCK transducer_block_1;
    INDEX 178;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_conc_max
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_conc_min
{
    BLOCK transducer_block_1;
    INDEX 179;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_conc_min
        }
    }
}

COMMAND write_trans1_conc_min
{
    BLOCK transducer_block_1;
    INDEX 179;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_conc_min
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_cycle_time
{
    BLOCK transducer_block_1;
    INDEX 180;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cycle_time
        }
    }
}

COMMAND write_trans1_cycle_time
{
    BLOCK transducer_block_1;
    INDEX 180;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_cycle_time
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_o3_current
{
    BLOCK transducer_block_1;
    INDEX 181;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_o3_current
        }
    }
}

/***********************************************************************/
/*    Modbus Address : 1839                                            */
/***********************************************************************/

COMMAND read_trans1_soft_lock
{
    BLOCK transducer_block_1;
    INDEX 182;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_soft_lock
        }
    }
}

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

COMMAND read_trans1_cond_cal_unit
{
    BLOCK transducer_block_1;
    INDEX 184;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_cond_cal_unit
        }
    }
}

COMMAND write_trans1_cond_cal_unit
{
    BLOCK transducer_block_1;
    INDEX 184;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_cond_cal_unit
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_res_cal_unit
{
    BLOCK transducer_block_1;
    INDEX 185;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_res_cal_unit
        }
    }
}

COMMAND write_trans1_res_cal_unit
{
    BLOCK transducer_block_1;
    INDEX 185;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_res_cal_unit
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_co2_b_1point_unit
{
    BLOCK transducer_block_1;
    INDEX 186;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_co2_b_1point_unit
        }
    }
}

COMMAND write_trans1_co2_b_1point_unit
{
    BLOCK transducer_block_1;
    INDEX 186;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_co2_b_1point_unit
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_co2_b_procal_unit
{
    BLOCK transducer_block_1;
    INDEX 187;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_co2_b_procal_unit
        }
    }
}

COMMAND write_trans1_co2_b_procal_unit
{
    BLOCK transducer_block_1;
    INDEX 187;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_co2_b_procal_unit
        }
        REPLY
        {
        }
    }
}

COMMAND read_trans1_o3_cal_unit
{
    BLOCK transducer_block_1;
    INDEX 188;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            trans1_o3_cal_unit
        }
    }
}

COMMAND write_trans1_o3_cal_unit
{
    BLOCK transducer_block_1;
    INDEX 188;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            trans1_o3_cal_unit
        }
        REPLY
        {
        }
    }
}

/***********************************************************************/
/*    Menu                                                             */
/***********************************************************************/

MENU Tab_s_trd
{
    LABEL        [blk_block_object_TRANSDUCER];
    ITEMS
    {
        Tab_s_measurement_setup,
        Tab_s_rtd_parameters,
        Tab_s_ph_pharma_parameters,
        Tab_s_o2_parameters,
        Tab_s_o2_opt_parameters,
        Tab_s_cond_parameters,
        Tab_s_co2_pharma_parameters,
        Tab_s_co2_beverage_parameters,
        Tab_s_o3_parameters,
        Tab_s_ism_information,
        Tab_s_ism_setup,        
        Tab_s_act_calibration_data,
        Tab_s_ism_calibration_history,
        Tab_s_device_info
    }
}

MENU Tab_s_measurement_setup
{
    LABEL        [MT_measurement_setup];
    ITEMS
    {
        trans1_sensor_type,
        trans1_auto_recognize,        
        //trans1_sensor_channel,
        trans1_primary_value_aver,
        trans1_secondary_value_aver,
        trans1_third_value_aver,
        trans1_fourth_value_aver,
        trans1_alarm_flags
    }
}

MENU Tab_s_rtd_parameters
{
    LABEL        [MT_rtd_parameters];
    VALIDITY
	IF(SENSOR_CHANNEL_ANALOG) 	{TRUE;}
	ELSE 		{FALSE;}
    ITEMS
    {
        trans1_temp_sensor_type,
        trans1_temp_fixed_value_degc,
        trans1_temp_cal_fixed_value
    }
}

MENU Tab_s_ph_pharma_parameters
{
    LABEL        [MT_ph_parameters];
    VALIDITY
	IF(SENSOR_PH) 	{TRUE;}
	ELSE 		{FALSE;}
    ITEMS
    {
        trans1_ph_buffer_mode,
        trans1_ph_slope_display,
        trans1_ph_offset_display,
        trans1_ph_stc_ref_mode,
        trans1_ph_stc_ref_temp,
        trans1_ph_stc_ref_value,
        trans1_ph_ip,
        trans1_cal_drift
    }
}

MENU Tab_s_co2_pharma_parameters
{
    LABEL        [MT_co2_pharma_parameters];
    VALIDITY
	IF(SENSOR_CO2) 	{TRUE;}
	ELSE 		{FALSE;}
    ITEMS
    {
        trans1_ph_buffer_mode,
        trans1_ph_slope_display,
        trans1_ph_offset_display,
        trans1_ph_salinity,
        trans1_ph_hco3,
        trans1_ph_totpres_unit,
        trans1_ph_totpres,
        trans1_cal_drift
    }
}

MENU Tab_s_o2_parameters
{
    LABEL        [MT_o2_parameters];
    VALIDITY
	IF(SENSOR_O2) 	{TRUE;}
	ELSE 			{FALSE;}
    ITEMS
    {
        trans1_o2_cal_pre_unit,
        trans1_o2_cal_pre_value,
        trans1_o2_pro_pre_select,
        trans1_o2_pro_pre_mode,
        trans1_o2_pro_pre_unit,
        trans1_o2_pro_pre_value,
        trans1_ain_4ma_pre,
        trans1_ain_4ma_pre_unit,
        trans1_ain_20ma_pre,
        trans1_ain_20ma_pre_unit,
        trans1_o2_sailinity,
        trans1_o2_meas_humidity,
        //trans1_cal_meas_humidity,
        trans1_o2_meas_polar,
        trans1_o2_cal_polar,
        trans1_cal_drift
    }
}

MENU Tab_s_o2_opt_parameters
{
    LABEL        [MT_o2_opt_parameters];
    VALIDITY
	IF(SENSOR_O2_OPT) 	{TRUE;}
	ELSE 			{FALSE;}
    ITEMS
    {
        trans1_o2_cal_pre_unit,
        trans1_o2_cal_pre_value,
        trans1_o2_pro_pre_select,
        trans1_o2_pro_pre_mode,
        trans1_o2_pro_pre_unit,
        trans1_o2_pro_pre_value,
        trans1_ain_4ma_pre,
        trans1_ain_4ma_pre_unit,
        trans1_ain_20ma_pre,
        trans1_ain_20ma_pre_unit,
        trans1_o2_sailinity,
        trans1_o2_meas_humidity,
        //trans1_cal_meas_humidity,
        trans1_led_mode,
        trans1_led_toff,
        trans1_sample_rate,
        trans1_proccal_mode,
        trans1_cal_drift
    }
}

MENU Tab_s_cond_parameters
{
    LABEL        [MT_cond_parameters];
    VALIDITY
	IF(SENSOR_COND) 	{TRUE;}
	ELSE 			{FALSE;}
    ITEMS
    {
        trans1_pv_com_mode,
        trans1_pv_linear_val,

        trans1_sv_com_mode,
        trans1_sv_linear_val,

        trans1_tv_com_mode,
        trans1_tv_linear_val,

        trans1_qv_com_mode,
        trans1_qv_linear_val,

        trans1_cal_com_mode,
        trans1_cal_linear_val
    }
}

MENU Tab_s_co2_beverage_parameters
{
    LABEL        [MT_co2_beverage_parameters];
    VALIDITY
	IF(SENSOR_CO2_B) 	{TRUE;}
	ELSE 					{FALSE;}
    ITEMS
    {
        trans1_co2_solub_mode,
        trans1_co2_soulb_value,
        trans1_co2_temp_factor,
        trans1_cal_drift
    }
}

MENU Tab_s_ism_information
{
    LABEL        [MT_ism_information];
    VALIDITY
	IF(SENSOR_DIGITAL_CONNECT_ONLY ) 	{TRUE;}
	ELSE 					{FALSE;}
    ITEMS
    {
        trans1_sensor_name,
        trans1_sensor_pn,
        trans1_sensor_sn,
        trans1_sensor_fw,
        trans1_sensor_hw,
        trans1_functions_enable_flag
    }
}

MENU Tab_s_ism_setup
{
    LABEL        [MT_ism_setup];
    VALIDITY
	IF(SENSOR_CHANNEL_DIGITAL ) 	{TRUE;}
	ELSE 				{FALSE;}
    ITEMS
    {
        trans1_cip_temperature,
        trans1_cip_limit,
        trans1_sip_temperature,
        trans1_sip_limit,
        trans1_autoclave_limit,
        trans1_max_ttm_in_days,
        trans1_max_act_in_days,
        trans1_ph_stress_adj
    }
}

MENU Tab_s_o3_parameters
{
    LABEL        [MT_o3_parameters];
    VALIDITY
	IF(SENSOR_DIGITAL_CONNECT_ONLY && SENSOR_O3) 	{TRUE;}
	ELSE 					{FALSE;}
    ITEMS
    {
        trans1_san_max_cycles,
        trans1_conc_max,
        trans1_conc_min,
        trans1_cycle_time
    }
}

MENU Tab_s_act_calibration_data
{
    LABEL        [MT_act_calibration_data];
    VALIDITY
	IF(SENSOR_ANALOG_DIGITAL_CONNECTED) 	{TRUE;}
	ELSE 					{FALSE;}
    ITEMS
    {
        trans1_last_cal_date,
        trans1_offset_with_unit1,
        trans1_offset_with_unit2,
        trans1_slope_with_unit1,
        trans1_slope_with_unit2,
        trans1_mv_offset,
        trans1_pt_slope,
        trans1_pt_offset,
        trans1_ntc22k_offset
    }
}

MENU Tab_s_ism_calibration_history
{
    LABEL        [MT_ism_calibration_history];
    VALIDITY
	IF(SENSOR_DIGITAL_CONNECT_ONLY) 	{TRUE;}
	ELSE 					{FALSE;}
    ITEMS
    {
        trans1_fact_date,
        trans1_fact_o1,
        trans1_fact_o2,
        trans1_fact_s1,
        trans1_fact_s2,

        trans1_last_cal_date,
        trans1_offset_with_unit1,
        trans1_offset_with_unit2,
        trans1_slope_with_unit1,
        trans1_slope_with_unit2,        

        trans1_1st_date,
        trans1_1st_o1,
        trans1_1st_o2,
        trans1_1st_s1,
        trans1_1st_s2,
        
        trans1_cal1_date,
        trans1_cal1_o1,
        trans1_cal1_o2,
        trans1_cal1_s1,
        trans1_cal1_s2,
        
        trans1_cal2_date,
        trans1_cal2_o1,
        trans1_cal2_o2,
        trans1_cal2_s1,
        trans1_cal2_s2,
        
        trans1_cal3_date,
        trans1_cal3_o1,
        trans1_cal3_o2,
        trans1_cal3_s1,
        trans1_cal3_s2
    }
}

MENU Tab_s_device_info
{
    LABEL        [MT_device_info];
    ITEMS
    {
        //trans1_transmitter_name,
        trans1_transmitter_pn,
        //trans1_transmitter_model,
        //trans1_transmitter_model_id,
        trans1_transmitter_sn,
        trans1_mainboard_fw,
        trans1_mainboard_hw,
        trans1_ffboard_fw,
        trans1_ffboard_hw,
        //trans1_protocol_version,
        trans1_cal_flags
    }
}

MENU Tab_m_trd
{
    LABEL        [blk_block_object_TRANSDUCER];
    ITEMS
    {
        Tab_m_measurement_setup,
        Tab_m_rtd_parameters,
	    Tab_m_ph_parameters,        	
        Tab_m_o2_parameters,
        Tab_m_o2_opt_parameters,
        Tab_m_cond_parameters,
        Tab_m_co2_pharma_parameters,
        Tab_m_co2_beverage_parameters,
        Tab_m_o3_parameters,
        Tab_m_ism_information,
        Tab_m_ism_setup,        
        Tab_m_act_calibration_data,
        Tab_m_ism_calibration_history,
        Tab_m_device_info
    }
}

MENU Tab_m_measurement_setup
{
    LABEL        [MT_measurement_setup];
    ITEMS
    {
        trans1_sensor_type           (READ_ONLY),
        trans1_auto_recognize        (READ_ONLY),        
        //trans1_sensor_channel        (READ_ONLY),
        trans1_primary_value_aver    (READ_ONLY),
        trans1_secondary_value_aver  (READ_ONLY),
        trans1_third_value_aver      (READ_ONLY),
        trans1_fourth_value_aver     (READ_ONLY),
        trans1_alarm_flags           (READ_ONLY)
    }
}

MENU Tab_m_rtd_parameters
{
    LABEL        [MT_rtd_parameters];
    VALIDITY
	IF(SENSOR_CHANNEL_ANALOG) 	{TRUE;}
	ELSE 				{FALSE;}
    ITEMS
    {
        trans1_temp_sensor_type       (READ_ONLY),
        trans1_temp_fixed_value_degc  (READ_ONLY),
        trans1_temp_cal_fixed_value   (READ_ONLY)
    }
}

MENU Tab_m_ph_parameters
{
    LABEL        [MT_ph_parameters];
    VALIDITY
	IF(SENSOR_PH) 	{TRUE;}
	ELSE 					{FALSE;}
    ITEMS
    {
        trans1_ph_buffer_mode     (READ_ONLY),        
        trans1_ph_slope_display   (READ_ONLY),
        trans1_ph_offset_display  (READ_ONLY),
        trans1_ph_stc_ref_mode    (READ_ONLY),
        trans1_ph_stc_ref_temp    (READ_ONLY),
        trans1_ph_stc_ref_value   (READ_ONLY),
        trans1_ph_ip              (READ_ONLY),
        trans1_cal_drift          (READ_ONLY)
    }
}

MENU Tab_m_co2_pharma_parameters
{
    LABEL        [MT_co2_pharma_parameters];
    VALIDITY
	IF(SENSOR_CO2) 	{TRUE;}
	ELSE 					{FALSE;}
    ITEMS
    {
        trans1_ph_buffer_mode     (READ_ONLY),
        trans1_ph_slope_display   (READ_ONLY),
        trans1_ph_offset_display  (READ_ONLY),
        trans1_ph_salinity        (READ_ONLY),
        trans1_ph_hco3            (READ_ONLY),
        trans1_ph_totpres_unit    (READ_ONLY),
        trans1_ph_totpres         (READ_ONLY),
        trans1_cal_drift          (READ_ONLY)
    }
}

MENU Tab_m_o2_parameters
{
    LABEL        [MT_o2_parameters];
    VALIDITY
	IF(SENSOR_O2) 	{TRUE;}
	ELSE 			{FALSE;}
    ITEMS
    {
        trans1_o2_cal_pre_unit    (READ_ONLY),
        trans1_o2_cal_pre_value   (READ_ONLY),
        trans1_o2_pro_pre_select  (READ_ONLY),
        trans1_o2_pro_pre_mode    (READ_ONLY),
        trans1_o2_pro_pre_unit    (READ_ONLY),
        trans1_o2_pro_pre_value   (READ_ONLY),
        trans1_ain_4ma_pre        (READ_ONLY),
        trans1_ain_4ma_pre_unit   (READ_ONLY),
        trans1_ain_20ma_pre       (READ_ONLY),
        trans1_ain_20ma_pre_unit  (READ_ONLY),
        trans1_o2_sailinity       (READ_ONLY),
        trans1_o2_meas_humidity   (READ_ONLY),
        //trans1_cal_meas_humidity  (READ_ONLY),
        trans1_o2_meas_polar      (READ_ONLY),
        trans1_o2_cal_polar       (READ_ONLY),
        trans1_cal_drift          (READ_ONLY)
    }
}

MENU Tab_m_o2_opt_parameters
{
    LABEL        [MT_o2_opt_parameters];
    VALIDITY
    IF( SENSOR_O2_OPT)  {TRUE;}
    ELSE                {FALSE;}
    ITEMS
    {
        trans1_o2_cal_pre_unit    (READ_ONLY),
        trans1_o2_cal_pre_value   (READ_ONLY),
        trans1_o2_pro_pre_select  (READ_ONLY),
        trans1_o2_pro_pre_mode    (READ_ONLY),
        trans1_o2_pro_pre_unit    (READ_ONLY),
        trans1_o2_pro_pre_value   (READ_ONLY),
        trans1_ain_4ma_pre        (READ_ONLY),
        trans1_ain_4ma_pre_unit   (READ_ONLY),
        trans1_ain_20ma_pre       (READ_ONLY),
        trans1_ain_20ma_pre_unit  (READ_ONLY),
        trans1_o2_sailinity       (READ_ONLY),
        trans1_o2_meas_humidity   (READ_ONLY),
        //trans1_cal_meas_humidity  (READ_ONLY),
        trans1_led_mode           (READ_ONLY),
        trans1_led_toff           (READ_ONLY),
        trans1_sample_rate        (READ_ONLY),
        trans1_proccal_mode       (READ_ONLY),
        trans1_cal_drift          (READ_ONLY)
    }
}



MENU Tab_m_cond_parameters
{
    LABEL        [MT_cond_parameters];
    VALIDITY
	IF(SENSOR_COND) 	{TRUE;}
	ELSE 					{FALSE;}
    ITEMS
    {
        trans1_pv_com_mode     (READ_ONLY),
        trans1_pv_linear_val   (READ_ONLY),
        
        trans1_sv_com_mode     (READ_ONLY),
        trans1_sv_linear_val   (READ_ONLY),
        
        trans1_tv_com_mode     (READ_ONLY),
        trans1_tv_linear_val   (READ_ONLY),

        trans1_qv_com_mode     (READ_ONLY),
        trans1_qv_linear_val   (READ_ONLY),

        trans1_cal_com_mode    (READ_ONLY),
        trans1_cal_linear_val  (READ_ONLY)
    }
}

MENU Tab_m_co2_beverage_parameters
{
    LABEL        [MT_co2_beverage_parameters];
    VALIDITY
	IF(SENSOR_CO2_B) 	{TRUE;}
	ELSE 					{FALSE;}
    ITEMS
    {
        trans1_co2_solub_mode   (READ_ONLY),
        trans1_co2_soulb_value  (READ_ONLY),
        trans1_co2_temp_factor  (READ_ONLY),
        trans1_cal_drift        (READ_ONLY)
    }
}

MENU Tab_m_ism_information
{
    LABEL        [MT_ism_information];
    VALIDITY
	IF(SENSOR_DIGITAL_CONNECT_ONLY) 	{TRUE;}
	ELSE 					{FALSE;}
    ITEMS
    {
        trans1_sensor_name            (READ_ONLY),
        trans1_sensor_pn              (READ_ONLY),
        trans1_sensor_sn              (READ_ONLY),
        trans1_sensor_fw              (READ_ONLY),
        trans1_sensor_hw              (READ_ONLY),
        trans1_functions_enable_flag  (READ_ONLY)
    }
}

MENU Tab_m_ism_setup
{
    LABEL        [MT_ism_setup];
    VALIDITY
	IF(SENSOR_CHANNEL_DIGITAL) 	{TRUE;}
	ELSE 				{FALSE;}
    ITEMS
    {
        trans1_cip_temperature       (READ_ONLY),
        trans1_cip_limit             (READ_ONLY),
        trans1_sip_temperature       (READ_ONLY),
        trans1_sip_limit             (READ_ONLY),
        trans1_autoclave_limit       (READ_ONLY),
        trans1_max_ttm_in_days       (READ_ONLY),
        trans1_max_act_in_days       (READ_ONLY),
        trans1_ph_stress_adj         (READ_ONLY)
    }
}

MENU Tab_m_o3_parameters
{
    LABEL        [MT_o3_parameters];
    VALIDITY
	IF(SENSOR_DIGITAL_CONNECT_ONLY && SENSOR_O3) 	{TRUE;}
	ELSE 					{FALSE;}
    ITEMS
    {
        trans1_san_max_cycles        (READ_ONLY),
        trans1_conc_max              (READ_ONLY),
        trans1_conc_min              (READ_ONLY),
        trans1_cycle_time            (READ_ONLY)
    }
}

MENU Tab_m_act_calibration_data
{
    LABEL        [MT_act_calibration_data];
    VALIDITY
	IF(SENSOR_ANALOG_DIGITAL_CONNECTED) 	{TRUE;}
	ELSE 					{FALSE;}
    ITEMS
    {
        trans1_last_cal_date      (READ_ONLY),
        trans1_offset_with_unit1  (READ_ONLY),
        trans1_offset_with_unit2  (READ_ONLY),
        trans1_slope_with_unit1   (READ_ONLY),
        trans1_slope_with_unit2   (READ_ONLY),
        trans1_mv_offset          (READ_ONLY),
        trans1_pt_slope           (READ_ONLY),
        trans1_pt_offset          (READ_ONLY),
        trans1_ntc22k_offset      (READ_ONLY)
    }
}

MENU Tab_m_ism_calibration_history
{
    LABEL        [MT_ism_calibration_history];
    VALIDITY
	IF(SENSOR_DIGITAL_CONNECT_ONLY) 	{TRUE;}
	ELSE 					{FALSE;}
    ITEMS
    {
        trans1_fact_date             (READ_ONLY),
        trans1_fact_o1               (READ_ONLY),
        trans1_fact_o2               (READ_ONLY),
        trans1_fact_s1               (READ_ONLY),
        trans1_fact_s2               (READ_ONLY),

        trans1_last_cal_date         (READ_ONLY),
        trans1_offset_with_unit1     (READ_ONLY),
        trans1_offset_with_unit2     (READ_ONLY),
        trans1_slope_with_unit1      (READ_ONLY),
        trans1_slope_with_unit2      (READ_ONLY),         

        trans1_1st_date              (READ_ONLY),
        trans1_1st_o1                (READ_ONLY),
        trans1_1st_o2                (READ_ONLY),
        trans1_1st_s1                (READ_ONLY),
        trans1_1st_s2                (READ_ONLY),
        
        trans1_cal1_date             (READ_ONLY),
        trans1_cal1_o1               (READ_ONLY),
        trans1_cal1_o2               (READ_ONLY),
        trans1_cal1_s1               (READ_ONLY),
        trans1_cal1_s2               (READ_ONLY),
        
        trans1_cal2_date             (READ_ONLY),
        trans1_cal2_o1               (READ_ONLY),
        trans1_cal2_o2               (READ_ONLY),
        trans1_cal2_s1               (READ_ONLY),
        trans1_cal2_s2               (READ_ONLY),
        
        trans1_cal3_date             (READ_ONLY),
        trans1_cal3_o1               (READ_ONLY),
        trans1_cal3_o2               (READ_ONLY),
        trans1_cal3_s1               (READ_ONLY),
        trans1_cal3_s2               (READ_ONLY)
    }
}

MENU Tab_m_device_info
{
    LABEL        [MT_device_info];
    ITEMS
    {
        //trans1_transmitter_name      (READ_ONLY),
        trans1_transmitter_pn        (READ_ONLY),
        //trans1_transmitter_model     (READ_ONLY),
        //trans1_transmitter_model_id  (READ_ONLY),
        trans1_transmitter_sn        (READ_ONLY),
        trans1_mainboard_fw          (READ_ONLY),
        trans1_mainboard_hw          (READ_ONLY),
        trans1_ffboard_fw            (READ_ONLY),
        trans1_ffboard_hw            (READ_ONLY),
        //trans1_protocol_version      (READ_ONLY),
	    trans1_cal_flags             (READ_ONLY)
    }
}


MENU Page_display_ph_dynamic
{
    LABEL        [MT_ph_parameters];
    VALIDITY
	IF(SENSOR_PH) 	{TRUE;}
	ELSE 					{FALSE;}
    ITEMS
    {
        trans1_ph_mv,
        trans1_orp_mv,
        trans1_ph_raw_rr,
        trans1_ph_raw_rg,
        trans1_ph_raw_rpna,
	    trans1_raw_temp
    }
}

MENU Page_display_co2_pharma_dynamic
{
    LABEL        [MT_co2_pharma_parameters];
    VALIDITY
	IF(SENSOR_CO2) 	{TRUE;}
	ELSE 					{FALSE;}
    ITEMS
    {
        trans1_ph_mv,
        trans1_ph_raw_rr,
        trans1_ph_raw_rg,
	    trans1_raw_temp
    }
}

MENU Page_display_o2_dynamic
{
    LABEL        [MT_o2_parameters];
    VALIDITY
	IF((SENSOR_O2||SENSOR_O2_OPT)) 	{TRUE;}
	ELSE 					        {FALSE;}
    ITEMS
    {
        trans1_o2_current,
        trans1_o2_optical,
        trans1_ain_raw_value,
	    trans1_raw_temp
    }
}

MENU Page_display_co2_beverage_dynamic
{
    LABEL        [MT_co2_beverage_parameters];
    VALIDITY
	IF(SENSOR_CO2_B) 	{TRUE;}
	ELSE 					{FALSE;}
    ITEMS
    {
        trans1_co2_ramp_raw,
	    trans1_raw_temp
    }
}

MENU Page_display_o3_dynamic
{
    LABEL        [MT_o3_parameters];
    VALIDITY
	IF(SENSOR_O3) 	{TRUE;}
	ELSE 					{FALSE;}
    ITEMS
    {
        trans1_o3_current,
	    trans1_raw_temp
    }
}

MENU Page_display_COND_dynamic
{
    LABEL        [MT_cond_parameters];
    VALIDITY
	IF(SENSOR_COND) 	{TRUE;}
	ELSE 				{FALSE;}
    ITEMS
    {
        trans1_raw_resist,
	    trans1_raw_temp
    }
}

MENU OnlineWindow_ISM_Diagnostic
{
    LABEL        [MT_ism_diagnostic];
    VALIDITY
	IF(SENSOR_DIGITAL_CONNECT_ONLY) 	{TRUE;}
	ELSE 					    {FALSE;}
    ITEMS
    {
        Page_display_ISM_Diagnostic
    }
}

MENU Page_display_ISM_Diagnostic
{
    LABEL        [MT_ism_diagnostic];
    VALIDITY
	IF(SENSOR_DIGITAL_CONNECT_ONLY) 	{TRUE;}
	ELSE 					    {FALSE;}    
    ITEMS
    {
        trans1_operationg_days,
        trans1_max_temperature,
        trans1_max_temperture_date,
        trans1_cur_ttm_in_days,
        trans1_cur_ttm_in_per,
        trans1_cur_act_in_days,
        trans1_cur_act_in_per,
        trans1_dli_in_days,
        trans1_dli_in_per,
        trans1_cip_cur_counter,
        trans1_sip_cur_counter,
        trans1_autoclave_counter,
        trans1_san_cycle
    }
}

MENU Page_diagnosis_trans1_block
{
    LABEL [blk_block_object_TRANSDUCER];
    ITEMS
    {
        trans1_blk_object,
        trans1_blk_parent_class,
        trans1_blk_class,
        trans1_blk_dd_reference,
        trans1_blk_dd_rev,
        trans1_blk_profile,
        trans1_blk_profile_rev,
        trans1_st_rev,
        trans1_actual_mode
    }
}
/***********************************************************************/
/*    Method                                                           */
/***********************************************************************/

METHOD log_abort
{
    LABEL       [MT_lab_log_abort];
    DEFINITION
    {
//        unsigned long ids[1];
//        unsigned long indices[1];
//        long calibrationMode;
        long status;
        ACKNOWLEDGE([MT_context_cal_abort]);
        _CAL_EXIT
    }
}

METHOD method_ISM_Change
{
    LABEL       [MT_lab_ism_change];
    VALIDITY
        IF(SENSOR_CHANNEL_DIGITAL)    {TRUE;}
        ELSE                        {FALSE;}
    DEFINITION
    {
        long status;

        ACKNOWLEDGE([MT_context_waiting_ism_sensor_change]);

        ReadCommand(read_trans1_cal_flags);
        /* Nothing to do*/
        if (!(trans1_cal_flags & 0x3800))
        {
            ACKNOWLEDGE([MT_context_no_sensor]);
        }

        /* Change Parameter*/
        if (trans1_cal_flags & _MODEL_TYPE_CHANGE)
        {
            GET_DEV_VAR_VALUE ([MT_context_change_parameter], trans1_sensor_status_change);

            ACKNOWLEDGE([MT_context_reload_cfg]);
        }

        /* Change Sensor Type*/
        if (trans1_cal_flags & _SENSOR_TYPE_CHANGE)
        {
            GET_DEV_VAR_VALUE ([MT_context_change_sensor_type], trans1_sensor_status_change);

            ACKNOWLEDGE([MT_context_close_app_and_open_again_to_reload_cfg]);
        }

        /*Increment Autoclave cycle counter*/
        if (trans1_cal_flags & _AUTOCLAVE_CHANGE)
        {
            GET_DEV_VAR_VALUE ([MT_context_increment_autoclave], trans1_sensor_status_change);
        }

        status = WriteCommand(write_trans1_sensor_status_change);
        _CAL_COMM_ERROR
    }
}

//MENU DIALOG_Process_Cal
//{
//    LABEL "";
//    STYLE DIALOG;
//    ITEMS
//    {           
////        trans1_temp_fixed_value_degc (DISPLAY_VALUE),
////        ROWBREAK, 
//        trans1_temp_sensor_type// (DISPLAY_VALUE)
//    }
//}

METHOD method_Ph_1p
{
    LABEL       [MT_lab_ph_1p];
    VALIDITY
        IF(SENSOR_PH)    {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];

        long status;
        long processCurrentCalibCal;
        unsigned char processing;
//        long select;
//        add_abort_method(log_abort);
//        MenuDisplay(DIALOG_Process_Cal,[no_yes],select);
//        ABORT_ON_COMM_ERROR();
//        ABORT_ON_NO_DEVICE();

        /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 1); /*pH 1 Point*/
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_ph_1p]);

        _CAL_STATUS_ERROR

        ReadCommand(read_trans1_temp_sensor_type);
        if (SENSOR_CHANNEL_ANALOG && (trans1_temp_sensor_type == 4))
        {
            /* Enter Fix Cal Temp*/
            var_id1[0] = VARID(trans1_temp_fixed_value_degc);
            get_dev_var_value ([MT_context_cal_temp], var_id1, trans1_temp_cal_fixed_value);
			status = WriteCommand(write_trans1_temp_cal_fixed_value);
            _CAL_COMM_ERROR
            _CAL_STATUS_ERROR
        }
        
		ReadCommand(read_trans1_ph_buffer_mode);
		ReadCommand(read_trans1_cal_drift);
        if (trans1_ph_buffer_mode == 8)
        {
            /* Enter Calibration value*/
            _CAL_POINT_1_ENT

            ACKNOWLEDGE([MT_context_press_button_when_sensor_is_in_buf1]);
            _CAL_STATUS_ERROR

            _ENTRY_CAL_POINT_0

            if (trans1_cal_drift!=1)
            {
                while (1)
                {
                    _CAL_POINT_1_DIS
                    _CALFLAG_STABLE
                }
            }
            else
            {
                _CAL_POINT_1_DYN
                _CAL_STATUS_ERROR
            }
            _CAL_RECODE_POINT_0
        }
        else
        {
            ACKNOWLEDGE([MT_context_press_button_when_sensor_is_in_buf1]);
            _CAL_STATUS_ERROR

            _ENTRY_CAL_POINT_0

            if (trans1_cal_drift != 1)
            {
                while (1)
                {
                    _CAL_BUFFER_1_DIS
                    _CALFLAG_STABLE
                }
            }
            else
            {
                _CAL_BUFFER_1_DYN
                _CAL_STATUS_ERROR
            }
            _CAL_RECODE_POINT_0
        }

        _CALC_FUNCTION
    }
}

METHOD method_Ph_2p
{
    LABEL       [MT_lab_ph_2p];
    VALIDITY
        IF(SENSOR_PH)    {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];

        long status;
        long processCurrentCalibCal;
        unsigned char processing;

//        add_abort_method(log_abort);

        /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 2); /*pH 2 Point*/
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_ph_2p]);

        _CAL_STATUS_ERROR

        ReadCommand(read_trans1_temp_sensor_type);
        if (SENSOR_CHANNEL_ANALOG && (trans1_temp_sensor_type == 4))
        {
            /* Enter Fix Cal Temp*/
            var_id1[0] = VARID(trans1_temp_fixed_value_degc);
            get_dev_var_value ([MT_context_cal_temp], var_id1, trans1_temp_cal_fixed_value);
			status = WriteCommand(write_trans1_temp_cal_fixed_value);
            _CAL_COMM_ERROR
            _CAL_STATUS_ERROR
        }
        
		ReadCommand(read_trans1_ph_buffer_mode);
		ReadCommand(read_trans1_cal_drift);
        if (trans1_ph_buffer_mode == 8)
        {
            /*Cal-Point 1*/
            _CAL_POINT_1_ENT

            ACKNOWLEDGE([MT_context_press_button_when_sensor_is_in_buf1]);
            _CAL_STATUS_ERROR

            _ENTRY_CAL_POINT_0

            if (trans1_cal_drift != 1)
            {
                while (1)
                {
                    _CAL_POINT_1_DIS
                    _CALFLAG_STABLE
                }
            }
            else
            {
                _CAL_POINT_1_DYN
                _CAL_STATUS_ERROR
            }
            _CAL_RECODE_POINT_0

            /*Cal-Point 2*/
            _CAL_POINT_2_ENT

            ACKNOWLEDGE([MT_context_press_button_when_sensor_is_in_buf2]);
            _CAL_STATUS_ERROR

            _ENTRY_CAL_POINT_1

            if (trans1_cal_drift != 1)
            {
                while (1)
                {
                    _CAL_POINT_2_DIS
                    _CALFLAG_STABLE
                }
            }
            else
            {
                _CAL_POINT_2_DYN
                _CAL_STATUS_ERROR
            }

            _CAL_RECODE_POINT_1
        }
        else
        {
            /*buffer 1*/
            ACKNOWLEDGE([MT_context_press_button_when_sensor_is_in_buf1]);
            _CAL_STATUS_ERROR

            _ENTRY_CAL_POINT_0

            if (trans1_cal_drift != 1)
            {
                while (1)
                {
                    _CAL_BUFFER_1_DIS
                    _CALFLAG_STABLE
                }
            }
            else
            {
                _CAL_BUFFER_1_DYN
                _CAL_STATUS_ERROR
            }

            _CAL_RECODE_POINT_0

            /*buffer 2*/
            ACKNOWLEDGE([MT_context_press_button_when_sensor_is_in_buf2]);
            _CAL_STATUS_ERROR

            _ENTRY_CAL_POINT_1

            if (trans1_cal_drift != 1)
            {
                while (1)
                {
                    _CAL_BUFFER_2_DIS
                    _CALFLAG_STABLE

                }
            }
            else
            {
                _CAL_BUFFER_2_DYN
                _CAL_STATUS_ERROR
            }

            _CAL_RECODE_POINT_1
        }

        _CALC_FUNCTION
    }
}

METHOD method_Ph_Process
{
    LABEL       [MT_lab_ph_process];
    VALIDITY
        IF(SENSOR_PH)    {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];
        
        long status;
        long processCurrentCalibCal;
        unsigned char processing;

//        add_abort_method(log_abort);

          /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 3); /*pH Process*/
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_ph_pro]);
        _CAL_STATUS_ERROR

        _ENTRY_CAL_POINT_0

        _PROCESS_CAL_DIS

        _CAL_RECODE_POINT_0

        ACKNOWLEDGE([MT_context_capture_value_stored_info]);
		_CAL_STATUS_ERROR

        /* Enter Calibration value*/
        _PROCESS_CAL_POINT

        _CAL_RECODE_POINT_1

        _CALC_FUNCTION
    }
}


METHOD method_CO2_1p
{
    LABEL       [MT_lab_co2_1p];
    VALIDITY
        IF(SENSOR_CO2)    {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];

        long status;
        long processCurrentCalibCal;
        unsigned char processing;

//        add_abort_method(log_abort);

        /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 19); /*CO2 1 Point*/
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_co2_1p]);

        _CAL_STATUS_ERROR
		ReadCommand(read_trans1_ph_buffer_mode);
		ReadCommand(read_trans1_cal_drift);

        if (trans1_ph_buffer_mode == 8)
        {
            /* Enter Calibration value*/
            _CAL_POINT_1_ENT

            ACKNOWLEDGE([MT_context_press_button_when_sensor_is_in_buf1]);
            _CAL_STATUS_ERROR

            _ENTRY_CAL_POINT_0

            if (trans1_cal_drift != 1)
            {
                while (1)
                {
                    _CAL_POINT_1_DIS
                    _CALFLAG_STABLE
                }
            }
            else
            {
                _CAL_POINT_1_DYN
                _CAL_STATUS_ERROR
            }
            _CAL_RECODE_POINT_0
        }
        else
        {
            ACKNOWLEDGE([MT_context_press_button_when_sensor_is_in_buf1]);
            _CAL_STATUS_ERROR

            _ENTRY_CAL_POINT_0

            if (trans1_cal_drift != 1)
            {
                while (1)
                {
                    _CAL_BUFFER_1_DIS
                    _CALFLAG_STABLE
                }
            }
            else
            {
                _CAL_BUFFER_1_DYN
                _CAL_STATUS_ERROR
            }
            _CAL_RECODE_POINT_0
        }

        _CALC_FUNCTION
    }
}

METHOD method_CO2_2p
{
    LABEL       [MT_lab_co2_2p];
    VALIDITY
        IF(SENSOR_CO2)    {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];

        long status;
        long processCurrentCalibCal;
        unsigned char processing;

//        add_abort_method(log_abort);

        /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 20); /*CO2 2 Point*/
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_co2_2p]);

        _CAL_STATUS_ERROR
		ReadCommand(read_trans1_ph_buffer_mode);
		ReadCommand(read_trans1_cal_drift);

        if (trans1_ph_buffer_mode == 8)
        {
            /*Cal-Point 1*/
            _CAL_POINT_1_ENT

            ACKNOWLEDGE([MT_context_press_button_when_sensor_is_in_buf1]);
            _CAL_STATUS_ERROR

            _ENTRY_CAL_POINT_0

            if (trans1_cal_drift != 1)
            {
                while (1)
                {
                    _CAL_POINT_1_DIS
                    _CALFLAG_STABLE
                }
            }
            else
            {
                _CAL_POINT_1_DYN
                _CAL_STATUS_ERROR
            }

            _CAL_RECODE_POINT_0

            /*Cal-Point 2*/
            _CAL_POINT_2_ENT

            ACKNOWLEDGE([MT_context_press_button_when_sensor_is_in_buf2]);
            _CAL_STATUS_ERROR

            _ENTRY_CAL_POINT_1

            if (trans1_cal_drift != 1)
            {
                while (1)
                {
                    _CAL_POINT_2_DIS
                    _CALFLAG_STABLE
                }
            }
            else
            {
                _CAL_POINT_2_DYN
                _CAL_STATUS_ERROR
            }
            _CAL_RECODE_POINT_1
        }
        else
        {
            /*buffer 1*/
            ACKNOWLEDGE([MT_context_press_button_when_sensor_is_in_buf1]);
            _CAL_STATUS_ERROR

            _ENTRY_CAL_POINT_0

            if (trans1_cal_drift != 1)
            {
                while (1)
                {
                    _CAL_BUFFER_1_DIS
                    _CALFLAG_STABLE
                }
            }
            else
            {
                _CAL_BUFFER_1_DYN
                _CAL_STATUS_ERROR
            }

            _CAL_RECODE_POINT_0

            /*buffer 2*/
            ACKNOWLEDGE([MT_context_press_button_when_sensor_is_in_buf2]);
            _CAL_STATUS_ERROR

            _ENTRY_CAL_POINT_1

            if (trans1_cal_drift != 1)
            {
                while (1)
                {
                    _CAL_BUFFER_2_DIS
                    _CALFLAG_STABLE
                }
            }
            else
            {
                _CAL_BUFFER_2_DYN
                _CAL_STATUS_ERROR
            }
            _CAL_RECODE_POINT_1
        }
        _CALC_FUNCTION
    }
}

METHOD method_CO2_Process
{
    LABEL       [MT_lab_co2_process];
    VALIDITY
        IF(SENSOR_CO2)    {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];

        long status;
        long processCurrentCalibCal;
        unsigned char processing;

//        add_abort_method(log_abort);

        /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 21); /*CO2 Process*/
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_co2_pro]);
        _CAL_STATUS_ERROR

        _WRITE_CO2_P_CAL_UNIT

        _ENTRY_CAL_POINT_0

        _PROCESS_CAL_DIS

        _CAL_RECODE_POINT_0

        ACKNOWLEDGE([MT_context_capture_value_stored_info]);
		_CAL_STATUS_ERROR


        /* Enter Calibration value*/
        _PROCESS_CAL_POINT

        _CAL_RECODE_POINT_1

        _CALC_FUNCTION
    }
}

METHOD method_Orp_1p
{
    LABEL       [MT_lab_orp_1p];
    VALIDITY
        IF(SENSOR_PH && SENSOR_CHANNEL_DIGITAL)    {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];

        long status;
        long processCurrentCalibCal;
        unsigned char processing;

//        add_abort_method(log_abort);

        /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 4); /*ORP 1 Point*/
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_orp_1p]);

        _CAL_STATUS_ERROR

        _CAL_POINT_1_ENT

        _ENTRY_CAL_POINT_0

        _CAL_POINT_1_DYN

        _CAL_RECODE_POINT_0

        _CALC_FUNCTION
    }
}

METHOD method_Orp_process
{
    LABEL       [MT_lab_orp2_process];
    VALIDITY
        IF(SENSOR_PH && SENSOR_CHANNEL_DIGITAL)    {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];


        long status;
        long processCurrentCalibCal;
        unsigned char processing;

//        add_abort_method(log_abort);

        /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 18); /*ORP Process*/
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_orp_pro]);

        _CAL_STATUS_ERROR

        _ENTRY_CAL_POINT_0

        _PROCESS_CAL_DIS

        _CAL_RECODE_POINT_0

        ACKNOWLEDGE([MT_context_capture_value_stored_info]);
		_CAL_STATUS_ERROR

        /* Enter Calibration value*/
        _PROCESS_CAL_POINT

        _CAL_RECODE_POINT_1

        _CALC_FUNCTION
    }
}

METHOD method_O2_Process_Slope
{
    LABEL       [MT_lab_process_slope];
    VALIDITY
        IF(SENSOR_O2)    {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];


        long status;
        long processCurrentCalibCal;
        unsigned char processing;

//        add_abort_method(log_abort);

        /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 5);
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_o2_pro_s]);
        _CAL_STATUS_ERROR

        
        _WRITE_O2_CAL_UNIT

        _ENTRY_CAL_POINT_0

        _PROCESS_CAL_DIS

        _CAL_RECODE_POINT_0

        ACKNOWLEDGE([MT_context_capture_value_stored_info]);
		_CAL_STATUS_ERROR

        /* Enter Calibration value*/
        _PROCESS_CAL_POINT

        _CAL_RECODE_POINT_1

        _CALC_FUNCTION
    }
}

METHOD method_O2_Process_Offset
{
    LABEL       [MT_lab_process_offset];
    VALIDITY
        IF(SENSOR_O2)    {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];

        long status;
        long processCurrentCalibCal;
        unsigned char processing;

//        add_abort_method(log_abort);

        /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 6); /*O2 Process Offset*/
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_o2_pro_o]);
        _CAL_STATUS_ERROR

        //iassign(trans1_o2_cal_unit, 20);				/*default %air unit*/
        _WRITE_O2_CAL_UNIT

        _ENTRY_CAL_POINT_0

        _PROCESS_CAL_DIS

        _CAL_RECODE_POINT_0

        ACKNOWLEDGE([MT_context_capture_value_stored_info]);
		_CAL_STATUS_ERROR

        /* Enter Calibration value*/
        _PROCESS_CAL_POINT

        _CAL_RECODE_POINT_1

        _CALC_FUNCTION
    }
}

METHOD method_O2_1p_Slope
{
    LABEL       [MT_lab_o2_1p_slope];
    VALIDITY
        IF(SENSOR_O2)    {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];

        long status;
        long processCurrentCalibCal;
        unsigned char processing;
        float delta;

//        add_abort_method(log_abort);

        /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 7); /*O2 1 Point Slope*/
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_o2_1p_s]);
        _CAL_STATUS_ERROR

        //iassign(trans1_o2_cal_unit, 20);				/*default %air unit*/
        _WRITE_O2_CAL_UNIT

        if ((trans1_o2_cal_unit == 20)||(trans1_o2_cal_unit == 21)||
        (trans1_o2_cal_unit == 26)||(trans1_o2_cal_unit == 27)||(trans1_o2_cal_unit == 28))
        {
           /*Cal Pressure Unit*/
            GET_DEV_VAR_VALUE([MT_context_cal_pressure_unit], trans1_o2_cal_pre_unit);
            status = WriteCommand(write_trans1_o2_cal_pre_unit);
            _CAL_COMM_ERROR
            _CAL_STATUS_ERROR

           /*Cal Pressure Value*/
            GET_DEV_VAR_VALUE([MT_context_cal_pressure_value], trans1_o2_cal_pre_value);
            status = WriteCommand(write_trans1_o2_cal_pre_value);
            _CAL_COMM_ERROR
            _CAL_STATUS_ERROR

           /*Relative Humdity*/
            GET_DEV_VAR_VALUE([MT_context_relative_humdity], trans1_o2_meas_humidity);
            status = WriteCommand(write_trans1_o2_meas_humidity);
            _CAL_COMM_ERROR
            _CAL_STATUS_ERROR
        }

        ReadCommand(read_trans1_o2_meas_polar);
        ReadCommand(read_trans1_o2_cal_polar);        
        delta = trans1_o2_meas_polar - trans1_o2_cal_polar;
        if ((delta < -0.1)||(delta > 0.1))
        {
            DELAY(120, [MT_context_waiting_for_120s]);
            _CAL_STATUS_ERROR
        }

        /* Enter Calibration value*/
        _CAL_POINT_1_ENT

        ACKNOWLEDGE([MT_context_press_button_when_sensor_is_gas1]);

        _ENTRY_CAL_POINT_0
		ReadCommand(read_trans1_cal_drift);

        if (trans1_cal_drift != 1)
        {
            while (1)
            {
                _CAL_POINT_1_DIS
                _CALFLAG_STABLE
            }
        }
        else
        {
            _CAL_POINT_1_DYN
        }

        _CAL_RECODE_POINT_0

        _CALC_FUNCTION
    }
}

METHOD method_O2_1p_Offset
{
    LABEL       [MT_lab_o2_1p_offset];
    VALIDITY
        IF(SENSOR_O2)    {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];

        long status;
        long processCurrentCalibCal;
        unsigned char processing;

//        add_abort_method(log_abort);

        /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 8); /*O2 1 Point Offset*/
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_o2_1p_o]);
        _CAL_STATUS_ERROR

        //iassign(trans1_o2_cal_unit, 20);				/*default %air unit*/
        _WRITE_O2_CAL_UNIT

        if ((trans1_o2_cal_unit == 20)||(trans1_o2_cal_unit == 21)||
        (trans1_o2_cal_unit == 26)||(trans1_o2_cal_unit == 27)||(trans1_o2_cal_unit == 28))
        {
           /*Cal Pressure Unit*/
            GET_DEV_VAR_VALUE([MT_context_cal_pressure_unit], trans1_o2_cal_pre_unit);
            status = WriteCommand(write_trans1_o2_cal_pre_unit);
            _CAL_COMM_ERROR
            _CAL_STATUS_ERROR

           /*Cal Pressure Value*/
            GET_DEV_VAR_VALUE([MT_context_cal_pressure_value], trans1_o2_cal_pre_value);
            status = WriteCommand(write_trans1_o2_cal_pre_value);
            _CAL_COMM_ERROR
            _CAL_STATUS_ERROR

           /*Relative Humdity*/
            GET_DEV_VAR_VALUE([MT_context_relative_humdity], trans1_o2_meas_humidity);
            status = WriteCommand(write_trans1_o2_meas_humidity);
            _CAL_COMM_ERROR
            _CAL_STATUS_ERROR
        }

        /* Enter Calibration value*/
        _CAL_POINT_1_ENT

        ACKNOWLEDGE([MT_context_press_button_when_sensor_is_gas1_air]);

        _ENTRY_CAL_POINT_0

        _CAL_POINT_1_DYN

        _CAL_RECODE_POINT_0

        _CALC_FUNCTION
    }
}

METHOD method_Cond_1p
{
    LABEL       [MT_lab_cond_1p];
    VALIDITY
        IF(SENSOR_COND)    {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];

        long status;
        long processCurrentCalibCal;
        unsigned char processing;

//        add_abort_method(log_abort);

        /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 9); /*Cond 1 Point*/
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_cond_1p]);
        _CAL_STATUS_ERROR

        
        _WRITE_COND_CAL_UNIT

        _CAL_COMPENSATION_MODE

        /* Enter Calibration value*/
        _CAL_POINT_1_ENT

        _ENTRY_CAL_POINT_0

        _CAL_POINT_1_DYN

        _CAL_RECODE_POINT_0

        _CALC_FUNCTION
    }
}

METHOD method_Cond_2p
{
    LABEL       [MT_lab_cond_2p];
    VALIDITY
        IF(SENSOR_COND)    {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];

        long status;
        long processCurrentCalibCal;
        unsigned char processing;

//        add_abort_method(log_abort);

        /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 10); /*Cond 2 Point*/
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_cond_2p]);
        _CAL_STATUS_ERROR

        _WRITE_COND_CAL_UNIT

        _CAL_COMPENSATION_MODE

        /* Cal Point 1*/
        _CAL_POINT_1_ENT

        _ENTRY_CAL_POINT_0

        _CAL_POINT_1_DYN

        _CAL_RECODE_POINT_0

        /* Cal Point 2*/
        _CAL_POINT_2_ENT

        _ENTRY_CAL_POINT_1

        _CAL_POINT_2_DYN

        _CAL_RECODE_POINT_1

        _CALC_FUNCTION
    }
}

METHOD method_Cond_Process
{
    LABEL       [MT_lab_cond_process];
    VALIDITY
        IF(SENSOR_COND)    {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];

        long status;
        long processCurrentCalibCal;
        unsigned char processing;

//        add_abort_method(log_abort);

        /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 11); /*Cond Process*/
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_cond_pro]);
        _CAL_STATUS_ERROR

        _WRITE_COND_CAL_UNIT

        _CAL_COMPENSATION_MODE

        _ENTRY_CAL_POINT_0

        _PROCESS_CAL_DIS

        _CAL_RECODE_POINT_0

        ACKNOWLEDGE([MT_context_capture_value_stored_info]);
        _CAL_STATUS_ERROR

        /* Enter Calibration value*/
        _PROCESS_CAL_POINT

        _CAL_RECODE_POINT_1

        _CALC_FUNCTION
    }
}

METHOD method_Resistivity_1p
{
    LABEL       [MT_lab_resistivity_1p];
    VALIDITY
        IF(SENSOR_COND)    {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];

        long status;
        long processCurrentCalibCal;
        unsigned char processing;

//        add_abort_method(log_abort);

        /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 12); /*Resistivity 1 Point*/
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_r_1p]);
        _CAL_STATUS_ERROR

        
        _WRITE_RES_CAL_UNIT

        _CAL_COMPENSATION_MODE

        /* Cal Point 1*/
        _CAL_POINT_1_ENT

        _ENTRY_CAL_POINT_0

        _CAL_POINT_1_DYN

        _CAL_RECODE_POINT_0

        _CALC_FUNCTION
    }
}

METHOD method_Resistivity_2p
{
    LABEL       [MT_lab_resistivity_2p];
    VALIDITY
        IF(SENSOR_COND)    {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];

        long status;
        long processCurrentCalibCal;
        unsigned char processing;

//        add_abort_method(log_abort);

        /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 13); /*Resistivity 2 Point*/
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_r_2p]);
        _CAL_STATUS_ERROR

        iassign(trans1_res_cal_unit, 49);				/*default Ohm/cm unit*/
        _WRITE_RES_CAL_UNIT

        _CAL_COMPENSATION_MODE

        /* Cal Point 1*/
        _CAL_POINT_1_ENT

        _ENTRY_CAL_POINT_0

        _CAL_POINT_1_DYN

        _CAL_RECODE_POINT_0

        /* Cal Point 2*/
        _CAL_POINT_2_ENT

        _ENTRY_CAL_POINT_1

        _CAL_POINT_2_DYN

        _CAL_RECODE_POINT_1

        _CALC_FUNCTION
    }
}

METHOD method_Resistivity_Process
{
    LABEL       [MT_lab_resistivity_process];
    VALIDITY
        IF(SENSOR_COND)    {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];

        long status;
        long processCurrentCalibCal;
        unsigned char processing;

//        add_abort_method(log_abort);

        /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 14); /*Resistivity Process*/
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_r_pro]);
        _CAL_STATUS_ERROR

        iassign(trans1_res_cal_unit, 49);				/*default Ohm/cm unit*/
        _WRITE_RES_CAL_UNIT

        _CAL_COMPENSATION_MODE

        _ENTRY_CAL_POINT_0

        _PROCESS_CAL_DIS

        _CAL_RECODE_POINT_0

        ACKNOWLEDGE([MT_context_capture_value_stored_info]);
        _CAL_STATUS_ERROR

        /* Enter Calibration value*/
        _PROCESS_CAL_POINT

        _CAL_RECODE_POINT_1

        _CALC_FUNCTION
    }
}

METHOD method_Optical_DO_1p
{
    LABEL       [MT_lab_optical_1p];
    VALIDITY
        IF(SENSOR_O2_OPT)    {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];

        long status;
        long processCurrentCalibCal;
        unsigned char processing;

//        add_abort_method(log_abort);

        /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 15); /*Optical 1 point*/
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_opt_1p]);
        _CAL_STATUS_ERROR

        
        _WRITE_ODO_CAL_UNIT

        /*if ((trans1_odo_cal_unit == 20)||(trans1_odo_cal_unit == 21)||*/
        /*(trans1_odo_cal_unit == 26)||(trans1_odo_cal_unit == 27)||(trans1_odo_cal_unit == 28))*/
        /*{*/
           /*Cal Pressure Unit*/
            GET_DEV_VAR_VALUE([MT_context_cal_pressure_unit], trans1_o2_cal_pre_unit);
            status = WriteCommand(write_trans1_o2_cal_pre_unit);
            _CAL_COMM_ERROR
            _CAL_STATUS_ERROR

           /*Cal Pressure Value*/
            GET_DEV_VAR_VALUE([MT_context_cal_pressure_value], trans1_o2_cal_pre_value);
            status = WriteCommand(write_trans1_o2_cal_pre_value);
            _CAL_COMM_ERROR
            _CAL_STATUS_ERROR

           /*Relative Humdity*/
            GET_DEV_VAR_VALUE([MT_context_relative_humdity], trans1_o2_meas_humidity);
            status = WriteCommand(write_trans1_o2_meas_humidity);
            _CAL_COMM_ERROR
            _CAL_STATUS_ERROR
        /*}*/

        _CAL_POINT_1_ENT

        ACKNOWLEDGE([MT_context_press_button_when_sensor_is_gas1]);

        _ENTRY_CAL_POINT_0
		ReadCommand(read_trans1_cal_drift);

        if (trans1_cal_drift != 1)
        {
            while (1)
            {
                _CAL_POINT_1_DIS
                _CALFLAG_STABLE
            }
        }
        else
        {
            _CAL_POINT_1_DYN
        }

        _CAL_RECODE_POINT_0

        _CALC_FUNCTION
    }
}

METHOD method_Optical_DO_Pro
{
    LABEL       [MT_lab_optical_process];
    VALIDITY
        IF(SENSOR_O2_OPT )   {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];

        long status;
        long processCurrentCalibCal;
        unsigned char processing;

//        add_abort_method(log_abort);

        /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 17); /*Optical calibration process*/
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_opt_cal_pro]);
        _CAL_STATUS_ERROR

        _WRITE_ODO_CAL_UNIT

        _ENTRY_CAL_POINT_0

        _PROCESS_CAL_DIS

        _CAL_RECODE_POINT_0

        ACKNOWLEDGE([MT_context_capture_value_stored_info]);
        _CAL_STATUS_ERROR

        /* Enter Calibration value*/
        _PROCESS_CAL_POINT

        _CAL_RECODE_POINT_1

        _CALC_FUNCTION
    }
}

METHOD method_Optical_DO_2p
{
    LABEL       [MT_lab_optical_2p];
    VALIDITY
        IF(SENSOR_O2_OPT )   {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];

        long status;
        long processCurrentCalibCal;
        unsigned char processing;

//        add_abort_method(log_abort);

        /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 16);
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_opt_2p]);
        _CAL_STATUS_ERROR

        _WRITE_ODO_CAL_UNIT

        /*if ((trans1_odo_cal_unit == 20)||(trans1_odo_cal_unit == 21)||*/
        /*(trans1_odo_cal_unit == 26)||(trans1_odo_cal_unit == 27)||(trans1_odo_cal_unit == 28))*/
        /*{*/
           /*Cal Pressure Unit*/
            GET_DEV_VAR_VALUE([MT_context_cal_pressure_unit], trans1_o2_cal_pre_unit);
            status = WriteCommand(write_trans1_o2_cal_pre_unit);
            _CAL_COMM_ERROR
            _CAL_STATUS_ERROR

           /*Cal Pressure Value*/
            GET_DEV_VAR_VALUE([MT_context_cal_pressure_value], trans1_o2_cal_pre_value);
            status = WriteCommand(write_trans1_o2_cal_pre_value);
            _CAL_COMM_ERROR
            _CAL_STATUS_ERROR

           /*Relative Humdity*/
            GET_DEV_VAR_VALUE([MT_context_relative_humdity], trans1_o2_meas_humidity);
            status = WriteCommand(write_trans1_o2_meas_humidity);
            _CAL_COMM_ERROR
            _CAL_STATUS_ERROR
        /*}*/

        /* Cal Point 1*/
        _CAL_POINT_1_ENT

        ACKNOWLEDGE([MT_context_press_button_when_sensor_is_gas1]);

        _ENTRY_CAL_POINT_0
		ReadCommand(read_trans1_cal_drift);

        if (trans1_cal_drift != 1)
        {
            while (1)
            {
                _CAL_POINT_1_DIS
                _CALFLAG_STABLE

            }
        }
        else
        {
            _CAL_POINT_1_DYN
        }

        _CAL_RECODE_POINT_0

        /* Cal Point 2*/
        _CAL_POINT_2_ENT

        ACKNOWLEDGE([MT_context_press_button_when_gas_is_changed]);

        _ENTRY_CAL_POINT_1

        if (trans1_cal_drift != 1)
        {
            while (1)
            {
                _CAL_POINT_2_DIS
                _CALFLAG_STABLE
            }
        }
        else
        {
            _CAL_POINT_2_DYN
        }

        _CAL_RECODE_POINT_1

        _CALC_FUNCTION
    }
}


METHOD method_O3_1Point
{
    LABEL       [MT_lab_o3_1p_offset];
    VALIDITY
        IF(SENSOR_O3)    {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];

        long status;
        long processCurrentCalibCal;
        unsigned char processing;

//        add_abort_method(log_abort);

        /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 24); /*O3 1 point*/
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_o3_1p_cal]);
        _CAL_STATUS_ERROR

        _WRITE_O3_CAL_UNIT

        ACKNOWLEDGE([MT_context_remove_sensor_from_process]);

        _CAL_POINT_1_ENT

        _ENTRY_CAL_POINT_0

        _CAL_POINT_1_DYN

        _CAL_RECODE_POINT_0

        _CALC_FUNCTION
    }
}

METHOD method_CO2_Beverage_1point
{
    LABEL       [MT_lab_co2_hi_1p];
    VALIDITY
        IF(SENSOR_CO2_B)    {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];

        long status;
        long processCurrentCalibCal;
        unsigned char processing;

//        add_abort_method(log_abort);

        /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 22); /*CO2 Hi 1-point*/
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_co2_1p_cal]);
        _CAL_STATUS_ERROR

        _WRITE_CO2_B_1P_CAL_UNIT

        ACKNOWLEDGE([MT_context_press_button_when_sensor_is_in_gas_co2]);

        _CAL_POINT_1_ENT

        _ENTRY_CAL_POINT_0
        
        ReadCommand(read_trans1_cal_drift);
        if (trans1_cal_drift != 1)
        {
            while (1)
            {
                _CAL_POINT_1_DIS
                _CALFLAG_STABLE
            }
        }
        else
        {
            _CAL_POINT_1_DYN
            _CAL_STATUS_ERROR
        }


        _CAL_RECODE_POINT_0

        _CALC_FUNCTION
    }
}



METHOD method_CO2_Beverage_Process
{
    LABEL       [MT_lab_co2_hi_pro];
    VALIDITY
        IF(SENSOR_CO2_B )   {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];

        long status;
        long processCurrentCalibCal;
        unsigned char processing;

//        add_abort_method(log_abort);

        /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 23); /*CO2 Hi process*/
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_co2_hi_pro_cal]);
        _CAL_STATUS_ERROR

        _WRITE_CO2_B_PRO_CAL_UNIT

        _ENTRY_CAL_POINT_0

        _PROCESS_CAL_DIS

        _CAL_RECODE_POINT_0

        ACKNOWLEDGE([MT_context_capture_value_stored_info]);
        _CAL_STATUS_ERROR

        /* Enter Calibration value*/
        _PROCESS_CAL_POINT

        _CAL_RECODE_POINT_1

        _CALC_FUNCTION
    }
}




METHOD method_O3_Process_Slope
{
    LABEL       [MT_lab_o3_pro_slope];
    VALIDITY
        IF(SENSOR_O3 )   {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];

        long status;
        long processCurrentCalibCal;
        unsigned char processing;

//        add_abort_method(log_abort);

        /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 26); /*O3 process slope process*/
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_o3_pro_slope_cal]);
        _CAL_STATUS_ERROR

        _WRITE_O3_CAL_UNIT

        _ENTRY_CAL_POINT_0

        _PROCESS_CAL_DIS

        _CAL_RECODE_POINT_0

        ACKNOWLEDGE([MT_context_capture_value_stored_info]);
		_CAL_STATUS_ERROR

        /* Enter Calibration value*/
        _PROCESS_CAL_POINT

        _CAL_RECODE_POINT_1

        _CALC_FUNCTION
    }
}

METHOD method_O3_Process_Offset
{
    LABEL       [MT_lab_o3_pro_offset];
    VALIDITY
        IF(SENSOR_O3 )   {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long var_id1[1];   
        long var_id2[2];
        long var_id3[3];
        long var_id4[4];

        long status;
        long processCurrentCalibCal;
        unsigned char processing;

//        add_abort_method(log_abort);

        /* Enter Calibration Mode*/
        iassign(trans1_cal_mode, 25); /*O3 process offset process*/
        status = WriteCommand(write_trans1_cal_mode);
        _CAL_COMM_ERROR

        DELAY(DELAYTIMES, [MT_context_o3_pro_offset_cal]);
        _CAL_STATUS_ERROR

        _WRITE_O3_CAL_UNIT

        _ENTRY_CAL_POINT_0

        _PROCESS_CAL_DIS

        _CAL_RECODE_POINT_0

        ACKNOWLEDGE([MT_context_capture_value_stored_info]);
		_CAL_STATUS_ERROR

        /* Enter Calibration value*/
        _PROCESS_CAL_POINT

        _CAL_RECODE_POINT_1

        _CALC_FUNCTION
    }
}


METHOD method_ResetCIP
{
    LABEL       [MT_lab_Reset_cip];
    VALIDITY
        IF(SENSOR_DIGITAL_CONNECT_ONLY && (trans1_functions_enable_flag & _CIP_RESET_ENABLE) )   {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long status;

        ACKNOWLEDGE([MT_context_waiting_reset_cip_counter]);

        /* Enter RESET_CYCLE*/
        iassign(trans1_reset_cycle_ctr, 1);			/*CIP*/
        /*resetCycleCounterCode = 1;*/ /*CIP£¬NI-FBUS doesn't work well*/
        status = WriteCommand(write_trans1_reset_cycle_ctr);
        _CAL_COMM_ERROR

        ACKNOWLEDGE([MT_context_cip_counter_reset]);
    }
}

METHOD method_ResetSIP
{
    LABEL       [MT_lab_Reset_sip];
    VALIDITY
        IF(SENSOR_DIGITAL_CONNECT_ONLY && (trans1_functions_enable_flag & _SIP_RESET_ENABLE) )   {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long status;

        ACKNOWLEDGE([MT_context_waiting_reset_sip_counter]);

        /* Enter RESET_CYCLE*/
        iassign(trans1_reset_cycle_ctr, 2);			/*SIP*/
        /*resetCycleCounterCode = 2;*/ /*SIP*/
        status = WriteCommand(write_trans1_reset_cycle_ctr);
        _CAL_COMM_ERROR

        ACKNOWLEDGE([MT_context_sip_counter_reset]);
    }
}

METHOD method_ResetTTM
{
    LABEL       [MT_lab_Reset_ttm];
    VALIDITY
        IF(SENSOR_DIGITAL_CONNECT_ONLY && (trans1_functions_enable_flag & _TTM_RESET_ENABLE) )   {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long status;

        ACKNOWLEDGE([MT_context_waiting_reset_ttm_counter]);

        /* Enter RESET_CYCLE*/
        iassign(trans1_reset_cycle_ctr, 0);			/*TTM*/
        /*resetCycleCounterCode = 0;*/ /*TTM*/
        status = WriteCommand(write_trans1_reset_cycle_ctr);
        _CAL_COMM_ERROR

        ACKNOWLEDGE([MT_context_ttm_counter_reset]);

        if (SENSOR_O2_1||SENSOR_O2_OPT_1)
        {
            ACKNOWLEDGE([MT_context_cal_required]);
        }
    }
}

METHOD method_ResetDLI
{
    LABEL       [MT_lab_Reset_dli];
    VALIDITY
        IF(SENSOR_DIGITAL_CONNECT_ONLY && (trans1_functions_enable_flag & _DLI_RESET_ENABLE) )   {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long status;

        ACKNOWLEDGE([MT_context_waiting_reset_dli_counter]);

        /* Enter RESET_CYCLE*/
        iassign(trans1_reset_cycle_ctr, 4);			/*DLI*/
        /*resetCycleCounterCode = 4;*/ /*DLI*/
        status = WriteCommand(write_trans1_reset_cycle_ctr);
        _CAL_COMM_ERROR

        ACKNOWLEDGE([MT_context_dli_counter_reset]);

        if (SENSOR_O2_1||SENSOR_O2_OPT_1)
        {
            ACKNOWLEDGE([MT_context_cal_required]);
        }
    }
}

METHOD method_ResetAutoclave
{
    LABEL       [MT_lab_Reset_autoclave];
    VALIDITY
        IF(SENSOR_DIGITAL_CONNECT_ONLY && (trans1_functions_enable_flag & _AUTOCLAVE_RESET_ENABLE) )   {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long status;

        ACKNOWLEDGE([MT_context_waiting_reset_autoclave_counter]);

        /* Enter RESET_CYCLE*/
        iassign(trans1_reset_cycle_ctr, 3);			/*Autoclave*/
        /*resetCycleCounterCode = 3; *//*Autoclave*/
        status = WriteCommand(write_trans1_reset_cycle_ctr);
        _CAL_COMM_ERROR

        ACKNOWLEDGE([MT_context_autoclave_counter_reset]);
    }
}

METHOD method_ResetSAN
{
    LABEL       [MT_lab_Reset_san];
    VALIDITY
        IF(SENSOR_DIGITAL_CONNECT_ONLY && (trans1_functions_enable_flag & _SAN_CYCLE_ENABLE) )   {TRUE;}
        ELSE    {FALSE;}
    DEFINITION
    {
        long status;

        ACKNOWLEDGE([MT_context_waiting_reset_san_cycle_counter]);

        /* Enter RESET_CYCLE*/
        iassign(trans1_reset_cycle_ctr, 5);			/*SAN Cycle*/
        /*resetCycleCounterCode = 3; *//*Autoclave*/
        status = WriteCommand(write_trans1_reset_cycle_ctr);
        _CAL_COMM_ERROR

        ACKNOWLEDGE([MT_context_san_cycle_counter_reset]);
    }
}


METHOD method_pre_edit_action_date
{
    LABEL       "";		//fbi	2014-06-05
    DEFINITION
    {
		long status;

        iassign(trans1_reset_cycle_ctr, 6);
        status = WriteCommand(write_trans1_reset_cycle_ctr);
        _CAL_COMM_ERROR

        DELAY(5, [MT_context_time_sync]);

        ReadCommand (read_trans1_device_time);
    }
}

