#include"TcPch.h"
#pragma hdrstop
#include"IoBufferMotor.h"
#include"DEVICE.h"
#include"debug.h"
IoBufferMotor::IoBufferMotor(const char* className,const char* name,const char* module):BaseDevice(className, name, module){
}
//AUTOIO_BEGIN
IoBufferMotor* _initBufferServo_0(){
	static IoBufferMotor staticBufferServo("IoBufferMotor","BufferServo",MODULE_NAME);
	IoBufferMotor::poBufferServo=&staticBufferServo;
	IoBufferMotor* dev=&staticBufferServo;
	strcpy(dev->id,"BufferServo");
	strcpy(dev->display,"");
	strcpy(dev->schematicId,"");
	strcpy(dev->unit,"");
	dev->aiRealPosition.create("aiRealPosition",&AI->BufferMotorPositionFb,"AI.BufferMotorPositionFb",TRUE);
	dev->aiRealSpeed.create("aiRealSpeed",&AI->BufferMotorSpeedFb,"AI.BufferMotorSpeedFb",TRUE);
	dev->aiRealTorque.create("aiRealTorque",&AI->BufferMotorTorqueFb,"AI.BufferMotorTorqueFb",TRUE);
	dev->aiTargetPosFb.create("aiTargetPosFb",&AI->BufferTargetPosFb,"AI.BufferTargetPosFb",TRUE);
	dev->aiDriverErrorCode.create("aiDriverErrorCode",&AI->BufferDriverErrCode,"AI.BufferDriverErrCode",TRUE);
	return dev;
}
IoBufferMotor* _initBufferServo_1(IoBufferMotor *dev){
	dev->aiMotionErrorCode.create("aiMotionErrorCode",&AI->BufferMotionErrID,"AI.BufferMotionErrID",TRUE);
	dev->aoTargetPosition.create("aoTargetPosition",&AO->TargetPositionBufferAxis,"AO.TargetPositionBufferAxis",FALSE);
	dev->aoSpeed.create("aoSpeed",&AO->BufferRotationSpeed,"AO.BufferRotationSpeed",FALSE);
	dev->aoAcc.create("aoAcc");
	dev->aoDec.create("aoDec");
	dev->diTPStatus.create("diTPStatus",&NDI->FTRTPStatus,"NDI.FTRTPStatus",TRUE);
	dev->diMoving.create("diMoving",&NDI->MvAbsBusyBufferAxis,"NDI.MvAbsBusyBufferAxis",TRUE);
	dev->diServoOnBufferAxis.create("diServoOnBufferAxis",&NDI->ServoOnBufferAxis,"NDI.ServoOnBufferAxis",TRUE);
	dev->diSensor1.create("diSensor1");
	dev->diSensor2.create("diSensor2");
	return dev;
}
IoBufferMotor* _initBufferServo_2(IoBufferMotor *dev){
	dev->diSensor3.create("diSensor3");
	dev->diSensor4.create("diSensor4");
	dev->diSensor5.create("diSensor5");
	dev->diSensor6.create("diSensor6");
	dev->diSensor7.create("diSensor7");
	dev->diSensor8.create("diSensor8");
	dev->diWarning.create("diWarning");
	dev->diAlarm.create("diAlarm",&NDI->BufferFaultBufferAxis,"NDI.BufferFaultBufferAxis",TRUE);
	dev->diPositionA1.create("diPositionA1",&NDI->BufferInPositionA1,"NDI.BufferInPositionA1",TRUE);
	dev->diPositionB1.create("diPositionB1",&NDI->BufferInPositionB1,"NDI.BufferInPositionB1",TRUE);
	return dev;
}
IoBufferMotor* _initBufferServo_3(IoBufferMotor *dev){
	dev->diPositionC1.create("diPositionC1",&NDI->BufferInPositionC1,"NDI.BufferInPositionC1",TRUE);
	dev->diPositionD1.create("diPositionD1",&NDI->BufferInPositionD1,"NDI.BufferInPositionD1",TRUE);
	dev->diPositionA2.create("diPositionA2",&NDI->BufferInPositionA2,"NDI.BufferInPositionA2",TRUE);
	dev->diPositionB2.create("diPositionB2",&NDI->BufferInPositionB2,"NDI.BufferInPositionB2",TRUE);
	dev->diPositionC2.create("diPositionC2",&NDI->BufferInPositionC2,"NDI.BufferInPositionC2",TRUE);
	dev->diPositionD2.create("diPositionD2",&NDI->BufferInPositionD2,"NDI.BufferInPositionD2",TRUE);
	dev->diPositionA3.create("diPositionA3",&NDI->BufferInPositionA3,"NDI.BufferInPositionA3",TRUE);
	dev->diPositionB3.create("diPositionB3",&NDI->BufferInPositionB3,"NDI.BufferInPositionB3",TRUE);
	dev->diPositionC3.create("diPositionC3",&NDI->BufferInPositionC3,"NDI.BufferInPositionC3",TRUE);
	dev->diPositionD3.create("diPositionD3",&NDI->BufferInPositionD3,"NDI.BufferInPositionD3",TRUE);
	return dev;
}
IoBufferMotor* _initBufferServo_4(IoBufferMotor *dev){
	dev->diPositionA4.create("diPositionA4",&NDI->BufferInPositionA4,"NDI.BufferInPositionA4",TRUE);
	dev->diPositionB4.create("diPositionB4",&NDI->BufferInPositionB4,"NDI.BufferInPositionB4",TRUE);
	dev->diPositionC4.create("diPositionC4",&NDI->BufferInPositionC4,"NDI.BufferInPositionC4",TRUE);
	dev->diPositionD4.create("diPositionD4",&NDI->BufferInPositionD4,"NDI.BufferInPositionD4",TRUE);
	dev->doN2PurgeswitchA1.create("doN2PurgeswitchA1",&NDO->Buffer_A1_N2_Purge_switch,"NDO.Buffer_A1_N2_Purge_switch",FALSE);
	dev->doN2PurgeswitchB1.create("doN2PurgeswitchB1",&NDO->Buffer_B1_N2_Purge_switch,"NDO.Buffer_B1_N2_Purge_switch",FALSE);
	dev->doN2PurgeswitchC1.create("doN2PurgeswitchC1",&NDO->Buffer_C1_N2_Purge_switch,"NDO.Buffer_C1_N2_Purge_switch",FALSE);
	dev->doN2PurgeswitchD1.create("doN2PurgeswitchD1",&NDO->Buffer_D1_N2_Purge_switch,"NDO.Buffer_D1_N2_Purge_switch",FALSE);
	dev->doN2PurgeswitchA2.create("doN2PurgeswitchA2",&NDO->Buffer_A2_N2_Purge_switch,"NDO.Buffer_A2_N2_Purge_switch",FALSE);
	dev->doN2PurgeswitchB2.create("doN2PurgeswitchB2",&NDO->Buffer_B2_N2_Purge_switch,"NDO.Buffer_B2_N2_Purge_switch",FALSE);
	return dev;
}
IoBufferMotor* _initBufferServo_5(IoBufferMotor *dev){
	dev->doN2PurgeswitchC2.create("doN2PurgeswitchC2",&NDO->Buffer_C2_N2_Purge_switch,"NDO.Buffer_C2_N2_Purge_switch",FALSE);
	dev->doN2PurgeswitchD2.create("doN2PurgeswitchD2",&NDO->Buffer_D2_N2_Purge_switch,"NDO.Buffer_D2_N2_Purge_switch",FALSE);
	dev->doN2PurgeswitchA3.create("doN2PurgeswitchA3",&NDO->Buffer_A3_N2_Purge_switch,"NDO.Buffer_A3_N2_Purge_switch",FALSE);
	dev->doN2PurgeswitchB3.create("doN2PurgeswitchB3",&NDO->Buffer_B3_N2_Purge_switch,"NDO.Buffer_B3_N2_Purge_switch",FALSE);
	dev->doN2PurgeswitchC3.create("doN2PurgeswitchC3",&NDO->Buffer_C3_N2_Purge_switch,"NDO.Buffer_C3_N2_Purge_switch",FALSE);
	dev->doN2PurgeswitchD3.create("doN2PurgeswitchD3",&NDO->Buffer_D3_N2_Purge_switch,"NDO.Buffer_D3_N2_Purge_switch",FALSE);
	dev->doN2PurgeswitchA4.create("doN2PurgeswitchA4",&NDO->Buffer_A4_N2_Purge_switch,"NDO.Buffer_A4_N2_Purge_switch",FALSE);
	dev->doN2PurgeswitchB4.create("doN2PurgeswitchB4",&NDO->Buffer_B4_N2_Purge_switch,"NDO.Buffer_B4_N2_Purge_switch",FALSE);
	dev->doN2PurgeswitchC4.create("doN2PurgeswitchC4",&NDO->Buffer_C4_N2_Purge_switch,"NDO.Buffer_C4_N2_Purge_switch",FALSE);
	dev->doN2PurgeswitchD4.create("doN2PurgeswitchD4",&NDO->Buffer_D4_N2_Purge_switch,"NDO.Buffer_D4_N2_Purge_switch",FALSE);
	return dev;
}
IoBufferMotor* _initBufferServo_6(IoBufferMotor *dev){
	dev->diStockerPositionA1.create("diStockerPositionA1",&NDI->Buffer_A1_FOUP_detect,"NDI.Buffer_A1_FOUP_detect",TRUE);
	dev->diStockerPositionB1.create("diStockerPositionB1",&NDI->Buffer_B1_FOUP_detect,"NDI.Buffer_B1_FOUP_detect",TRUE);
	dev->diStockerPositionC1.create("diStockerPositionC1",&NDI->Buffer_C1_FOUP_detect,"NDI.Buffer_C1_FOUP_detect",TRUE);
	dev->diStockerPositionD1.create("diStockerPositionD1",&NDI->Buffer_D1_FOUP_detect,"NDI.Buffer_D1_FOUP_detect",TRUE);
	dev->diStockerPositionA2.create("diStockerPositionA2",&NDI->Buffer_A2_FOUP_detect,"NDI.Buffer_A2_FOUP_detect",TRUE);
	dev->diStockerPositionB2.create("diStockerPositionB2",&NDI->Buffer_B2_FOUP_detect,"NDI.Buffer_B2_FOUP_detect",TRUE);
	dev->diStockerPositionC2.create("diStockerPositionC2",&NDI->Buffer_C2_FOUP_detect,"NDI.Buffer_C2_FOUP_detect",TRUE);
	dev->diStockerPositionD2.create("diStockerPositionD2",&NDI->Buffer_D2_FOUP_detect,"NDI.Buffer_D2_FOUP_detect",TRUE);
	dev->diStockerPositionA3.create("diStockerPositionA3",&NDI->Buffer_A3_FOUP_detect,"NDI.Buffer_A3_FOUP_detect",TRUE);
	dev->diStockerPositionB3.create("diStockerPositionB3",&NDI->Buffer_B3_FOUP_detect,"NDI.Buffer_B3_FOUP_detect",TRUE);
	return dev;
}
IoBufferMotor* _initBufferServo_7(IoBufferMotor *dev){
	dev->diStockerPositionC3.create("diStockerPositionC3",&NDI->Buffer_C3_FOUP_detect,"NDI.Buffer_C3_FOUP_detect",TRUE);
	dev->diStockerPositionD3.create("diStockerPositionD3",&NDI->Buffer_D3_FOUP_detect,"NDI.Buffer_D3_FOUP_detect",TRUE);
	dev->diStockerPositionA4.create("diStockerPositionA4",&NDI->Buffer_A4_FOUP_detect,"NDI.Buffer_A4_FOUP_detect",TRUE);
	dev->diStockerPositionB4.create("diStockerPositionB4",&NDI->Buffer_B4_FOUP_detect,"NDI.Buffer_B4_FOUP_detect",TRUE);
	dev->diStockerPositionC4.create("diStockerPositionC4",&NDI->Buffer_C4_FOUP_detect,"NDI.Buffer_C4_FOUP_detect",TRUE);
	dev->diStockerPositionD4.create("diStockerPositionD4",&NDI->Buffer_D4_FOUP_detect,"NDI.Buffer_D4_FOUP_detect",TRUE);
	dev->doServoOn.create("doServoOn",&NDO->ServoOnBufferAxis,"NDO.ServoOnBufferAxis",FALSE);
	dev->doStop.create("doStop",&NDO->StopBufferAxis,"NDO.StopBufferAxis",FALSE);
	dev->doMove.create("doMove",&NDO->MoveCommandBufferAxis,"NDO.MoveCommandBufferAxis",FALSE);
	dev->doReset.create("doReset",&NDO->ResetBufferAxis,"NDO.ResetBufferAxis",FALSE);
	return dev;
}
IoBufferMotor* _initBufferServo_8(IoBufferMotor *dev){
	strcpy(dev->aioType,"float");
	strcpy(dev->scRootPath,"BufferServo");
	return dev;
}
void initIoBufferMotor(){
	IoBufferMotor* dev;
	dev=_initBufferServo_0();
	_initBufferServo_1(dev);
	_initBufferServo_2(dev);
	_initBufferServo_3(dev);
	_initBufferServo_4(dev);
	_initBufferServo_5(dev);
	_initBufferServo_6(dev);
	_initBufferServo_7(dev);
	_initBufferServo_8(dev);
}
IoBufferMotor* IoBufferMotor::poBufferServo=NULL;
//AUTOIO_END
