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

/* defines for block configuration */

#define AI1_BLOCK_SLOT			1

#define FUNC1_TITLE "Function Block 1 - Analog Input"
#define DEFAULT_VALUE_func1_AI_out_unit 1001 /* Celsius */
#define DEFAULT_VALUE_func1_upper_range_value 850
#define DEFAULT_VALUE_func1_lower_range_value -200
#define NO_UNIT_RELATION_out_scale_unit
#define FUNC1_DEFAULT_UNIT 1001

#ifndef DEFAULT_VALUE_blk_profile
    #define DEFAULT_VALUE_blk_profile 0x4002
#endif
#ifndef DEFAULT_VALUE_blk_profile_ref
    #define DEFAULT_VALUE_blk_profile_ref 0x301
#endif

#include "PBPA_EH1551_Macros.inc"
#include "PBPA_EH_1551_0101_enum_entrys.inc"




/* VARIABLE definitons */

VARIABLE func1_AI_blk_reserve
{
    LABEL [blk_reserved];
    HELP [blk_reserved_help];
    CLASS DEVICE;
    HANDLING READ;
    TYPE UNSIGNED_INTEGER (1);
}
VARIABLE func1_AI_blk_object
{
    LABEL [blk_block_object];
    HELP [blk_block_object_help];
    CLASS DEVICE;
    HANDLING READ;
    TYPE ENUMERATED(1)
    {
        { FUNC1_AI_BLK_OBJECT__BLK_BLOCK_OBJECT_FUNCTION_ }
    }
}
VARIABLE func1_AI_blk_parent_class
{
    LABEL [blk_parent_class];
    HELP [phys_blk_parent_class_help];
    CLASS DEVICE;
    HANDLING READ;
    TYPE ENUMERATED(1)
    {
        { FUNC1_AI_BLK_PARENT_CLASS__FUNC_BLK_PARENT_CLASS_INPUT_ }
    }
}
VARIABLE func1_AI_blk_class
{
    LABEL [blk_class];
    HELP [phys_blk_class_help];
    CLASS DEVICE;
    HANDLING READ;
    TYPE ENUMERATED(1)
    {
        { FUNC1_AI_BLK_CLASS__FUNC_BLK_CLASS_AI_ }
    }
}
VARIABLE func1_AI_blk_dd_reference
{
    LABEL [blk_dd_reference];
    HELP [blk_dd_reference_help];
    CLASS DEVICE;
    HANDLING READ;
    TYPE UNSIGNED_INTEGER (4);
}
VARIABLE func1_AI_blk_dd_rev
{
    LABEL [blk_dd_rev];
    HELP [blk_dd_rev_help];
    CLASS DEVICE;
    HANDLING READ;
    TYPE UNSIGNED_INTEGER (2);
}
VARIABLE func1_AI_blk_profile
{
    LABEL [blk_profile];
    HELP [blk_profile_help];
    CLASS DEVICE;
    HANDLING READ;
    TYPE ENUMERATED(2)
    {
        { FUNC1_AI_BLK_PROFILE__BLK_PROFILE_PA_COMPACT_A_ },
        { FUNC1_AI_BLK_PROFILE__BLK_PROFILE_PA_COMPACT_B_ },
        { FUNC1_AI_BLK_PROFILE__BLK_PROFILE_PA_SIMPLE_A_ },
        { FUNC1_AI_BLK_PROFILE__BLK_PROFILE_PA_SIMPLE_B_ }
    }
    DEFAULT_VALUE DEFAULT_VALUE_blk_profile;
}
VARIABLE func1_AI_blk_profile_rev
{
    LABEL [blk_profile_rev];
    HELP [blk_profile_rev_help];
    CLASS DEVICE;
    HANDLING READ;
    TYPE ENUMERATED(2)
    {
        { FUNC1_AI_BLK_PROFILE_REV_2_90 },
        { FUNC1_AI_BLK_PROFILE_REV_2_91 },
        { FUNC1_AI_BLK_PROFILE_REV_2_92 },
        { FUNC1_AI_BLK_PROFILE_REV_2_93 },
        { FUNC1_AI_BLK_PROFILE_REV_2_94 },
        { FUNC1_AI_BLK_PROFILE_REV_2_95 },
        { FUNC1_AI_BLK_PROFILE_REV_2_96 },
        { FUNC1_AI_BLK_PROFILE_REV_2_97 },
        { FUNC1_AI_BLK_PROFILE_REV_2_98 },
        { FUNC1_AI_BLK_PROFILE_REV_2_99 },
        { FUNC1_AI_BLK_PROFILE_REV_3_0 },
        { FUNC1_AI_BLK_PROFILE_REV_3_01 }
    }
    DEFAULT_VALUE DEFAULT_VALUE_blk_profile_ref;
}
VARIABLE func1_AI_blk_execution_time
{
    LABEL [blk_execution_time];
    HELP [blk_execution_time_help];
    CLASS DEVICE;
    HANDLING READ;
    TYPE UNSIGNED_INTEGER (1);
}
VARIABLE func1_AI_blk_num_parameters
{
    LABEL [blk_num_parameters];
    HELP [blk_num_parameters_help];
    CLASS DEVICE;
    HANDLING READ;
    TYPE UNSIGNED_INTEGER (2);
}
VARIABLE func1_AI_blk_index_view_1
{
    LABEL [blk_index_view_1];
    HELP [blk_index_view_1_help];
    CLASS DEVICE;
    HANDLING READ;
    TYPE UNSIGNED_INTEGER (2);
}
VARIABLE func1_AI_blk_num_view_lists
{
    LABEL [blk_num_view_lists];
    HELP [blk_num_view_lists_help];
    CLASS DEVICE;
    HANDLING READ;
    TYPE UNSIGNED_INTEGER (1);
}
VARIABLE func1_AI_st_rev
{
    LABEL [st_rev];
    HELP [st_rev_help];
    CLASS DEVICE;
    HANDLING READ;
    TYPE UNSIGNED_INTEGER (2)
    {
        DEFAULT_VALUE 0;
    }
}
VARIABLE func1_AI_tag_desc
{
    LABEL [tag_desc];
    HELP [tag_desc_help];
    CLASS DEVICE;
    HANDLING READ & WRITE;
    TYPE ASCII (32);
}
VARIABLE func1_AI_target_mode
{
    LABEL [target_mode];
    HELP [target_mode_help];
    CLASS DEVICE;
    HANDLING READ & WRITE;
    TYPE ENUMERATED (1)
    {
        { FUNC1_AI_TARGET_MODE__MODE_AUTO_ },
        { FUNC1_AI_TARGET_MODE__MODE_MAN_ },
        { FUNC1_AI_TARGET_MODE__MODE_OUT_OF_SERVICE_ }
    }
    DEFAULT_VALUE 0x08;
}
VARIABLE func1_actual_mode
{
    LABEL [actual_mode];
    HELP [actual_mode_help];
    CLASS DEVICE & DYNAMIC;
    HANDLING READ;
    TYPE ENUMERATED (1)
    {
        { FUNC1_ACTUAL_MODE__MODE_AUTO_ },
        { FUNC1_ACTUAL_MODE__MODE_MAN_ },
        { FUNC1_ACTUAL_MODE__MODE_OUT_OF_SERVICE_ }
    }
    DEFAULT_VALUE 0x08;
}
VARIABLE func1_permitted_mode
{
    LABEL [permitted_mode];
    HELP [permitted_mode_help];
    CLASS DEVICE;
    HANDLING READ;
    TYPE ENUMERATED (1)
    {
        { FUNC1_PERMITTED_MODE__MODE_AUTO_ },
        { FUNC1_PERMITTED_MODE__MODE_MAN_ },
        { FUNC1_PERMITTED_MODE__MODE_OUT_OF_SERVICE_ }
    }
    DEFAULT_VALUE 0x08;
}
VARIABLE func1_normal_mode
{
    LABEL [normal_mode];
    HELP [normal_mode_help];
    CLASS DEVICE;
    HANDLING READ;
    TYPE ENUMERATED (1)
    {
        { FUNC1_NORMAL_MODE__MODE_AUTO_ },
        { FUNC1_NORMAL_MODE__MODE_MAN_ },
        { FUNC1_NORMAL_MODE__MODE_OUT_OF_SERVICE_ }
    }
    DEFAULT_VALUE 0x08;
}
VARIABLE func1_current_state_alarm_sum
{
    LABEL [current_state_alarm_sum];
    HELP [current_state_alarm_sum_help];
    CLASS DEVICE & DYNAMIC;
    HANDLING READ;
    TYPE BIT_ENUMERATED (2)
    {
        { FUNC1_CURRENT_STATE_ALARM_SUM__LIMIT_STATE_NO_ALARM_ },
        { FUNC1_CURRENT_STATE_ALARM_SUM__LIMIT_STATE_HI_HI_ },
        { FUNC1_CURRENT_STATE_ALARM_SUM__LIMIT_STATE_HI_ },
        { FUNC1_CURRENT_STATE_ALARM_SUM__LIMIT_STATE_LO_LO_ },
        { FUNC1_CURRENT_STATE_ALARM_SUM__LIMIT_STATE_LO_ },
        { FUNC1_CURRENT_STATE_ALARM_SUM__LIMIT_STATE_ST_REV_ }
    }
    DEFAULT_VALUE 0x0000;
}
VARIABLE func1_unacknowledged_state_alarm_sum
{
    LABEL [unacknowledged_state_alarm_sum];
    HELP [unacknowledged_state_alarm_sum_help];
    CLASS DEVICE & DYNAMIC;
    HANDLING READ;
    TYPE BIT_ENUMERATED (2)
    {
        { FUNC1_UNACKNOWLEDGED_STATE_ALARM_SUM__LIMIT_STATE_NO_ALARM_ },
        { FUNC1_UNACKNOWLEDGED_STATE_ALARM_SUM__LIMIT_STATE_HI_HI_ },
        { FUNC1_UNACKNOWLEDGED_STATE_ALARM_SUM__LIMIT_STATE_HI_ },
        { FUNC1_UNACKNOWLEDGED_STATE_ALARM_SUM__LIMIT_STATE_LO_LO_ },
        { FUNC1_UNACKNOWLEDGED_STATE_ALARM_SUM__LIMIT_STATE_LO_ },
        { FUNC1_UNACKNOWLEDGED_STATE_ALARM_SUM__LIMIT_STATE_ST_REV_ }
    }
    DEFAULT_VALUE 0x0000;
}
VARIABLE func1_unreported_state_alarm_sum
{
    LABEL [unreported_state_alarm_sum];
    HELP [unreported_state_alarm_sum_help];
    CLASS DEVICE & DYNAMIC;
    HANDLING READ;
    TYPE BIT_ENUMERATED (2)
    {
        { FUNC1_UNREPORTED_STATE_ALARM_SUM__LIMIT_STATE_NO_ALARM_ },
        { FUNC1_UNREPORTED_STATE_ALARM_SUM__LIMIT_STATE_HI_HI_ },
        { FUNC1_UNREPORTED_STATE_ALARM_SUM__LIMIT_STATE_HI_ },
        { FUNC1_UNREPORTED_STATE_ALARM_SUM__LIMIT_STATE_LO_LO_ },
        { FUNC1_UNREPORTED_STATE_ALARM_SUM__LIMIT_STATE_LO_ },
        { FUNC1_UNREPORTED_STATE_ALARM_SUM__LIMIT_STATE_ST_REV_ }
    }
    DEFAULT_VALUE 0x0000;
}
VARIABLE func1_disabled_state_alarm_sum
{
    LABEL [disabled_state_alarm_sum];
    HELP [disabled_state_alarm_sum_help];
    CLASS DEVICE & DYNAMIC;
    HANDLING READ;
    TYPE BIT_ENUMERATED (2)
    {
        { FUNC1_DISABLED_STATE_ALARM_SUM__LIMIT_STATE_NO_ALARM_ },
        { FUNC1_DISABLED_STATE_ALARM_SUM__LIMIT_STATE_HI_HI_ },
        { FUNC1_DISABLED_STATE_ALARM_SUM__LIMIT_STATE_HI_ },
        { FUNC1_DISABLED_STATE_ALARM_SUM__LIMIT_STATE_LO_LO_ },
        { FUNC1_DISABLED_STATE_ALARM_SUM__LIMIT_STATE_LO_ },
        { FUNC1_DISABLED_STATE_ALARM_SUM__LIMIT_STATE_ST_REV_ }
    }
    DEFAULT_VALUE 0x0000;
}
VARIABLE func1_AI_out_value
{
    LABEL [func_out_value];
    HELP [func_ai_out_value_help];
    CLASS OUTPUT & DYNAMIC;
    HANDLING IF (func1_actual_mode != 0x10) { READ;  } ELSE { READ & WRITE; }
    TYPE FLOAT
    {
		MIN_VALUE -1.0e+20 - 0.01;
		MAX_VALUE 1.0e+20 - 0.01;
		DISPLAY_FORMAT func1_AI_DISPLAY_FORMAT(func1_AI_out_value)
        DEFAULT_VALUE 0.0;
    }
}
VARIABLE func1_AI_out_status_quality
{
    LABEL [status_quality];
    HELP [func_out_status_help];
    CLASS OUTPUT & DYNAMIC;
    HANDLING IF (func1_actual_mode != 0x10) { READ;  } ELSE { READ & WRITE; }
    TYPE ENUMERATED (1)
    {
        IF(phys_feature_enabled==0x01000000 && phys_cond_status_diag==1)
        {COND_STATUS_QUALITY}
        ELSE
        {PROFILE_301_QUALITY}
    }
    DEFAULT_VALUE 0;
    POST_EDIT_ACTIONS
    {
        IF(func1_AI_target_mode==0x10){method_post_edit_func1_set_status_limit}
    }
}
VARIABLE func1_AI_out_status_limit
{
    LABEL [status_limit];
    HELP [func_out_status_help];
    CLASS OUTPUT & DYNAMIC;
    HANDLING IF(func1_actual_mode != 0x10) { READ; } ELSE { READ & WRITE; }
    TYPE ENUMERATED (1)
    {
        { FUNC1_AI_OUT_STATUS_LIMIT__STATUS_LIMIT_OK_ },
        { FUNC1_AI_OUT_STATUS_LIMIT__STATUS_LIMIT_UNDERFLOW_ },
        { FUNC1_AI_OUT_STATUS_LIMIT__STATUS_LIMIT_OVERFLOW_ },
        { FUNC1_AI_OUT_STATUS_LIMIT__STATUS_LIMIT_VALUE_CONSTANT_ }
    }
}
VARIABLE func1_AI_pv_upper_range_value
{
    LABEL "|en|PV scale - upper value|de|PV Scale - Endwert";
    HELP [func_pv_scale_upper_value_help];
    CLASS DEVICE;
    HANDLING READ & WRITE;
    TYPE FLOAT
    {
		MIN_VALUE -1.0e+20 - 0.01;
		MAX_VALUE 1.0e+20 - 0.01;
		DISPLAY_FORMAT func1_AI_DISPLAY_FORMAT(func1_AI_pv_upper_range_value)
        DEFAULT_VALUE 100.0;
    }
}
VARIABLE func1_AI_pv_lower_range_value
{
    LABEL "|en|PV scale - lower value|de|PV Scale - Anfangswert";
    HELP [func_pv_scale_lower_value_help];
    CLASS DEVICE;
    HANDLING READ & WRITE;
    TYPE FLOAT
    {
		MIN_VALUE -1.0e+20 - 0.01;
		MAX_VALUE 1.0e+20 - 0.01;
		DISPLAY_FORMAT func1_AI_DISPLAY_FORMAT(func1_AI_pv_lower_range_value)
        DEFAULT_VALUE 0.0;
    }
}
VARIABLE func1_AI_out_upper_range_value
{
    LABEL "|en|Out scale - upper value|de|Out Scale - Endwert";
    HELP [func_out_scale_upper_value_help];
    CLASS DEVICE;
    HANDLING READ & WRITE;
    TYPE FLOAT
    {
		MIN_VALUE -1.0e+20 - 0.01;
		MAX_VALUE 1.0e+20 - 0.01;
		DISPLAY_FORMAT func1_AI_DISPLAY_FORMAT(func1_AI_out_upper_range_value)
        DEFAULT_VALUE 100.0;
    }
}
VARIABLE func1_AI_out_lower_range_value
{
    LABEL "|en|Out scale - lower Value|de|Out Scale - Anfangswert";
    HELP [func_out_scale_lower_value_help];
    CLASS DEVICE;
    HANDLING READ & WRITE;
    TYPE FLOAT
    {
		MIN_VALUE -1.0e+20 - 0.01;
		MAX_VALUE 1.0e+20 - 0.01;
		DISPLAY_FORMAT func1_AI_DISPLAY_FORMAT(func1_AI_out_lower_range_value)
        DEFAULT_VALUE 0.0;
    }
}
VARIABLE func1_AI_out_unit
{
    LABEL [digital_units];
    HELP [digital_units_help];
    CLASS DEVICE & DYNAMIC;
    HANDLING READ & WRITE;
    TYPE ENUMERATED (2)
    {
        { FUNC1_AI_OUT_UNIT__OR_EN_OR_NOT_USED },
        { FUNC1_AI_OUT_UNIT_K },
        { FUNC1_AI_OUT_UNIT__C },
        { FUNC1_AI_OUT_UNIT__F },
        { FUNC1_AI_OUT_UNIT_RK },
        { FUNC1_AI_OUT_UNIT_OHM },
        { FUNC1_AI_OUT_UNIT_MV },
        { FUNC1_AI_OUT_UNIT__PERCENT_ }
    }
    DEFAULT_VALUE 0x07CC;
}
VARIABLE func1_AI_out_decimal_point
{
    LABEL [decimal_point];
    HELP [decimal_point_help];
    CLASS DEVICE;
    HANDLING READ & WRITE;
    TYPE INTEGER (1)
    {
        DEFAULT_VALUE 0;
    }
}
VARIABLE func1_AI_channel
{
    LABEL "|en|AI 1 channel|de|AI 1 Kanal";
    HELP [func_channel_help];
    CLASS DEVICE;
    HANDLING READ & WRITE;
    TYPE ENUMERATED(2)
    {
        { FUNC1_AI_CHANNEL_PV_TRANSDUCER_1 },
        { FUNC1_AI_CHANNEL_SV_TRANSDUCER_1 },
        { FUNC1_AI_CHANNEL_PV_TRANSDUCER_2 },
        { FUNC1_AI_CHANNEL_SV_TRANSDUCER_2 },
        { FUNC1_AI_CHANNEL_RJ_VALUE }
    }
    DEFAULT_VALUE 0x0108;
}
VARIABLE func1_AI_pv_ftime
{
    LABEL [func_pv_ftime];
    HELP [func_pv_ftime_help];
    CLASS DEVICE;
    HANDLING READ & WRITE;
    CONSTANT_UNIT "sec";
    TYPE FLOAT
    {
        MIN_VALUE 0.0;
        MAX_VALUE 120.0;
		DISPLAY_FORMAT ".1f";
		EDIT_FORMAT ".1f";
        DEFAULT_VALUE 0.0;
    }
}
VARIABLE func1_AI_FSafeType
{
    LABEL [func_ao_fsafe_type];
    HELP [func_ao_fsafe_type_help_PROFILE_3];
    CLASS DEVICE;
    HANDLING READ & WRITE;
    TYPE ENUMERATED(1)
    {
        { FUNC1_AI_FSAFETYPE__FUNC_AI_FSAFE_TYPE_FAIL_SAFE_VALUE_ },
        { FUNC1_AI_FSAFETYPE__FUNC_AI_FSAFE_TYPE_STORING_LAST_SETPOINT_ },
        { FUNC1_AI_FSAFETYPE__FUNC_AI_FSAFE_TYPE_FAIL_SAFE_POSITION_ }
    }
    DEFAULT_VALUE 1;
}
VARIABLE func1_AI_FSafeValue
{
    LABEL [func_ai_fsafe_value];
    HELP [func_ai_fsafe_value_help];
    CLASS DEVICE;
    TYPE FLOAT
    {
		MIN_VALUE -1.0e+20 - 0.01;
		MAX_VALUE 1.0e+20 - 0.01;
		DISPLAY_FORMAT func1_AI_DISPLAY_FORMAT(func1_AI_FSafeValue)
        DEFAULT_VALUE 0.0;
    }
    HANDLING IF (func1_AI_FSafeType == 0) 
        { READ & WRITE; }
    ELSE
        { READ; }
}
VARIABLE func1_AI_alarm_hys
{
    LABEL [limit_hysteresis];
    HELP [limit_hysteresis_help];
    CLASS DEVICE;
    HANDLING READ & WRITE;
    TYPE FLOAT
    {
		MIN_VALUE -1.0e+20 - 0.01;
		MAX_VALUE 1.0e+20 - 0.01;
		DISPLAY_FORMAT func1_AI_DISPLAY_FORMAT(func1_AI_alarm_hys)
        DEFAULT_VALUE ((func1_AI_out_upper_range_value - func1_AI_out_lower_range_value) / 100);
    }
}
VARIABLE func1_AI_hi_hi_lim
{
    LABEL [limit_hi_hi];
    HELP [limit_hi_hi_help];
    CLASS DEVICE;
    HANDLING READ & WRITE;
    TYPE FLOAT
    {
		MIN_VALUE -1.0e+20 - 0.01;
		MAX_VALUE 1.0e+20 - 0.01;
		DISPLAY_FORMAT func1_AI_DISPLAY_FORMAT(func1_AI_hi_hi_lim)
		DEFAULT_VALUE 1.0e+20 - 0.01;
    }
}
VARIABLE func1_AI_hi_lim
{
    LABEL [limit_hi];
    HELP [limit_hi_help];
    CLASS DEVICE;
    HANDLING READ & WRITE;
    TYPE FLOAT
    {
		MIN_VALUE -1.0e+20 - 0.01;
		MAX_VALUE 1.0e+20 - 0.01;
		DISPLAY_FORMAT func1_AI_DISPLAY_FORMAT(func1_AI_hi_lim)
        DEFAULT_VALUE FLOAT_MAX;
		DEFAULT_VALUE 1.0e+20 - 0.01;
    }
}
VARIABLE func1_AI_lo_lim
{
    LABEL [limit_lo];
    HELP [limit_lo_help];
    CLASS DEVICE;
    HANDLING READ & WRITE;
    TYPE FLOAT
    {
		MIN_VALUE -1.0e+20 - 0.01;
		MAX_VALUE 1.0e+20 - 0.01;
		DISPLAY_FORMAT func1_AI_DISPLAY_FORMAT(func1_AI_lo_lim)
		DEFAULT_VALUE -1.0e+20 - 0.01;
    }
}
VARIABLE func1_AI_lo_lo_lim
{
    LABEL [limit_lo_lo];
    HELP [limit_lo_lo_help];
    CLASS DEVICE;
    HANDLING READ & WRITE;
    TYPE FLOAT
    {
		MIN_VALUE -1.0e+20 - 0.01;
		MAX_VALUE 1.0e+20 - 0.01;
		DISPLAY_FORMAT func1_AI_DISPLAY_FORMAT(func1_AI_lo_lo_lim)
		DEFAULT_VALUE -1.0e+20 - 0.01;
    }
}
VARIABLE func1_AI_simulate_status_quality
{
    LABEL "|en|AI1 simulation quality|de|AI1 Simulation Qualität";
    HELP [func_simulate_status_help];
    CLASS DEVICE & SERVICE;
    TYPE ENUMERATED (1)
    {
        IF(phys_feature_enabled==0x01000000 && phys_cond_status_diag==1)
        {COND_STATUS_QUALITY}
        ELSE
        {PROFILE_301_QUALITY}
    }
    DEFAULT_VALUE 0;
    HANDLING IF (func1_AI_simulation_enabled == 1) 
        { READ & WRITE; }
    ELSE
        { READ; }
}
VARIABLE func1_AI_simulate_status_limit
{
    LABEL "|en|AI1 simulation status|de|AI1 Simulation  Status";
    HELP [func_simulate_status_help];
    CLASS DEVICE & SERVICE;
    TYPE ENUMERATED (1)
    {
        { FUNC1_AI_SIMULATE_STATUS_LIMIT__STATUS_LIMIT_OK_ },
        { FUNC1_AI_SIMULATE_STATUS_LIMIT__STATUS_LIMIT_UNDERFLOW_ },
        { FUNC1_AI_SIMULATE_STATUS_LIMIT__STATUS_LIMIT_OVERFLOW_ },
        { FUNC1_AI_SIMULATE_STATUS_LIMIT__STATUS_LIMIT_VALUE_CONSTANT_ }
    }
    HANDLING IF (func1_AI_simulation_enabled == 1) 
        { READ & WRITE; }
    ELSE
        { READ; }
}
VARIABLE func1_AI_simulate_value
{
    LABEL "|en|AI1 simulation value|de|AI1 Simulation Wert";
    HELP [func_ai_simulate_value_help];
    CLASS DEVICE & SERVICE;
    TYPE FLOAT
    {
		MIN_VALUE -1.0e+20 - 0.01;
		MAX_VALUE 1.0e+20 - 0.01;
		DISPLAY_FORMAT func1_AI_DISPLAY_FORMAT(func1_AI_simulate_value)
        DEFAULT_VALUE 0.0;
    }
    HANDLING IF (func1_AI_simulation_enabled == 1) 
        { READ & WRITE; }
    ELSE
        { READ; }
}
VARIABLE func1_AI_simulation_enabled
{
    LABEL "|en|AI1 simulation enable|de|AI1 Simulation";
    HELP [func_simulation_enabled_help];
    CLASS DEVICE;
    HANDLING READ & WRITE;
    TYPE ENUMERATED (1)
    {
        { FUNC1_AI_SIMULATION_ENABLED__DISABLED_ },
        { FUNC1_AI_SIMULATION_ENABLED__ENABLED_ }
    }
}
VARIABLE func1_AI_out_unit_text
{
    LABEL [func_out_unit_text];
    HELP [func_out_unit_text_help];
    CLASS DEVICE;
    HANDLING READ & WRITE;
    TYPE ASCII(16);
}

/************************************************************************/
/* COMMAND DEFINITIONS                                                  */
/************************************************************************/


COMMAND read_func1_AI_blk
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 16;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            func1_AI_blk_reserve,
            func1_AI_blk_object,
            func1_AI_blk_parent_class,
            func1_AI_blk_class,
            func1_AI_blk_dd_reference,
            func1_AI_blk_dd_rev,
            func1_AI_blk_profile,
            func1_AI_blk_profile_rev,
            func1_AI_blk_execution_time,
            func1_AI_blk_num_parameters,
            func1_AI_blk_index_view_1,
            func1_AI_blk_num_view_lists
        }
    }
}


COMMAND read_func1_AI_st_rev
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 17;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            func1_AI_st_rev
        }
    }
}


COMMAND read_func1_AI_tag_desc
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 18;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            func1_AI_tag_desc
        }
    }
}


COMMAND write_func1_AI_tag_desc
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 18;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            func1_AI_tag_desc
        }
        REPLY
        {
        }
    }
}


COMMAND read_func1_AI_target_mode
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 21;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            func1_AI_target_mode
        }
    }
}


COMMAND write_func1_AI_target_mode
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 21;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            func1_AI_target_mode
        }
        REPLY
        {
        }
    }
}


COMMAND read_func1_AI_mode
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 22;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            func1_actual_mode,
            func1_permitted_mode,
            func1_normal_mode
        }
    }
}


COMMAND read_func1_AI_alarm
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 23;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            func1_current_state_alarm_sum,
            func1_unacknowledged_state_alarm_sum,
            func1_unreported_state_alarm_sum,
            func1_disabled_state_alarm_sum
        }
    }
}


COMMAND read_func1_AI_out
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 26;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            func1_AI_out_value,
            func1_AI_out_status_quality <0xFC>,
            func1_AI_out_status_limit <0x03>
        }
    }
}


COMMAND write_func1_AI_out
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 26;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            func1_AI_out_value,
            func1_AI_out_status_quality <0xFC>,
            func1_AI_out_status_limit <0x03>
        }
        REPLY
        {
        }
    }
}


COMMAND read_func1_AI_pv
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 27;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            func1_AI_pv_upper_range_value,
            func1_AI_pv_lower_range_value
        }
    }
}


COMMAND write_func1_AI_pv
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 27;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            func1_AI_pv_upper_range_value,
            func1_AI_pv_lower_range_value
        }
        REPLY
        {
        }
    }
}


COMMAND read_func1_AI_out_scale
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 28;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            func1_AI_out_upper_range_value,
            func1_AI_out_lower_range_value,
            func1_AI_out_unit,
            func1_AI_out_decimal_point
        }
    }
}


COMMAND write_func1_AI_out_scale
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 28;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            func1_AI_out_upper_range_value,
            func1_AI_out_lower_range_value,
            func1_AI_out_unit,
            func1_AI_out_decimal_point
        }
        REPLY
        {
        }
    }
}


COMMAND read_func1_AI_channel
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 30;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            func1_AI_channel
        }
    }
}


COMMAND write_func1_AI_channel
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 30;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            func1_AI_channel
        }
        REPLY
        {
        }
    }
}


COMMAND read_func1_AI_pv_ftime
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 32;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            func1_AI_pv_ftime
        }
    }
}


COMMAND write_func1_AI_pv_ftime
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 32;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            func1_AI_pv_ftime
        }
        REPLY
        {
        }
    }
}


COMMAND read_func1_AI_FSafeType
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 33;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            func1_AI_FSafeType
        }
    }
}


COMMAND write_func1_AI_FSafeType
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 33;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            func1_AI_FSafeType
        }
        REPLY
        {
        }
    }
}


COMMAND read_func1_AI_FSafeValue
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 34;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            func1_AI_FSafeValue
        }
    }
}


COMMAND write_func1_AI_FSafeValue
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 34;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            func1_AI_FSafeValue
        }
        REPLY
        {
        }
    }
}


COMMAND read_func1_AI_alarm_hys
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 35;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            func1_AI_alarm_hys
        }
    }
}


COMMAND write_func1_AI_alarm_hys
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 35;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            func1_AI_alarm_hys
        }
        REPLY
        {
        }
    }
}


COMMAND read_func1_AI_hi_hi_lim
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 37;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            func1_AI_hi_hi_lim
        }
    }
}


COMMAND write_func1_AI_hi_hi_lim
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 37;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            func1_AI_hi_hi_lim
        }
        REPLY
        {
        }
    }
}


COMMAND read_func1_AI_hi_lim
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 39;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            func1_AI_hi_lim
        }
    }
}


COMMAND write_func1_AI_hi_lim
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 39;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            func1_AI_hi_lim
        }
        REPLY
        {
        }
    }
}


COMMAND read_func1_AI_lo_lim
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 41;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            func1_AI_lo_lim
        }
    }
}


COMMAND write_func1_AI_lo_lim
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 41;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            func1_AI_lo_lim
        }
        REPLY
        {
        }
    }
}


COMMAND read_func1_AI_lo_lo_lim
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 43;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            func1_AI_lo_lo_lim
        }
    }
}


COMMAND write_func1_AI_lo_lo_lim
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 43;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            func1_AI_lo_lo_lim
        }
        REPLY
        {
        }
    }
}


COMMAND read_func1_AI_simulate
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 50;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            func1_AI_simulate_status_quality <0xFC>,
            func1_AI_simulate_status_limit <0x03>,
            func1_AI_simulate_value,
            func1_AI_simulation_enabled
        }
    }
}


COMMAND write_func1_AI_simulate
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 50;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            func1_AI_simulate_status_quality <0xFC>,
            func1_AI_simulate_status_limit <0x03>,
            func1_AI_simulate_value,
            func1_AI_simulation_enabled
        }
        REPLY
        {
        }
    }
}


COMMAND read_func1_AI_out_unit_text
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 51;
    OPERATION READ;
    TRANSACTION
    {
        REQUEST
        {
        }
        REPLY
        {
            func1_AI_out_unit_text
        }
    }
}


COMMAND write_func1_AI_out_unit_text
{
    SLOT AI1_BLOCK_SLOT;
    INDEX 51;
    OPERATION WRITE;
    TRANSACTION
    {
        REQUEST
        {
            func1_AI_out_unit_text
        }
        REPLY
        {
        }
    }
}


/*************************************************************
** UNIT RELATIONS
*************************************************************/


UNIT unit_relation_func1_AI_out_unit
{
	func1_AI_out_unit:
		func1_AI_out_value,
		func1_AI_out_upper_range_value,
		func1_AI_out_lower_range_value,
		func1_AI_FSafeValue,
		func1_AI_alarm_hys,
		func1_AI_hi_hi_lim,
		func1_AI_hi_lim,
		func1_AI_lo_lim,
		func1_AI_lo_lo_lim,
}
