public void DeviceHeaterCtrl(double ctrl) { if (ctrl == 0) { _tecBoard.SetTempControlMode(6, 0);// tec 4 } else { _tecBoard.SetTempControlMode(6, 1); _tecBoard.SetRSHeaterP(0, 120); _tecBoard.SetRSHeaterI(0, (float)0.05); _tecBoard.SetRSHeaterD(0, 400); _tecBoard.SetRSHeaterSetPointOffset(0, (float)0.1); _tecBoard.SetRSHeaterPropBand(0, 5); _tecBoard.SetRSHeaterPreHeatSetPoint(0, 50); _tecBoard.SetRSHeaterP(1, 40); _tecBoard.SetRSHeaterI(1, (float)0.05); _tecBoard.SetRSHeaterD(1, 400); _tecBoard.SetRSHeaterSetPointOffset(1, (float)0.1); _tecBoard.SetRSHeaterPropBand(1, 5); _tecBoard.SetRSHeaterPreHeatSetPoint(1, 50); } }
public double this[int nchannel] { get { return(_tecBoard.GetTemperature(nchannel, 0)); } set { logger.Debug("Setting the temperature to {0}", value.ToString()); if (value < _setPoint[nchannel]) { _theModel.tecBoard.theBoard.SetFanDutyCycle(100); _theModel.tecBoard.theBoard.EnableSystemFan(true); _theModel.tecBoard.theBoard.EnableTECFan(true); } else { // _theModel.tecBoard.theBoard.SetFanDutyCycle(100); // _theModel.tecBoard.theBoard.EnableSystemFan(true); _theModel.tecBoard.theBoard.EnableTECFan(false); } _prev_setPoint[nchannel] = _setPoint[nchannel]; _setPoint[nchannel] = value; _bAtTemp[nchannel] = false; _theModel.bUnderTempPlan[nchannel] = false; _theModel.UpdatedPCRCyclerSetpointTemperature(_setPoint[nchannel]); _tecBoard.SetSetPoint(nchannel, (float)value); if (!_theModel.bRamping) { if (_rampingLowTemp[nchannel] == NO_SETPOINT || _rampingHighTemp[nchannel] == NO_SETPOINT || _setPoint[nchannel] < _rampingLowTemp[nchannel] || _setPoint[nchannel] > _rampingHighTemp[nchannel] ) { float presetValue = 0; double setValue = 0; if (_prev_setPoint[nchannel] < _setPoint[nchannel]) { setValue = 95; presetValue = (float)_prev_setPoint[nchannel]; } else { presetValue = 95; setValue = _setPoint[nchannel]; } SetToAppropriateBand(nchannel, presetValue, setValue, _theModel.Config.m_TEC_Channel_Configurations["TEC_5"].m_Step_PID_RampUp_Range_List); } _tecBoard.SetTempControlMode(nchannel, 1); } } }