示例#1
0
cRooms::cRooms( void ):
IsTempHeatingLead((&MPNumSys[0]),(&MPChanSys[idxTempHeatingLead]),(&SysTempOffset[idxTempHeatingLead])),
IsTempHeatingReturn((&MPNumSys[0]),(&MPChanSys[idxTempHeatingReturn]),(&SysTempOffset[idxTempHeatingReturn])),
TempOutside((&MPNumSys[0]),(&MPChanSys[idxTempOutside]),(&SysTempOffset[idxTempOutside])),
Pump(PinPumpHeating,0.5, 0.0, 0.0, DIRECT, 0.0),
Mixer(PinMixerOpen,PinMixerClose, 0.2, 0.0, 5.4, DIRECT)
{
	SetType = Normal;
	// Initialize PID controllers for pumps
	Pump.SetOutputLimits(0.3, 1.0);
	Mixer.SetOutputLimits(-1.0, 1.0);
	Mixer.SetSampleTime(5000);
	
	dMaxDiff =0;
	dMaxSp = 0;
	
	initDefaultSetpoint();
}
示例#2
0
cRooms::cRooms( void ):
IsTempHeatingLead((&MPNumSys[0]),(&MPChanSys[idxTempHeatingLead]),(&SysTempOffset[idxTempHeatingLead])),
IsTempHeatingReturn((&MPNumSys[0]),(&MPChanSys[idxTempHeatingReturn]),(&SysTempOffset[idxTempHeatingReturn])),
TempOutside((&MPNumSys[0]),(&MPChanSys[idxTempOutside]),(&SysTempOffset[idxTempOutside]),TRoomInit, AlphaTRoom),
Pump(PinPumpHeating,0.5, 0.0, 0.0, DIRECT, 0.0),
Mixer(PinMixerOpen,PinMixerClose, 0.1, 0.0008, 3.9, DIRECT),
HeatingPeriod(129600000), // 36(h)*60(min/h)*60(s/min)*1000(ms/s)
PWM(600000) // 10(min)*60(s/min)*1000(ms/s) = 600000 ; 10 minute room heating interval
{
	SetType = Normal;
	// Initialize PID controllers for pumps
	Pump.SetOutputLimits(0.3, 1.0);
	Mixer.SetOutputLimits(-1.0, 1.0);
	Mixer.SetSampleTime(5000);
	
	MaxNeed =0;
	dMaxSp = 0;
	
	initDefaultSetpoint();
}