1SuJieFEC编程培训CompanyConfidential2FEC编程培训内容编程方法简介功能模块介绍应用举例3编程方法树状编程自定义编程4自定义编程•ExportingaModulePath:C:\ProgramFiles\JohnsonControls\CCT\CustomControlModules文件扩展:.caf.module•SharingaModule•DeletingtheExportedModule5CCTBlocks•ReliabilityMergeandReliabilityCheckinBoolean•ReliabilityMergeProvidestheabilitytosetthereliabilityofthevaluebeingsent.WhentheInputisReliableinputisTrue,thePresentValueissettothecurrentInputwithaReliabilityofReliable.WhentheInputisReliableinputisFalse,thePresentValueisheldatitslastvaluewithaReliabilityofUnreliable.•ReliabilityCheckProvidestheabilitytocheckreliabilityofthesourcevalue.ThePresentValueissettoTrueiftheinputreliabilityisReliable;otherwisethePresentValueisFalse.6CCTBlocks•MUXandMathBlocks举例:计算回风湿度与回风湿度设定值之差,并用MUX去选择:差值加湿阀开度20%0%20%~50%50%50%100%注:双击MUX模块,改变输入数量及其他配置。7CCTBlocks•Timer•LatchTheLatchlogicblockholdsaBooleanTruevalueuntilyoucommandittoreset.Latchblockshelpcapturerapidlychangingbinarystatesthatmightotherwisebemissed.Forexample,usethisblocktocapturealarmconditions.举例:水泵状态在30秒内与命令不匹配将产生报警,并且只有报警reset信号才能复位报警。8CCTBlocks•RateLimiter(softstart/ramp)•TheRateLimiterlogicblockcontrolstherateatwhichtheOutputchangeswithvariationsintheInputvalue.Ifratelimitingisdisabled,thisblockpassesthevalueoftheInputtotheOutput.Ifratelimitingisenabled,thisblocklimitschangestoitsOutputtoanincrementdeterminedbytheStepEquation.TheRateLimiterblockupdatesevery5seconds.•StepEquation=RateLimitx5/60.0•Ratelimit=%change/minute(i.e.howfastitramps)9CustomProgrammingACTIVITY10举例•锅炉系统启动(BLR-Start)命令发出后,热水泵(HWP-C)开启•当热水泵状态(HWP-S)返回后开启锅炉(BLR-C)•当锅炉停止2分钟后热水泵停止11CustomProgrammingHybridActivity12CreatingANewHybridActivityRightClickonCategory13RightClickHybridActivity14HybridActivity15•StateBlock–Logicdiagramselector–SeparatelogicdiagramforeachstateHybridActivity16•AddInputsandOutputs–Input(Enum)toselectstate–Input(Float)forsetpoint–Input(Float)forprocessvariable–Output(Float)forcontroloutputHybridActivity17•RenameInputsandOutputs–DoubleclickforrenamewindowHybridActivity18•ConnectStateSelection–DraglinetoStateBlockHybridActivity19•CreateOffStateDiagram–SelectOffstateofStateBlock–AddConstantforOffstateHybridActivity20•DefineOnStateDiagram–SelectOnstateofStateBlock–AddthelogicforOnstateHybridActivity21HybridActivities&PIDControl•AnalogInputHardwareDetails•NOTE:HEXmeansheatexchanger•Analoginputprocessidentifier–ThisvariableallowstheusertospecifytheprocessoftheAnalogInput.IftheAIFilterSetupissettoProcessID,theProcessIdentifier(processtype)isusedtodeterminethefiltersetup.Thefiltersare:ant-spikeandLowPassFilter(Bessellfilterforyougeeks).TheBesselfilterhasthecapabilitytorejectnoiseabovethefrequencydictatedbytheprocessIDorbytheuser.ItgetstheprocessIDinformationfromthestandardstable.(seebelow)22HybridActivities&PIDControl•PIDpreprocessorprocessidentifier-isusedtoforwardtheselectedProcessIDinformation(Tau,deadtimeandprocessrange)tothePID.ItgetstheprocessIDinformationfromthestandardstable23HybridActivities&PIDControl•StandardsTable24HybridActivities&PIDControl•ProcessIDConfigurationRestrictions25PIDPreProcessor•PIDPre-Processor为PID模块提供初始的过程参数信息,这些信息只在PID第一次被enable时使用一次•如果控制一个比例输出的设备,PIDPre-Processor的输出直接连接到PID上•因为它还可以被用作提供输入给MSCPreProcessor(提供多级控制输出).这就是为什么把PIDPreProcessor作为一个单独的模块而没有内嵌在PID内的原因•因为可以在detailview里定义参数,所以输入端可以不用连接。然而如果没有连接AI的ProcessID,则必须在details里澄清这个ID•在控制视图里能浏览会更方便26PIDPreProcessor•ThecalculationflowofthePIDPre-Processorisshownbelow:MinTuneBandEffProcessRangeProcessRangeProcessUnitsProcessIdentifierProcessTimeConstantEffProcessDeadTimeEffProcessTimeConstantStandardTuningOutputResolutionx4.0TrueFalseStandardTuningStandardsTableProcessIDProcessDeadTimeTrueFalseStandardTuningStandardsTableProcessIDProcessIdentifierDefaultAirflow,AirflowDiff,揙ther?TrueFalseStandardTuningStandardsTableProcessIDDefaultDegFinw.c.psikPa1.00.5555556248.846894.761000/ConversionFactor27PIDPreProcessor•Units–Thisinputallowstheusertospecifytheunitsfortheprocessthatisbeingcontrolled.IftheUnitsissettoavaluethatdoesnotalignwiththecurrentProcessIdentifier,theprimitivereliabilityissetto“InputOutofRange”andthelogiccontinuestousethelastreliablevalueandforwardsthedefaulttimeconstant,processdeadtimeandprocessrangetothePID.•StandardTuning–ABooleaninputthatiftruepassesprocessdatafromtheStandardsTabletothecorrespondingoutputs.Iffalsetheuserdefinedprocessrange,timeconstantandprocessdeadtimedataisused•ProcessRange–ThemagnitudeoftherangethatthePIDProcessVariablewilltraverseasthePIDPresentValuevariesbetweenitsminimumandmaximumvalues.•TimeConstant–Thetimerequiredforafirst-ordersystemtoreach63%ofitsfinalmagnitudegivena100%stepchange.•ProcessDeadTime–Thetimerequiredfortheprocesstobegintoreflecttheresultsofastepchange.28PIDPreProcessor•EffProcessRange–TheprocessrangedeterminedbytheprimitivetopasstothePID.•EffTimeConstant–ThetimeconstantdeterminedbytheprimitivetopasstothePIDortheMSCpre-processor.•EffProcessDeadTime–ThedeadtimedeterminedbytheprimitivetopasstothePID•MinimumTuneBand-TheregionaroundthePIDSetpointwithinwhichPRAC+willnotattempttotune.•Minim