/// <summary> /// 현재 파라미터들을 아진 함수를 이용하여 세팅함. /// </summary> public void ApplyPara(double _dPulsePerUnit) { m_dPulsePerUnit = _dPulsePerUnit; short nRet; //이머전시 로직은 한모듈에서 그룹별로 나눠놨는데 //4축 이하는 그룹이 무조건 1개 이다. //왜 이렇게 만들었는지 이해가 안됨... nRet = NMC2.nmc_SetEmgLogic(m_nDevId, 0, 0); nRet = NMC2.nmc_SetUnitPerPulse(m_nDevId, (short)Para.iPhysicalNo, 1); //1펄스당 1펄스로 세팅. nRet = NMC2.nmc_SetNearLogic(m_nDevId, (short)Para.iPhysicalNo, (short)Para.eHomeLogic); nRet = NMC2.nmc_SetMinusLimitLogic(m_nDevId, (short)Para.iPhysicalNo, (short)Para.eMinusLimitLogic); nRet = NMC2.nmc_SetPlusLimitLogic(m_nDevId, (short)Para.iPhysicalNo, (short)Para.ePlusLimitLogic); nRet = NMC2.nmc_SetAlarmLogic(m_nDevId, (short)Para.iPhysicalNo, (short)Para.eAlarmLogic); nRet = NMC2.nmc_SetEncoderZLogic(m_nDevId, (short)Para.iPhysicalNo, (short)Para.eZLogic); nRet = NMC2.nmc_SetEncoderCount(m_nDevId, (short)Para.iPhysicalNo, (short)Para.eEncMulti); nRet = NMC2.nmc_SetEncoderDir(m_nDevId, (short)Para.iPhysicalNo, (short)Para.eEncInputMode); //진입점이 없다고 뻑남... 메뉴얼 샘플 과 DLL버전이 다른듯. nRet = NMC2.nmc_SetPulseLogic(m_nDevId, (short)Para.iPhysicalNo, (short)Para.ePulseLogic); nRet = NMC2.nmc_SetSReadyLogic(m_nDevId, (short)Para.iPhysicalNo, (short)Para.eServoLogic); //nRet = NMC2 }