#ifndef _ECATGLOBALS_H_
#define _ECATGLOBALS_H_
#ifndef _ECATDEVICEAPI_H_
#include "EcatDeviceAPI.h"
#endif


#define ECAT_IPC_DATA_SIZE_MAX		512
#define ECAT_IPC_32_DATA_SIZE_MAX		128
#define ECAT_IPC_SHM_ALIGN			4  
#define ECAT_IPC_TIMEOUT_NS			60000000
#define ECAT_IPC_INT_TIMEOUT_NS		60000000
#define ECAT_IPC_POLLING_NS			25000
#define ECAT_IPC_PROFILE_DATA_SIZE_MAX		64
#define ECAT_IPC_RW_DOUBLE_DATA_SIZE_MAX		64

#define NSEC_PER_USEC 1000
#define NSEC_PER_MSEC 1000000

#define MC_LINE_MODE_PV			0
#define MC_LINE_MODE_PT			1
#define MC_LINE_MODE_PVT		2
#define MC_LINE_MODE_P2P		3
#define MC_LINE_MODE_PTT		4
#define MC_LINE_MODE_PPT		5
#define MC_LINE_MODE_PTA		6

#define MC_CIRC_MODE_CP_ANGLE	0  //Center Point, Angle
#define MC_CIRC_MODE_CP_EP      1  //Center Point, End Point
#define MC_CIRC_MODE_BP_EP      2  //Border Point, End Point

#define MC_ECAM_TABLE_NO_MAX  16
#define MC_ECAM_TABLE_DATA_MAX  1000

#define MC_FUNC_INHIBIT_AXIS_CNT  32

#define MIN(m,n) ((m) < (n) ? (m) : (n))
#define MAX(m,n) ((m) > (n) ? (m) : (n))

#define NSEC_PER_SEC 				1000000000
#define CHECK_MC_PROFILE_NO(a)				if(a >= MC_PROFILE_NO_MAX) return ECAT_ERR_MC_INVALID_PROFILE_NO;

#define EV_CMP_ACT_POS			0 // Actual Position
#define EV_CMP_CMD_POS			1 // Command Position
#define EV_CMP_MC_STA			0 // Axis state
#define EV_CMP_VEL_STA			1 // Velocity state
#ifdef __GNUC__
#define OS_ALIGN_SYNTAX  __attribute__((aligned(ECAT_IPC_SHM_ALIGN)))
#else //virtual studio
#define OS_ALIGN_SYNTAX __declspec(align(ECAT_IPC_SHM_ALIGN)) 
#endif

/*****************************************************************************/
/** Eca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_AIO,
	ECAT_IPC_CMD_SLAVE_ENC,
	ECAT_IPC_CMD_GET_FIRWARE_VERSION,
	ECAT_IPC_CMD_MC_GROUP_MOVE_BLENDING_SYNC,
	ECAT_IPC_CMD_MC_GROUP_MOVE_DO,
	ECAT_IPC_CMD_MC_SET_AXIS_TOUCH_PROBE,
	ECAT_IPC_CMD_MC_GET_AXIS_TOUCH_PROBE,
	ECAT_IPC_CMD_MC_GET_AXIS_TOUCH_PROBE_VALUE,
	ECAT_IPC_CMD_NONBLOCK_SDO_REQ_READ,
	ECAT_IPC_CMD_NONBLOCK_SDO_REQ_READ_STATE,
	ECAT_IPC_CMD_NONBLOCK_SDO_REQ_WRITE,
	ECAT_IPC_CMD_NONBLOCK_SDO_REQ_WRITE_STATE,
	ECAT_IPC_CMD_MC_GET_RECORD_STATE,
	ECAT_IPC_CMD_MC_SET_RECORD,
	ECAT_IPC_CMD_MC_DOWNLOAD_MOTION_LOG,
	ECAT_IPC_CMD_SET_STEWART_PLATFORM,
	ECAT_IPC_CMD_MC_GET_AXIS_ACT_POS_VEL,
	ECAT_IPC_CMD_MC_GET_AXIS_MOTION_STATE,
	ECAT_IPC_CMD_MC_AXIS_STOP_PLC,
	ECAT_IPC_CMD_PLC_RESERVED_1,
	ECAT_IPC_CMD_MC_GROUP_STOP_PLC,	
	ECAT_IPC_CMD_MC_ACTION_PLC,
	ECAT_IPC_CMD_MC_AXIS_HATL,
	ECAT_IPC_CMD_MC_SET_AXIS_ABORTING_MODE,
	ECAT_IPC_CMD_SET_PID_SET_POINT_VALUE,
	ECAT_IPC_CMD_GET_PID_OUTPUT_VALUE,
	ECAT_IPC_CMD_SET_PID_PARAMETER,
	ECAT_IPC_CMD_SET_PID_STATUS,
	ECAT_IPC_CMD_SET_PID_SIMULATE,
	ECAT_IPC_CMD_SET_PID_CONTROLLER,
	ECAT_IPC_CMD_SET_PID_PROCESS_VARIABLE_MODULE,
	ECAT_IPC_CMD_SET_PID_CONTROL_OUTPUT_MODULE,
	ECAT_IPC_CMD_GET_PID_PARAMETER,
	ECAT_IPC_CMD_GET_PID_STATUS,
	ECAT_IPC_CMD_GET_PID_SIMULATE,
	ECAT_IPC_CMD_GET_PID_CONTROLLER,
	ECAT_IPC_CMD_GET_PID_PROCESS_VARIABLE_MODULE,
	ECAT_IPC_CMD_GET_PID_CONTROL_OUTPUT_MODULE,
	ECAT_IPC_CMD_GET_PID_PROCESS_VARIABLE_VALUE,
	ECAT_IPC_CMD_GET_PID_SIMULATE_FEEDBACK,
	ECAT_IPC_CMD_GET_PID_SET_POINT_VALUE,
	ECAT_IPC_CMD_GET_PID_IN_OUT_VALUE,
	ECAT_IPC_CMD_SET_TIMER,
	ECAT_IPC_CMD_MC_SET_AXIS_FEEDFORWARD_GAIN,
	ECAT_IPC_CMD_MC_GET_AXIS_FEEDFORWARD_GAIN,
	ECAT_IPC_CMD_MC_AXIS_MOVE_PROFILE_CSV,
	ECAT_IPC_CMD_MC_GROUP_MOVE_PROFILE_CSV,
	ECAT_IPC_CMD_MC_SET_PROFILE_CSV,
	ECAT_IPC_CMD_MC_GET_PROFILE_CSV,
	ECAT_IPC_CMD_MC_STEWART_PLATFORM_MOVE_ABS_PT,
	ECAT_IPC_CMD_MC_SET_GROUP_VEL_LIMIT_STATUS,
	ECAT_IPC_CMD_MC_GET_GROUP_VEL_LIMIT_STATUS,
	ECAT_IPC_CMD_MC_SET_GROUP_VEL_LIMIT_VALUE,
	ECAT_IPC_CMD_MC_GET_GROUP_VEL_LIMIT_VALUE,
	ECAT_IPC_CMD_MC_SET_RECORD_PARAM,
	ECAT_IPC_CMD_MC_GET_RECORD_PARAM,
	ECAT_IPC_CMD_MC_GET_RECORD_VALUE,
	ECAT_IPC_CMD_MC_CLEAR_RECORD,
	ECAT_IPC_CMD_MC_SET_AXIS_SOFTWARE_LIMIT,
	ECAT_IPC_CMD_MC_GET_AXIS_SOFTWARE_LIMIT,
	ECAT_IPC_CMD_MC_AXIS_TANGENT_IN_GROUP,
	ECAT_IPC_CMD_GET_PROCESS_TIME,
	ECAT_IPC_CMD_MC_SET_GROUP_HOLD,
	ECAT_IPC_CMD_MC_SET_AXIS_POS_SW_STATUS,
	ECAT_IPC_CMD_MC_GET_AXIS_POS_SW_STATUS,
	ECAT_IPC_CMD_MC_GET_AXIS_HOME_STATE,
	ECAT_IPC_CMD_WRITE_MAX_AXIS_CNT,
	ECAT_IPC_CMD_MC_AXIS_GANTRY_IN,
	ECAT_IPC_CMD_MC_AXIS_CAM_PHASE_SHIFT,
	ECAT_IPC_CMD_MC_AXIS_GANTRY_MAX_POS_DIFF,
	ECAT_IPC_CMD_MC_AXIS_GANTRY_MAX_POS_DIFF_STATUS,
	ECAT_IPC_CMD_EV_CREATE_EVENT,
	ECAT_IPC_CMD_EV_CLOSE_EVENT,
	ECAT_IPC_CMD_EV_ENABLE_EVENT,
	ECAT_IPC_CMD_EV_DISABLE_EVENT,
	ECAT_IPC_CMD_EV_SET_COMPARE_POSITION_PARAMETERS,
    ECAT_IPC_CMD_EV_SET_COMPARE_DIBIT_PARAMETERS,
    ECAT_IPC_CMD_EV_SET_MOTION_COMPLETE_PARAMETERS,
   	ECAT_IPC_CMD_MC_GROUP_MOVE_AO,
	ECAT_IPC_CMD_MC_GET_STATES_PLC,
    ECAT_IPC_CMD_MC_SET_GROUP_ACC_TIME_EX,
    ECAT_IPC_CMD_MC_SET_GROUP_BLENDING_PERCENT,
    ECAT_IPC_CMD_MC_SET_PROFILE_INTERVAl,
   	ECAT_IPC_CMD_MC_AXIS_MOVE_SUPERIMPOSED,
   	ECAT_IPC_CMD_MC_AXIS_HALT_SUPERIMPOSED,
   	ECAT_IPC_CMD_MC_GET_RECORD_VALUE_EX,
   	ECAT_IPC_CMD_SET_HEARTBEAT,
   	ECAT_IPC_CMD_SET_HEARTBEAT_STATUS,
    ECAT_IPC_CMD_MC_SET_GROUP_BLENDING_PERCENT_EX,
    ECAT_IPC_CMD_EV_SET_COMPARE_DI_PARAMETERS,
    ECAT_IPC_CMD_MC_SET_GROUP_PAUSE,
    ECAT_IPC_CMD_EV_SET_COMPARE_AXIS_STATE_PARAMETERS,
    ECAT_IPC_CMD_MC_AXIS_HOME_EX,
    ECAT_IPC_CMD_EV_SET_COMPARE_COMMAND_POSITION_PARAMETERS,
    ECAT_IPC_CMD_EV_SET_COMPARE_AXIS_VEL_STATE_PARAMETERS,
	ECAT_IPC_CMD_MC_GROUP_MOVE_VEL,
	ECAT_IPC_CMD_MC_GET_GROUP_AXIS_NO,
	ECAT_IPC_CMD_MC_GET_GROUP_LAST_ERROR,
	ECAT_IPC_CMD_MC_GROUP_ERROR_RESET,
	ECAT_IPC_CMD_MC_GET_GROUP_MOTION_STATE,
	ECAT_IPC_CMD_MC_GET_GROUP_AXES_ACT_POS,
	ECAT_IPC_CMD_MC_GET_GROUP_AXES_ACT_VEL,
    ECAT_IPC_CMD_ST_SET_AXIS_STICK_CONTROL_ENABLE,
    ECAT_IPC_CMD_ST_SET_AXIS_BREAKOUT_FORCE,
    ECAT_IPC_CMD_ST_SET_AXIS_OPERATION_RANGE,
    ECAT_IPC_CMD_ST_SET_AXIS_COULOMB_FORCE,
    ECAT_IPC_CMD_ST_SET_AXIS_CONTROL_MODE,
    ECAT_IPC_CMD_ST_SET_AXIS_END_STOP,
    ECAT_IPC_CMD_ST_SET_AXIS_GRADIENT_MULTIPLIER,
    ECAT_IPC_CMD_ST_SET_AXIS_REFERENCE_MODEL_MBK,
    ECAT_IPC_CMD_ST_SET_AXIS_REFERENCE_MODEL_MZETAWN,
    ECAT_IPC_CMD_ST_SET_AXIS_GRADIENT_ZONE_RATIO,
    ECAT_IPC_CMD_ST_SET_AXIS_GRADIENT_POSITIVE,
    ECAT_IPC_CMD_ST_SET_AXIS_GRADIENT_NEGATIVE,
    ECAT_IPC_CMD_ST_SET_AXIS_FORCE_LIMIT,
    ECAT_IPC_CMD_ST_SET_AXIS_FORCE_DEAD_ZONE,
    ECAT_IPC_CMD_ST_GET_AXIS_FORCE_ERROR,
    ECAT_IPC_CMD_ST_SET_AXIS_MAX_VELOCITY,
    ECAT_IPC_CMD_ST_SET_AXIS_MAX_ACCELERATION,
    ECAT_IPC_CMD_ST_SET_AXIS_SENSOR_PARAMETERS,
    ECAT_IPC_CMD_ST_SET_AXIS_SENSOR_MAX_VOLTAGE,
    ECAT_IPC_CMD_ST_SET_AXIS_SENSOR_MAX_TORQUE,
    ECAT_IPC_CMD_ST_SET_AXIS_OPERATION_RANGE_MARGIN,
    ECAT_IPC_CMD_ST_SET_AXIS_TRIM_NEUTRAL_POSITION,
    ECAT_IPC_CMD_ST_SET_AXIS_CONTROL_MODE_DEFAULT,
    ECAT_IPC_CMD_ST_SET_AXIS_CONTROL_MODE0_PARAMETERS,
    ECAT_IPC_CMD_ST_SET_AXIS_TRIM_ENABLE,
    ECAT_IPC_CMD_ST_SET_AXIS_TRIM_OFFSET,
    ECAT_IPC_CMD_ST_GET_AXIS_TRIM_OFFSET,
    ECAT_IPC_CMD_ST_GET_TRIM_STATE,
    ECAT_IPC_CMD_ST_SET_AXIS_TRIM_RELEASE,
    ECAT_IPC_CMD_ST_SET_STICK_LINKING,
    ECAT_IPC_CMD_ST_GET_AXIS_MODEL_V,
    ECAT_IPC_CMD_ST_GET_AXIS_MODEL_A,
    ECAT_IPC_CMD_ST_SET_AXIS_FORCE_AVERAGE_TIME,
    ECAT_IPC_CMD_ST_SET_AXIS_FORCE_FILTER_TIME_CONSTANT,
    ECAT_IPC_CMD_ST_GET_AXIS_TRIP_STATE,
    ECAT_IPC_CMD_ST_SET_AXIS_AD_TRIP_LEVEL,
    ECAT_IPC_CMD_ST_SET_AXIS_POSITION_ERROR_TRIP_LEVEL,
    ECAT_IPC_CMD_ST_SET_AXIS_ACCELERATION_TRIP_LEVEL,
    ECAT_IPC_CMD_ST_SET_AXIS_VELOCITY_TRIP_LEVEL,
    ECAT_IPC_CMD_ST_SET_AXIS_FORCE_TRIP_LEVEL,
    ECAT_IPC_CMD_ST_SET_AXIS_POSITIVE_TRAVEL_TRIP_LEVEL,
    ECAT_IPC_CMD_ST_SET_AXIS_NEGATIVE_TRAVEL_TRIP_LEVEL,
    ECAT_IPC_CMD_ST_SET_AXIS_POWER_TRIP_LEVEL,
    ECAT_IPC_CMD_ST_SET_FORCE_GAIN,
    ECAT_IPC_CMD_ST_SET_AXIS_POSITION_GAIN,
    ECAT_IPC_CMD_ST_SET_AXIS_SHAKER_ACTIVATE_MODE,
    ECAT_IPC_CMD_ST_SET_SHAKER_PARAMETERS,
    ECAT_IPC_CMD_ST_SET_AXIS_AEROFORCE_PARAMETERS,
    ECAT_IPC_CMD_ST_SET_HOST_INPUT_FORCE,
    ECAT_IPC_CMD_ST_SET_AXIS_FORCE_OFFSET,
    ECAT_IPC_CMD_ST_GET_AXIS_FORCE,
    ECAT_IPC_CMD_ST_GET_LINK_STATE,
    ECAT_IPC_CMD_ST_SET_AXIS_FORCE_SENSOR_DIRECTION,
    ECAT_IPC_CMD_ST_SET_AXIS_AP_TRIM_SWITCH,
    ECAT_IPC_CMD_ST_SET_AXIS_AP_VELOCITY,
    ECAT_IPC_CMD_ST_SET_AXIS_TRIM_VELOCITY,
    ECAT_IPC_CMD_ST_SET_AXIS_TRIM_INIT_POSITION,
    ECAT_IPC_CMD_ST_SET_AXIS_AP_FORCE_OVERRIDE,
    ECAT_IPC_CMD_ST_SET_AXIS_AP_TRIM_SWITCH_PARAMETERS,
    ECAT_IPC_CMD_ST_GET_AXIS_CALCULATED_FORCE,
    ECAT_IPC_CMD_ST_MOVE_TRIM_POSITION,
    ECAT_IPC_CMD_ST_GET_AXIS_AI,
    ECAT_IPC_CMD_MC_SET_AXIS_MAX_VELOCITY,
    ECAT_IPC_CMD_MC_GET_AXIS_MAX_VELOCITY,
    ECAT_IPC_CMD_MC_AXIS_MOVE_ABS_P2P,
    ECAT_IPC_CMD_MC_AXIS_MOVE_REL_P2P,
    ECAT_IPC_CMD_EV_SET_COMPARE_AI_PARAMETERS,
    ECAT_IPC_CMD_MC_SET_AXIS_TORQUE_GAIN,
	ECAT_IPC_CMD_MC_GET_AXIS_TORQUE_GAIN,
	ECAT_IPC_CMD_MC_GET_AXIS_RATED_TORQUE,
	ECAT_IPC_CMD_MC_AXIS_MOVE_TOR,
    ECAT_IPC_CMD_MC_GET_AXIS_ACTUAL_TORQUE,
    ECAT_IPC_CMD_MC_SET_AXIS_MAX_TORQUE,
    ECAT_IPC_CMD_MC_GET_AXIS_MAX_TORQUE,
	ECAT_IPC_CMD_UPDATE_WHEEL_CONTROL_LIB,
    ECAT_IPC_CMD_GET_WHEEL_CONTROL_LIB_VERSION,
	ECAT_IPC_CMD_MC_GET_AXIS_CMD_VEL,
	ECAT_IPC_CMD_MC_GET_GROUP_AXES_CMD_POS,
	ECAT_IPC_CMD_MC_GET_GROUP_AXES_CMD_VEL,
	ECAT_IPC_CMD_MC_MOVE_PATH_CTRL_ACTION,
	ECAT_IPC_CMD_MC_MOVE_ADV,
    ECAT_IPC_CMD_ST_SET_AXIS_PARAMETERS,
    ECAT_IPC_CMD_ST_GET_AXIS_PARAMETERS,
    ECAT_IPC_CMD_ST_SET_AXIS_GRADIENT_MULTIPLIER_EX,
    ECAT_IPC_CMD_ST_SET_AXIS_GRADIENT_ZONE_RATIO_EX,
    ECAT_IPC_CMD_ST_SET_AXIS_GRADIENT_POSITIVE_EX,
    ECAT_IPC_CMD_ST_SET_AXIS_GRADIENT_NEGATIVE_EX,
    ECAT_IPC_CMD_ST_SET_AXIS_CAR_SPEED,
    ECAT_IPC_CMD_ST_SET_AXIS_COULOMB_FORCE_EX,
    ECAT_IPC_CMD_ST_SET_AXIS_FORCE_FILTER_CITOFF_FREQ,
    ECAT_IPC_CMD_ST_SET_AXIS_BACKLASH_PARAMETERS,
    ECAT_IPC_CMD_ST_SET_AXIS_BACKLASH_ENABLE,
    ECAT_IPC_CMD_ST_GET_AXIS_MODEL_X,
	ECAT_IPC_CMD_MC_MOVE_CIA402_PROFILE_MODE,
	ECAT_IPC_CMD_UPDATE_FIRMWARE_,
    ECAT_IPC_CMD_SET_TX_BUFFER_PARAM,
    ECAT_IPC_CMD_GET_TX_BUFFER_PARAM,
    ECAT_IPC_CMD_SET_TX_BUFFER_ENABLE,
    ECAT_IPC_CMD_GET_TX_BUFFER_ENABLE,
    ECAT_IPC_CMD_GET_TX_BUFFER_VALUE,
    ECAT_IPC_CMD_MC_SET_AXIS_HOME_TORQUE,
    ECAT_IPC_CMD_MC_GET_AXIS_HOME_TORQUE,
    ECAT_IPC_CMD_SET_AI_FILTER_PARAM,
    ECAT_IPC_CMD_GET_AI_FILTER_PARAM,
    ECAT_IPC_CMD_SET_AI_FILTER_ENABLE,
    ECAT_IPC_CMD_GET_AI_FILTER_ENABLE,
    ECAT_IPC_CMD_SET_AI_FILTER_FREQUENCY,
    ECAT_IPC_CMD_GET_AI_FILTER_FREQUENCY,
    ECAT_IPC_CMD_GET_AI_FILTER_OUTPUT,
    ECAT_IPC_CMD_SET_PDO_I2O_PARAM,
    ECAT_IPC_CMD_GET_PDO_I2O_PARAM,
    ECAT_IPC_CMD_SET_PDO_I2O_COEFF,
    ECAT_IPC_CMD_GET_PDO_I2O_COEFF,
    ECAT_IPC_CMD_SET_PDO_I2O_ENABLE,
    ECAT_IPC_CMD_GET_PDO_I2O_ENABLE,
    ECAT_IPC_CMD_MC_GROUP_MOVE_SHAKER,
    ECAT_IPC_CMD_ST_SET_AXIS_TOR_GEEDFORWARD_GAIN,
    ECAT_IPC_CMD_ST_SET_AXIS_TOR_COMPENSATION,
    ECAT_IPC_CMD_MC_STEWART_PLATFORM_SHAKER,
    ECAT_IPC_CMD_MC_STEWART_PLATFORM_SHAKER_STOP,
    ECAT_IPC_CMD_ST_SET_AXIS_CABLE_MODEL_MZETAWN,
    ECAT_IPC_CMD_MC_AXIS_MOVE_VEL_SHAKER,
    ECAT_IPC_CMD_ST_SET_AXIS_FWD_PARAMETERS,
    ECAT_IPC_CMD_ST_GET_AXIS_FWD_MODEL_X,
    ECAT_IPC_CMD_ST_GET_AXIS_FWD_MODEL_V,
    ECAT_IPC_CMD_ST_GET_AXIS_FWD_MODEL_A,
    ECAT_IPC_CMD_ST_SET_AXIS_AFT_PARAMETERS,
    ECAT_IPC_CMD_ST_SET_AXIS_CABLE_PARAMETERS,
    ECAT_IPC_CMD_ST_SET_AXIS_GCOMPENSATE_PARAMETERS,
    ECAT_IPC_CMD_MC_AXIS_GANTRY_GAIN,
    ECAT_IPC_CMD_SET_SLAVE_ALIAS,
    ECAT_IPC_CMD_GET_SLAVE_SW_ALIAS,
    ECAT_IPC_CMD_SET_SLAVE_NO_TYPE,
    ECAT_IPC_CMD_GET_SLAVE_NO_TYPE,
    ECAT_IPC_CMD_GET_SLAVE_POS,
    ECAT_IPC_CMD_GET_SLAVE_NO,
    ECAT_IPC_CMD_ST_SET_AXIS_AI_OFFSET,
    ECAT_IPC_CMD_EV_SET_MOTION_COMPLETE_PARAMETERS_GRP,
    ECAT_IPC_CMD_MC_SET_GROUP_PVT_DEC_ENABLE,
    ECAT_IPC_CMD_MC_GET_GROUP_PVT_DEC_ENABLE,
    ECAT_IPC_CMD_ST_SET_AXIS_HYDRAULIC_AFT_PARAMETERS,
    ECAT_IPC_CMD_ST_SET_AXIS_VALVE_PARAMETERS,
    ECAT_IPC_CMD_ST_SET_AXIS_BOOST_GRADIENT_MULTIPLIER,
    ECAT_IPC_CMD_ST_SET_AXIS_BOOST_GRADIENT_ZONE_RATIO,
    ECAT_IPC_CMD_ST_SET_AXIS_BOOST_GRADIENT,
    ECAT_IPC_CMD_ST_SET_AXIS_AFT_MODEL_MODE,
    ECAT_IPC_CMD_ST_SET_AXIS_HOST_FORCE_TEST,
    ECAT_IPC_CMD_ST_SET_AXIS_LATERALFORCE_PARAMETERS,
    ECAT_IPC_CMD_ST_SET_AXIS_BOOST_GRADIENT_ZONE_FORCE,
    ECAT_IPC_CMD_ST_SET_AXIS_SIM_POS_SINWAVE,
    ECAT_IPC_CMD_MC_SET_GROUP_COORDINATE,
    ECAT_IPC_CMD_GET_DEBUG_MSG,
    ECAT_IPC_CMD_MC_SET_GROUP_COORDINATE_LIMIT,
    ECAT_IPC_CMD_MC_GET_GROUP_COORDINATE_LIMIT,
    ECAT_IPC_CMD_MC_SET_AXIS_DI_ACTIVE_LEVEL,
    ECAT_IPC_CMD_MC_GET_AXIS_DI_ACTIVE_LEVEL,
    ECAT_IPC_CMD_MC_GET_AXIS_DI_60FD,
    ECAT_IPC_CMD_MC_SET_AXIS_HOME_DIR_HONTECH,
    ECAT_IPC_CMD_MC_GET_AXIS_HOME_DIR_HONTECH,
    ECAT_IPC_CMD_MC_SET_AXIS_LIMIT_AS_HOME_STEPPER,
    ECAT_IPC_CMD_MC_GET_AXIS_LIMIT_AS_HOME_STEPPER,
    ECAT_IPC_CMD_MC_SET_AXIS_HOME_LOGIC_HONTECH,
    ECAT_IPC_CMD_MC_GET_AXIS_HOME_LOGIC_HONTECH,
    ECAT_IPC_CMD_MC_SET_AXIS_ACTUAL_POSITION,
    ECAT_IPC_CMD_MC_SET_AXIS_COMMAND_POSITION,
    ECAT_IPC_CMD_MC_GET_AXIS_DI_HONTECH,
    ECAT_IPC_CMD_MC_SET_AXIS_HOMEEXTDIST,
    ECAT_IPC_CMD_MC_GET_AXIS_HOMEEXTDIST,
    ECAT_IPC_CMD_ST_GET_AXIS_FWD_MODEL_J,
    ECAT_IPC_CMD_ST_SET_AXIS_MAX_JERK,
    ECAT_IPC_CMD_MC_SET_AXIS_ACC_DEC_TIME_STEPPER,
	ECAT_IPC_CMD_MC_GET_AXIS_ACC_DEC_TIME_STEPPER,
    ECAT_IPC_CMD_ST_SET_GRP_LINK,
    ECAT_IPC_CMD_GET_DEVICE_STATE_EX,
    ECAT_IPC_CMD_UPLOAD_EC_GENERIC,
    ECAT_IPC_CMD_UPLOAD_EC_MASTER,
    ECAT_IPC_CMD_NONBLOCK_ERR_READ_REQ,
    ECAT_IPC_CMD_NONBLOCK_ERR_READ_STATE,
    ECAT_IPC_CMD_NONBLOCK_ERR_CLR_REQ,
    ECAT_IPC_CMD_NONBLOCK_ERR_CLR_STATE,
    ECAT_IPC_CMD_DOWNLOAD_SYSLOG,
    ECAT_IPC_CMD_GET_SLAVE_REG_ERR,
    ECAT_IPC_CMD_MC_GET_AXIS_HOMEPOS_HONTECH,
    ECAT_IPC_CMD_GET_SLAVE_ENC_LATCH_BUFFER,
    ECAT_IPC_CMD_MC_SET_AXIS_ACC_UNIT_STEPPER,
    ECAT_IPC_CMD_MC_GET_AXIS_ACC_UNIT_STEPPER,
    ECAT_IPC_CMD_MC_SET_AXIS_VEL_ACC_SCALE,
    ECAT_IPC_CMD_MC_GET_AXIS_VEL_ACC_SCALE,
    ECAT_IPC_CMD_MC_SET_AXIS_INP_SIGNAL,
    ECAT_IPC_CMD_MC_GET_AXIS_INP_SIGNAL,
    ECAT_IPC_CMD_UPLOAD_IXECAT,
    ECAT_IPC_CMD_UPLOAD_IXPCIECAT,
    ECAT_IPC_CMD_MC_SET_AXIS_INP_COMPARE,
    ECAT_IPC_CMD_MC_GET_AXIS_INP_COMPARE,
	ECAT_IPC_CMD_WRITE_SPEC,
    ECAT_IPC_CMD_MC_SET_AXIS_INP_TIMEOUT,
    ECAT_IPC_CMD_MC_GET_AXIS_INP_TIMEOUT,
    ECAT_IPC_CMD_MC_SET_AXIS_WAN_ERR,
    ECAT_IPC_CMD_MC_GET_AXIS_WAN_ERR,
    ECAT_IPC_CMD_SET_IXECAT_VIR,
    ECAT_IPC_CMD_GET_IXECAT_VIR,
    ECAT_IPC_CMD_SET_MULTI_SLAVE_DO,
    ECAT_IPC_CMD_GET_MULTI_SLAVE_DO,
    ECAT_IPC_CMD_MC_SET_AXIS_DEFAULTMODE,
    ECAT_IPC_CMD_MC_GET_AXIS_DEFAULTMODE,
    ECAT_IPC_CMD_SET_IGNORE_WC,
    ECAT_IPC_CMD_GET_IGNORE_WC,
    ECAT_IPC_CMD_SET_IGH_VIR,
    ECAT_IPC_CMD_GET_IGH_VIR,
    ECAT_IPC_CMD_UPLO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AT_IPC_CMD_MC_SET_IMPACT_GAIN,
	ECAT_IPC_CMD_MC_SET_IMPACT_FADETIME,
	ECAT_IPC_CMD_MC_SET_IMPACT_FREQ,
	ECAT_IPC_CMD_MC_SET_IMPACT_DAMP,
	ECAT_IPC_CMD_MC_SET_IMPACT,
	ECAT_IPC_CMD_MC_AXIS_HOME_SERVOTRONIX,
	ECAT_IPC_CMD_MC_SET_AXIS_POS_SERVOTRONIX,
	ECAT_IPC_CMD_MC_AXIS_GANTRYOUT,
	ECAT_IPC_CMD_SET_SLAVE_STATE,
	ECAT_IPC_CMD_GET_SLAVE_FOE_STATE,
	ECAT_IPC_CMD_MC_AXIS_TANGENT_OUT,
	ECAT_IPC_CMD_MC_AXIS_MOVE_VEL_EX,
	ECAT_IPC_CMD_MC_AXIS_MOVE_TOR_EX,
	ECAT_IPC_CMD_MC_AXIS_GEAR_IN_BY_POS,
} ecat_ipc_cmd_code_t;
/*****************************************************************************/
/** EcaDevice slave DI/DO run mode
*/
typedef enum {
	SLAVE_DIO_RM_GET_DI,
	SLAVE_DIO_RM_GET_DI_BIT,
	SLAVE_DIO_RM_GET_DO,
	SLAVE_DIO_RM_GET_DO_BIT,
	SLAVE_DIO_RM_SET_DO,
	SLAVE_DIO_RM_SET_DO_BIT,
} ecat_slave_dio_run_mode_t;
/*****************************************************************************/
/** EcaDevice slave AI/AO run mode
*/
typedef enum {
	SLAVE_AIO_RM_SET_AO_PROPERTY,
	SLAVE_AIO_RM_GET_AO_PROPERTY,
	SLAVE_AIO_RM_SET_AO_RAW_DATA,
	SLAVE_AIO_RM_SET_AO_VOLT_DATA,
	SLAVE_AIO_RM_GET_AO_DATA,
	SLAVE_AIO_RM_SET_AI_PROPERTY,
	SLAVE_AIO_RM_GET_AI_PROPERTY,
	SLAVE_AIO_RM_GET_AI_RAW_DATA,
	SLAVE_AIO_RM_GET_AI_VOLT_DATA,
	SLAVE_AIO_RM_GET_AI_mA_DATA,

} ecat_slave_aio_run_mode_t;
/*****************************************************************************/
/** EcaDevice slave encoder counter run mode
*/
typedef enum {
	SLAVE_ENC_RM_SET_ENC_PROPERTY,
	SLAVE_ENC_RM_GET_ENC_PROPERTY,
	SLAVE_ENC_RM_GET_ENC_CNT,
	SLAVE_ENC_RM_RESET_ENC_CNT,
	SLAVE_ENC_RM_SET_ENC_IDX_LATCH_PROPERTY,
	SLAVE_ENC_RM_GET_ENC_IDX_LATCH_PROPERTY,
	SLAVE_ENC_RM_GET_ENC_IDX_LATCH_CNT,
	SLAVE_ENC_RM_SET_ENC_CNT,
	SLAVE_ENC_RM_RESET_ENC_IDX_LATCH_CNT,
	SLAVE_ENC_RM_SET_ENC_EXT_LATCH_PROPERTY,
	SLAVE_ENC_RM_GET_ENC_EXT_LATCH_PROPERTY,
	SLAVE_ENC_RM_GET_ENC_EXT_LATCH_CNT,	
	SLAVE_ENC_RM_RESET_ENC_EXT_LATCH_CNT,
	SLAVE_ENC_RM_SET_CMP_TRIG_PROPERTY,
	SLAVE_ENC_RM_GET_CMP_TRIG_PROPERTY,
	SLAVE_ENC_RM_SET_CMP_TRIG_DATA,
	SLAVE_ENC_RM_SET_CONT_CMP_TRIG_DATA,
	SLAVE_ENC_RM_SET_ARR_CMP_TRIG,
    SLAVE_ENC_RM_SET_LATCH_BUFFER_ENABLE,
	SLAVE_ENC_RM_GET_LATCH_BUFFER_ENABLE,
	SLAVE_ENC_RM_GET_LATCH_BUFFER,
	SLAVE_ENC_RM_CLEAR_LATCH_BUFFER,

} ecat_slave_enc_run_mode_t;
/*****************************************************************************/
/** Group move helix type
*/
typedef enum {
    MC_GRP_NOT_MOVE_HELIX = 0,
    MC_GRP_MOVE_NORMAL_HELIX,
    MC_GRP_MOVE_CONICAL_HELIX,
}mc_group_move_helix_type_t;
/*****************************************************************************/
/** Move path control action
*/
typedef enum {
	MC_MPCA_ADD_DATA,
	MC_MPCA_SET_DATA,
	MC_MPCA_GET_DATA,
	MC_MPCA_CLEAR_DATA,
	MC_MPCA_GET_DATA_SIZE,
	MC_MPCA_MOVING,
} mc_move_path_ctrl_action_t;
/*****************************************************************************/
/** Move CiA402 profile mode (PP, PV, PT)
*/
typedef enum {
	CIA402_PROFILE_POSITION = 1,
	CIA402_PROFILE_VOLOCITY = 3,
	CIA402_PROFILE_TORQUE = 4,	
} cia402_profile_mode_type_t;
/*****************************************************************************/
/** Motion control PLC state type
*/
typedef enum {	
	MC_PLC_ST_AXIS_STATES,
	MC_PLC_ST_AXIS_CMD_STATE,
	MC_PLC_ST_AXIS_INFO,	
	MC_PLC_ST_GROUP_CMD_STATE,
	MC_PLC_ST_GROUP_SERVO_ON,
	MC_PLC_ST_GROUP_STATES,
	MC_PLC_ST_AXIS_GROUP_STATES,
} ecat_mc_plc_action_type_t;
/*****************************************************************************/
/** Motion control PLC action type
*/
typedef enum {	
	MC_PLC_AT_AXIS_MOVE,
	MC_PLC_AT_AXIS_HOME,
	MC_PLC_AT_AXIS_MOVE_VEL,
	MC_PLC_AT_SET_AXIS_CMD_BUFFER_MAX,
	MC_PLC_AT_GRP_MOVE_LINE,
	MC_PLC_AT_GRP_MOVE_CIRC,
	MC_PLC_AT_GRP_MOVE_HELIX,
	MC_PLC_AT_GRP_MOVE_CONICAL_HELIX,
	MC_PLC_AT_SET_GRP_CMD_BUFFER_MAX,
} ecat_mc_plc_state_type_t;
/*****************************************************************************/
#pragma pack(push,4)
typedef struct OS_ALIGN_SYNTAX ecat_ipc_base_ops {
	uint16_t	No;
}ecat_ipc_base_ops_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_firmware_info {
	uint32_t Size;
	char Data[255];
}ecat_firmware_info_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_write_file_ops {
	uint16_t	No;
	uint8_t	LastFlag;
	uint32_t Offset;
	uint32_t Size;
	char Data[ECAT_IPC_DATA_SIZE_MAX + 5];
}ecat_write_file_ops_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_write_file_retrun {
	uint32_t WriteBytes;
	uint32_t offset;
}ecat_write_file_retrun_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_read_file_ops {
	uint16_t	No;
	uint8_t GetFileSize;
	uint32_t offset;
}ecat_read_file_ops_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_read_file_return {
	uint8_t	LastFlag;
	uint32_t Offset;
	uint32_t Size;
	char Data[FILE_BUFFER_SIZE + 5];
}ecat_read_file_return_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_device_state {
	uint32_t SlavesResp; /**< Sum of responding slaves on all
						 Ethernet devices. */
	uint32_t AlStates : 4; /**< Application-layer states of all slaves.
						   The states are coded in the lower 4 bits.
						   If a bit is set, it means that at least one
						   slave in the bus is in the corresponding
						   state:
						   - Bit 0: \a INIT
						   - Bit 1: \a PREOP
						   - Bit 2: \a SAFEOP
						   - Bit 3: \a OP */
	uint32_t LinkUp : 1; /**< \a true, if at least one Ethernet link is
						 up. */
	uint32_t Wc; 		/**< Value of the last working counter. */
}ecat_device_state_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_device_state_ex {
	uint32_t SlavesResp; /**< Sum of responding slaves on all
						 Ethernet devices. */
	uint32_t AlStates; /**< Application-layer states of all slaves.
						   The states are coded in the lower 4 bits.
						   If a bit is set, it means that at least one
						   slave in the bus is in the corresponding
						   state:
						   - Bit 0: \a INIT
						   - Bit 1: \a PREOP
						   - Bit 2: \a SAFEOP
						   - Bit 3: \a OP
						   - Bit 4: \a wkc incomplete
						    */
	uint32_t LinkUp : 1; /**< \a true, if at least one Ethernet link is
						 up. */
	uint32_t Wc; 		/**< Value of the last working counter. */
}ecat_device_state_ex_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_slave_info {
	uint16_t 							Alias;				/**< The slaves alias. */
	uint32_t 							ProductCode;		/**< Product-Code. */
	uint32_t 							VendorID;			/**< Vendor-ID. */
	uint32_t 							RevisionNo;			/**< Revision-Number. */
	uint32_t 							SerialNo;			/**< Serial-Number. */
	uint32_t							SlaveType;			/**< Slave type. */
	uint8_t 							AlState;			 /**< Application-layer states */
	char 								Slavename[MAX_SLAVE_NAME_LENGTH];
}ecat_slave_info_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_slave_sdo_ops {
	uint16_t 						No;						/**< Slave No. */
	uint16_t 						Index;					/**< Index of the object. */
	uint8_t 						SubIndex;				/**< SubIndex of the object. */
	uint16_t 						DataSize;				/**< Object data size */
	uint32_t 						ObjectVal;
	uint32_t 						Timeout_ms;
}ecat_slave_sdo_ops_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_slave_sdo_return {
	uint32_t 						ObjectVal;
	uint32_t 						AbortCode;
}ecat_slave_sdo_return_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_start_op_task_ops {
	uint16_t 						No;						/**< Network Information No. */
	uint8_t							EnumCycleTime;
	uint32_t						WcErrCnt;
}ecat_start_op_task_ops_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_slave_set_pdo_ops {
	uint16_t 						No;
	uint16_t 						OffsetByte;
	uint16_t 						DataSize;
	uint8_t 						Data[RW_PDO_DATA_SIZE_MAX];
}ecat_slave_set_pdo_ops_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_slave_get_pdo_ops {
	uint16_t 						No;
	uint16_t 						OffsetByte;
	uint16_t 						DataSize;
}ecat_slave_get_pdo_ops_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_slave_get_pdo_return {
	uint8_t 						Data[RW_PDO_DATA_SIZE_MAX];
}ecat_slave_get_pdo_return_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_slave_get_pdooff_ops {
	uint16_t 						No;
	uint8_t 						channel;
}ecat_slave_get_pdooff_ops_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_slave_get_pdooff_return {
	uint16_t 						offset;
	uint8_t							channel;
	uint8_t							bitsize;
}ecat_slave_get_pdooff_return_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_slave_dio_data {
	uint16_t 						SlaveNo;
	uint16_t 						BitNo;
	uint32_t						RunMode;
	uint32_t 						U32Value;
}ecat_slave_dio_data_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_slave_aio_data {
	uint16_t 						SlaveNo;
	uint16_t 						ChannelNo;
	uint32_t						RunMode;
	uint8_t							Range;
	int16_t 						RawData;
	double 							VoltData;
	double 							mAData;
}ecat_slave_aio_data_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_slave_set_enc_data {
	uint16_t 						SlaveNo;
	uint16_t 						EncNo;
	int32_t 						I32Value;
	uint32_t						RunMode;
	uint8_t							Arg[3];
}ecat_slave_set_enc_data_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_slave_enc_data {
	uint16_t 						SlaveNo;
	uint16_t 						EncNo;
	uint32_t						RunMode;
	uint16_t 						U16Value;
	int32_t 						I32Value[2];
	uint32_t 						U32Value;
	uint8_t							Arg[3];
}ecat_slave_enc_data_t;
/*****************************************************************************/
typedef  struct OS_ALIGN_SYNTAX ecat_mc_init_ops {
	uint16_t 						AxisCount;
	uint16_t 						SlaveNo[MC_AXIS_NO_MAX];
	uint16_t 						SubAxisNo[MC_AXIS_NO_MAX];
}ecat_mc_init_ops_t;
/*****************************************************************************/
typedef  struct OS_ALIGN_SYNTAX ecat_mc_axis_ops {
	uint16_t 						AxisNo;
	uint16_t 						MasterNo;
	uint16_t 						U16Data[2];
	int32_t 						I32Data;
	uint32_t 						U32Data;
	double	 						DoubleData[2];
	double	 						Vel;
} ecat_mc_axis_ops_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_mc_return {

	uint16_t						U16Value;
	int32_t 						I32Value;
	uint32_t 						U32Value;
	double	 						DoubleValue[2];
}ecat_mc_return_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_mc_return_temp {

	uint16_t						U16Value;
	uint16_t						U16Value32[MC_AXIS_NO_MAX];
	int32_t 						I32Value;
	int32_t 						I32Value32[MC_AXIS_NO_MAX];
	uint32_t 						U32Value;
	uint32_t 						U32Value32[MC_AXIS_NO_MAX];
	double	 						DoubleValue[2];
}ecat_mc_return_tt;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_mc_return_double_multi {
	double	 						DoubleValue_multi[MC_AXIS_NO_MAX];
}ecat_mc_return_double_multi_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_mc_rw_profile_data_ops {
	uint16_t 						ProfileNo;
	uint16_t 						Size;
	uint16_t 						Offset;
	double	 						Data[ECAT_IPC_PROFILE_DATA_SIZE_MAX];
}ecat_mc_rw_profile_data_ops_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_mc_rw_double_data_ops {
	uint16_t 						No;
	uint16_t 						Size;
	uint16_t 						Offset;
	double	 						Data[ECAT_IPC_RW_DOUBLE_DATA_SIZE_MAX];
}ecat_mc_rw_double_data_ops_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_mc_config_ecam_ops {
	uint16_t 						No;
	uint8_t 						SlaveAbs;
}ecat_mc_config_ecam_ops_t;
/*****************************************************************************/
typedef  struct OS_ALIGN_SYNTAX ecat_mc_group_ops {
	uint16_t 						GroupNo;
	uint16_t 						AxisNo;
	uint16_t 						ProfileNo[MC_PROFILE_NO_MAX];
	uint16_t 						U16Data[2];
	uint32_t						U32Data;
	double	 						DoubleData[MC_AXIS_NO_MAX];
	double							NormalVector[3];
	uint8_t							AbsMove;
	uint8_t							Mode;
	uint8_t							MoveHelixType;
	uint8_t							CircDim;
	double	 						Angle;
	double 							Pitch;
	double	 						Vel;
	double	 						Time;
	double	 						pvt_vel[MC_AXIS_NO_MAX];
	double							EndRadius;
} ecat_mc_group_ops_t;
/*****************************************************************************/
typedef  struct OS_ALIGN_SYNTAX ecat_mc_group_move_do_ops {
	uint16_t 						GroupNo;
	uint16_t 						AxisNo;
	uint16_t						SlaveNo;
	uint16_t						BitNo;
	uint32_t						Value;
} ecat_mc_group_move_do_ops_t;
/*****************************************************************************/
typedef  struct OS_ALIGN_SYNTAX ecat_mc_axis_touch_probe_ops {
	uint16_t 						AxisNo;
	uint16_t						ProbeNo;
	uint8_t							Enable;
	uint8_t							Logic;
	double							Value;
} ecat_mc_axis_touch_probe_ops_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_slave_reg_ops {
	uint16_t 						No;						/**< Slave No. */
	uint16_t 						Addr;					/**< Address of the Register. */
	uint16_t 						DataSize;				/**< Register data size */
	uint32_t 						Val;
}ecat_slave_reg_ops_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_slave_reg_return {
	uint32_t 						Val;
	uint8_t 						State;
}ecat_slave_reg_return_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_device_emg {
	uint8_t 						Source;
	uint8_t 						Enable;
	uint8_t 						Logic;
	uint16_t 						SlaveNo;
	uint16_t 						BitNo;
	uint8_t 						Status;
	uint8_t 						ServoOff;
}ecat_device_emg_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_u32 {
	uint32_t 						u32data;
}ecat_u32_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_stewart {
	double Bx[6];
	double By[6];
	double Px[6];
	double Py[6];
	double Z0;
	double Min_RodLength[6];
	double Max_RodLength[6];
}ecat_stewart_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_stewart_Pose {
	uint16_t GroupNo;
	double time;
	double Pose[6];
}ecat_stewart_Pose_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_stewart_return {
	double Pos[6];
}ecat_stewart_return_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_mc_return_float_multi {
	float							FloatValue_multi_Value1[MC_AXIS_NO_MAX];
	float	 						FloatValue_multi_Value2[MC_AXIS_NO_MAX];
	uint16_t						ActualCount;
}ecat_mc_return_float_multi_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX Pid_ecat_32 {
	uint32_t					PidNo;
	int32_t 					int32data;
}Pid_ecat_32_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX Pid_ecat_double {
	uint32_t					PidNo;
	double 						doubledata;
}Pid_ecat_double_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX Pid_ecat_in_out {
	uint32_t					PidNo;
	double 						SetPointValue;
	double 						Error;
	double 						OutPutValue;
	double 						ProcessVariable;
}Pid_ecat_in_out_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_pid {
	uint32_t					PidNo;
	uint8_t						status;
	double 						Feedback;
	double 						kp;
	double 						ki;
	double 						kd;
}ecat_pid_t;
typedef struct OS_ALIGN_SYNTAX ecat_pid_controller {
	uint32_t					PidNo;
	uint32_t 					Interval;
	uint16_t 					SlaveNo_In;
	uint16_t 					OffsetByte_In;
	uint16_t 					Bitlength_In;
	double						Scalegain_In;
	double						Scaleoffset_In;
	uint16_t 					SlaveNo_Out;
	uint16_t 					OffsetByte_Out;
	uint16_t 					Bitlength_Out;
	double						Scalegain_Out;
	double						Scaleoffset_Out;
	double 					Output_max;
	double 					Output_min;
}ecat_pid_controller_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_double {
	double 						doubledata;
}ecat_double_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_write_max_axis_cnt_arg {
	uint8_t Data[128];
}ecat_write_max_axis_cnt_arg_t;
/*****************************************************************************/
typedef  struct OS_ALIGN_SYNTAX ecat_event_ops {
	uint16_t 						EventId;
	uint16_t 						SlaveNo;
	uint16_t 						AxisNo;
	uint16_t 						U16Data[2];
	uint32_t 						U32Data[2];
	double	 						DoubleData[3];
} ecat_event_ops_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_event_return {
	uint16_t 						EventId;
	uint16_t						U16Value[2];
	uint32_t 						U32Data[2];
	double	 						DoubleValue[2];
}ecat_event_return_t;
/*****************************************************************************/
typedef  struct OS_ALIGN_SYNTAX ecat_mc_group_move_ao_ops {
	uint16_t 						GroupNo;
	uint16_t 						AxisNo;
	uint32_t						RunMode;
	uint16_t						SlaveNo;
	uint16_t 						ChannelNo;
	int16_t 						RawData;
	double 							VoltData;
} ecat_mc_group_move_ao_ops_t;
/*****************************************************************************/
typedef  struct OS_ALIGN_SYNTAX ecat_mc_group_axis_no_ops {
	uint16_t 						GroupNo;
	int32_t 						AxisNo[MC_AXIS_NO_MAX];
	uint16_t						AxisCnt;
} ecat_mc_group_axis_no_ops_t;

/*****************************************************************************/
typedef  struct OS_ALIGN_SYNTAX ecat_mc_stick_ops {
	uint16_t 						AxisNo;
	uint16_t 						TableNo;
	uint16_t 						U16Data[6];
	int32_t 						I32Data;
	uint32_t 						U32Data[2];
	double	 						DoubleData[2];
	double	 						Vel;
	float	 						floatData[6];
} ecat_mc_stick_ops_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_mc_stick_return {

	uint16_t						U16Value;
	int32_t 						I32Value;
	uint32_t 						U32Value;
	float	 						FloatValue[2];
	double	 						DoubleValue[2];
	uint16_t						U16Value_Multi[6];
	float	 						FloatValue_Multi[6];
}ecat_mc_stick_return_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_mc_path_queue_data{
	uint32_t 					CmdType;
	uint8_t 					AbsMove;
	double 						EndPos[MC_AXIS_NO_MAX];
	double 						AuxPos[3];
	double 						Args[MC_PATH_DATA_ARGS_MAX];
}ecat_mc_path_queue_data_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_mc_move_path_ops {
	uint16_t GroupNo;
	uint16_t PathDataNo;
	uint16_t DataIndex;
	uint8_t Restart;
	uint8_t Repeat;
	uint16_t ActionType;
	ecat_mc_path_queue_data_t Queue;
}ecat_mc_move_path_ops_t;
/*****************************************************************************/
typedef  struct OS_ALIGN_SYNTAX ecat_mc_move_adv{
	uint16_t No;
	uint8_t GroupMove;
	double EndPos[MC_AXIS_NO_MAX];	
	uint8_t AbsMove;
	double StartVel;
	double ReqVel;
	double FinalVel;
	double Accel;
	double Decel;
} ecat_mc_move_adv_t;
/*****************************************************************************/
typedef  struct OS_ALIGN_SYNTAX ecat_mc_stick_pra_ops {
	uint16_t 						AxisNo;
	float 							FData[ECAT_IPC_32_DATA_SIZE_MAX];
} ecat_mc_stick_pra_ops_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_mc_stick_pra_return {
	float 							FData[ECAT_IPC_32_DATA_SIZE_MAX];
}ecat_mc_stick_pra_return_t;
/*****************************************************************************/
typedef  struct OS_ALIGN_SYNTAX ecat_mc_stop_ops{
	uint16_t No;
	uint8_t RunMode;
	uint8_t Done;
} ecat_mc_stop_ops_t;
/*****************************************************************************/
typedef  struct OS_ALIGN_SYNTAX ecat_mc_move_cia402_profile{
	uint16_t No;
	uint8_t Mode;
	uint8_t Abort;
	double EndPos;	
	uint8_t AbsMove;
	double Vel;
	double Accel;
	double Decel;
} ecat_mc_move_cia402_profile_t;
/*****************************************************************************/
typedef  struct OS_ALIGN_SYNTAX ecat_mc_plc_data{
	uint16_t Type;
	uint16_t No;
	uint8_t AccDecType;
	uint8_t BufferMode;
	double Pos[MC_AXIS_NO_MAX];		
	uint8_t AbsMove;
	double Vel[2];
	double Acc;
	uint16_t AccTime;	
	uint32_t u32Value;
	int32_t i32Value;
	uint8_t CircMode;
	uint8_t Dir;
	double Angle;
	double Pitch;
	double EndRadius;
	double AuxPos[3];
} ecat_mc_plc_data_t;
/*****************************************************************************/
typedef  struct OS_ALIGN_SYNTAX ecat_mc_plc_state{
	uint16_t Type;
	uint16_t No;
	uint32_t CmdIndex;	
	uint32_t u32Value;
	int32_t i32Value;
	int16_t i16Value;
	uint16_t u16Value[2];
} ecat_mc_plc_state_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_pdo_rec_ops {
	uint16_t 						Enable;
	uint16_t 						ChannelNo;
	uint16_t 						No;
	uint16_t 						OffsetByte;
	uint16_t 						DataSize;
}ecat_pdo_rec_ops_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_pdo_rec_return {
	float 						Data[PDO_BUFFER_DATA_MAX];
	uint16_t 					ActualGetCount;
}ecat_pdo_rec_return_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_ai_filter_ops {
	uint16_t 						Enable;
	uint16_t 						ChannelNo;
	uint16_t 						No;
	uint16_t 						OffsetByte;
	uint16_t 						DataSize;
	double 							Frequency;
	uint16_t 						FilterType;
	int32_t							Output;
}ecat_ai_filter_ops_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_pdo_i2o_ops {
	uint16_t 						Enable;
	uint16_t 						ChannelNo;
	uint16_t 						No[2];
	uint16_t 						OffsetByte[2];
	uint16_t 						DataSize[2];
	float							gain;
	float							offset;
}ecat_pdo_i2o_ops_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_mc_group_shaker_ops {
	uint16_t 						GroupNo;
	double 							Amp;
	double 							phase[MC_AXIS_NO_MAX];
	double							Freq;
	double 							Time;
}ecat_mc_group_shaker_ops;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_stewart_Shaker {
	uint16_t GroupNo;
	double time;
	double Pose[6];
	double Freq;
}ecat_stewart_Shaker_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_slave_alias_ops {
	uint16_t 						No;						/**< Slave No. */
	uint16_t 						alias;					/**< alias. */
}ecat_slave_alias_ops_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_slave_no_type_ops {
	uint16_t 						type;						/**< Slave No Type(Position / Alias) */
}ecat_slave_no_type_ops_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_debug_msg_ops {
	float 							data[64];
}ecat_debug_msg_ops_t;
/*****************************************************************************/
typedef  struct OS_ALIGN_SYNTAX ecat_mc_axis_di_level_ops {
	uint16_t 						AxisNo;
	uint8_t							Value[3];
} ecat_mc_axis_di_level_ops_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_general_return {

	uint16_t						U16Value[2];
	int32_t 						I32Value[2];
	uint32_t 						U32Value[2];
	double	 						DoubleValue[2];
}ecat_general_return_t;
/*****************************************************************************/
typedef  struct OS_ALIGN_SYNTAX ecat_mc_axis_general_ops {
	uint16_t 						AxisNo;
	int8_t							I8Value[2];
	uint8_t							U8Value[2];
	int16_t							I16Value[2];
	uint16_t						U16Value[2];
	int32_t 						I32Value[2];
	uint32_t 						U32Value[2];
	float	 						FloatValue[2];
	double	 						DoubleValue[2];
} ecat_mc_axis_general_ops_t;
/*****************************************************************************/
typedef  struct OS_ALIGN_SYNTAX ecat_general_return_ex {
	int8_t							I8Value[2];
	uint8_t							U8Value[2];
	int16_t							I16Value[2];
	uint16_t						U16Value[2];
	int32_t 						I32Value[2];
	uint32_t 						U32Value[2];
	float	 						FloatValue[2];
	double	 						DoubleValue[2];
} ecat_general_return_ex_t;
/*****************************************************************************/
typedef  struct OS_ALIGN_SYNTAX ecat_mc_lack_pdo_return {
	uint8_t cnt;
	uint16_t pdos[LACK_PDOS_GET_COUNT_MAX];
} ecat_mc_lack_pdo_return_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_slave_non_reg_ops {
	uint16_t 						No;						/**< Slave No. */
	uint16_t 						Type;					/**< Type of the Register. */
}ecat_slave_non_reg_ops_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_slave_non_reg_return {
	uint8_t							Val[8];
}ecat_slave_non_reg_return_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_enc_rec_return {
	int32_t						Data[ENC_BUFFER_MAX];
	int32_t 					ActualGetCount;
}ecat_enc_rec_return_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_multi_slave_do_data {
	uint16_t						SlaveCnt;
	uint16_t 						SlaveNo[MULTI_SLAVE_DO_MAX];
	uint32_t 						U32Value[MULTI_SLAVE_DO_MAX];
	uint32_t 						Width[MULTI_SLAVE_DO_MAX];
	uint32_t 						mask[MULTI_SLAVE_DO_MAX];
}ecat_multi_slave_do_data_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_mc_return_u32 {
	uint32_t 						U32Value[MC_AXIS_NO_MAX];
}ecat_mc_return_u32_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_mc_return_i32 {
	int32_t 						I32Value[MC_AXIS_NO_MAX];
}ecat_mc_return_i32_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_mc_return_u16 {
	uint16_t 						U16Value[MC_AXIS_NO_MAX];
}ecat_mc_return_u16_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_mc_return_i32_i32 {
	int32_t 						I32Value1;
	int32_t 						I32Value2;
}ecat_mc_return_i32_i32_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_mc_return_i32_2 {
	ecat_mc_return_i32_i32_t		I3232Value[MC_AXIS_NO_MAX];
}ecat_mc_return_i32_2_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_mc_return_i16 {
	int16_t 						I16Value[MC_AXIS_NO_MAX];
}ecat_mc_return_i16_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_dio_map_ops {
	uint16_t 						SlaveCnt;
	uint16_t 						SlaveNo[SLAVE_DIO_MAP_MAX];
	uint16_t 						Dir[SLAVE_DIO_MAP_MAX];
}ecat_dio_map_ops_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_mc_return_u32_u32 {
	uint32_t 						U32Value1;
	uint32_t 						U32Value2;
}ecat_mc_return_u32_u32_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_mc_return_u32_2 {
	ecat_mc_return_u32_u32_t		U3232Value[MC_AXIS_NO_MAX];
}ecat_mc_return_u32_2_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_dio_map_return {
	uint32_t 						U32Value[SLAVE_DIO_MAP_MAX];
}ecat_dio_map_return_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_aio_ex_ops {
	uint16_t 						SlaveNo;
	uint16_t 						ChannelCnt;
}ecat_aio_ex_ops_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_aio_ex_return {
	double 						f64Value[SLAVE_AIO_CHANNEL_MAX];
}ecat_aio_ex_return_t;
/*****************************************************************************/
typedef struct OS_ALIGN_SYNTAX ecat_set_slave_state {
	uint16_t 						No;						/**< Slave No. */
	uint16_t 						State;					/**< State of slave. */
}ecat_set_slave_state_ops_t;
/*****************************************************************************/
typedef  struct OS_ALIGN_SYNTAX ecat_mc_gearin_by_pos_ops {
	uint16_t 						AxisNo;
	uint16_t 						MasterNo;
	uint16_t 						U16Data[2];
	int32_t 						I32Data;
	uint32_t 						U32Data;
	double							MasterSyncPos;
	double							SlaveSyncPos;
	double							GearOutPos;
	double							MaterialLength;
	double							ReturnVel;
	uint16_t						ReturnAcctime;
} ecat_mc_gearin_by_pos_ops_t;
#pragma pack(pop)
#endif /* _ECATGLOBALS_H_ */
