Sie sind auf Seite 1von 6

Object : ConvertNumber

Type : InfinityFunction
LastChange : 11/3/2014 10:29:24 AM
DeviceId : MorningSide\FairEnvBox_23\Chmbr10C10C
Alias : ConvertNumber
CreateTime : 5/27/2009 2:13:28 PM
TimeLocked : 11/3/2014 10:29:24 AM
InstanceId : 7545/29
ByteCode :
'This Function converts a number from one format to another (ie. PSI to Percent).'
Passing format is First Number, SecondNumber, Lo End for First, Hi End for First,'
Value of Second at First's Lo End, Value of Second at First's Hi End, First' Local,
Second Local.'This function will allow you to disable and modify either X or Y and
see'the corresponding change in the enabled point. Also, Y will be capped if'it is
not disabled.'NOTE: If either of the first two arguments are local variables, then
you must' pass a 1 in Arg 7 or Arg 8.'Rename ArgumentsArg 1 XArg 2 YArg 3 X1Arg 4
X2Arg 5 Y1Arg 6 Y2Arg 7 XLocalArg 8 YLocalArg 9 LoYCapArg 10 HiYCap'Declare local
variables.Numeric mX, mY, mX1, mX2, mY1, mY2, Slope, Intercept, HiY, LoY,
XEnabledNumeric YEnabled, CheckState'The first two arguments must be passed and not
disabled, otherwise return.If not (passed(1) and passed(2)) then ReturnXEnabled and
YEnabled = 1CheckState = 1If passed(7) then If XLocal = 1 then CheckState =
0EndifIf CheckState = 1 then'If X State = Disabled or X Type = InfinityInput then
XEnabled = 0 If X State = Disabled then XEnabled = 0EndifCheckState = 1If
passed(8) then If YLocal = 1 then CheckState = 0EndifIf CheckState = 1 then' If Y
State = Disabled or Y Type = InfinityInput then YEnabled = 0 If Y State = Disabled
then YEnabled = 0EndifIf XEnabled = 0 and YEnabled = 0 then ReturnmX = XmY =
Y'Check to see which of Args 3 thru 6 were not passed and set those to defaults.If
not passed(3) then mX1 = 0 Else mX1 = X1If not passed(4) then mX2 = 100 Else mX2 =
X2If not passed(5) then mY1 = 0 Else mY1 = Y1If not passed(6) then mY2 = 100 Else
mY2 = Y2'If Y is enabled and not an input, Calculate Value of Y from X using Y=mX+B
FormatIf YEnabled = 1 then Slope = (mY1 - mY2) / (mX1 - mX2) Intercept = mY1 -
(Slope * mX1) mY = (Slope * mX) + InterceptEndif'If X is Enabled and not an input,
then Calculate Value of X from Y.If XEnabled = 1 then Slope = (mX1 - mX2) / (mY1 -
mY2) Intercept = mX1 - (Slope * mY1) mX = (Slope * mY) + InterceptEndif'Check how
to cap YIf mY1 < mY2 then If not passed(9) then LoY = mY1 Else LoY = LoYCap If
not passed(10) then HiY = mY2 Else HiY = HiYCapElse If not passed(9) then LoY =
mY2 Else LoY = HiYCap If not passed(10) then HiY = mY1 Else HiY = LoYCapEndif'Cap
YIf YEnabled = 1 then mY = maximum(minimum(mY, HiY), LoY) Y = mYEndifIf XEnabled
= 1 then X = mXReturn Y EndByteCode
EndObject

Object : InitPIArray
Type : InfinityFunction
LastChange : 11/3/2014 10:29:24 AM
DeviceId : MorningSide\FairEnvBox_23\Chmbr10C10C
Alias : InitPIArray
CreateTime : 5/27/2009 2:13:28 PM
TimeLocked : 11/3/2014 10:29:24 AM
InstanceId : 7545/30
ByteCode :
Numeric x, mSize, mInitArrayx, mSize and mInitArray = 0If passed(1) then mSize =
Arg[1] Size If (Arg[1] = NotSet) then mInitArray = 1 If (mSize > 12) then If
not Arg[1][13] then mInitArray = 1 Arg[1][13] = 1 Endif mSize = minimum(mSize,
12) If passed(2) and mInitArray then Arg[1] = Arg[2] If mInitArray then For x
= 1 to mSize If passed(x + 2) then Arg[1][x] = Arg[x + 2] Else Arg[1][x] = 0
Next x EndifEndifReturn EndByteCode
CommandLine : False
Description : Inits PI Array to Defaults A4
EndObject

Object : PILoop
Type : InfinityFunction
LastChange : 11/3/2014 10:29:25 AM
DeviceId : MorningSide\FairEnvBox_23\Chmbr10C10C
Alias : PILoop
CreateTime : 5/27/2009 2:13:28 PM
TimeLocked : 11/3/2014 10:29:25 AM
InstanceId : 7545/31
ByteCode :
Arg 1 CPArg 2 SPArg 3 PIArrayNumeric Prop, NewErr, ILim, lMin, HiLim, LoLim, mSize,
dHiLoIf not (passed(1) and passed(2) and passed(3)) then Return -9999mSize =
PIArray SizeIf mSize < 3 then Return -9999LoLim = PIArray[2]HiLim = PIArray[3]dHiLo
and ILim = HiLim - LoLimIf not dHiLo then Return -9999NewErr = (1 - (2 *
(PIArray[1] > 1))) * (CP - SP)Prop = PIArray[2] + ((NewErr + (PIArray / 2)) * dHiLo
/ PIArray)If mSize > 5 then If PIArray[5] <> PIArray[6] then LoLim = PIArray[5]
HiLim = PIArray[6] Endif If mSize > 8 then If mSize > 9 then lMin =
PIArray[10] Else lMin = 0 If mSize > 10 then If PIArray[11] then ILim =
maximum(PIArray[11] - abs(Prop - (PIArray[2] + ((PIArray[7] + (PIArray / 2)) * ILim
/ PIArray))), 0) Endif PIArray[7] = NewErr If mSize > 11 then If
PIArray[12] then dHiLo = dHiLo * 0.01 * PIArray[12] Else dHiLo = 0.5 * dHiLo
Endif If (abs(NewErr) > lMin) & ILim then PIArray[8] = PIArray[8] +
maximum(minimum(maximum(PIArray[4], Scan) * NewErr * PIArray[9] * dHiLo / 60,
ILim), -ILim) PIArray[8] = maximum(minimum(PIArray[8], dHiLo), -dHiLo) Prop =
Prop + PIArray[8] EndifEndifReturn maximum(minimum(Prop, HiLim), LoLim)
EndByteCode
CommandLine : False
Description : Prop/Int Calculation A4
EndObject

Object : DefrostCont
Type : InfinityProgram
LastChange : 11/3/2014 10:29:25 AM
DeviceId : MorningSide\FairEnvBox_23\Chmbr10C10C
Alias : DefrostCont
CreateTime : 5/27/2009 2:13:28 PM
TimeLocked : 11/3/2014 10:29:25 AM
InstanceId : 7545/32
ByteCode :
Datetime mRetTimeStamp, mVlvTimeStampNumeric mRetFlag, mVlvFlagStartUp: If
(Defrost = On) then Goto DefrostOn Else Goto DefrostOffDefrostOff: Defrost = Off
If (DefrostOvr = On) then Goto DefrostOn If (CWRet > 33) then mRetFlag = On If
(ClgVlv < 75) then mVlvFlag = On If (CWRet < 32) and (mRetFlag = On) then
mRetTimeStamp = Date mRetFlag = Off Endif If (ClgVlv > 80) and (mVlvFlag = On)
then mVlvTimeStamp = Date mVlvFlag = Off Endif If (ClgVlv > 80) and (CWRet
< 32) and (Space > (SetPt + 0.5)) then If (((Date - mRetTimeStamp) / 60) > 240)
and (((Date - mVlvTimeStamp) / 60) > 60) then Goto DefrostOn EndifDefrostOn:
Defrost = On DefrostOvr = Off If (TS >= (60 * DefrostTimer)) then Goto DefrostOff
EndByteCode
CommandLine : False
Description : Ver. 04.03.2000
Status : Active
EndObject

Object : PmpCont
Type : InfinityProgram
LastChange : 11/3/2014 10:29:25 AM
DeviceId : MorningSide\FairEnvBox_23\Chmbr10C10C
Alias : PmpCont
CreateTime : 5/27/2009 2:13:28 PM
TimeLocked : 11/3/2014 10:29:25 AM
InstanceId : 7545/33
ByteCode :
Datetime LastStartStartUp: If (Pmp = On) then Goto PmpRunning Else Goto
PmpShutDownPmpShutDown: Pmp = Off If (((Date - LastStart) / 60) > 0.5) then If
(PmpHOA <> 0) then Goto PmpRunning EndifPmpRunning: If (Pmp = Off) then LastStart
= Date Pmp = On If (PmpHOA = 0) then Goto PmpShutDown EndByteCode
CommandLine : False
Description : Ver. 04.03.2000
Status : Active
EndObject

Object : FanCont
Type : InfinityProgram
LastChange : 11/3/2014 10:29:25 AM
DeviceId : MorningSide\FairEnvBox_23\Chmbr10C10C
Alias : FanCont
CreateTime : 5/27/2009 2:13:29 PM
TimeLocked : 11/3/2014 10:29:25 AM
InstanceId : 7545/34
ByteCode :
Datetime LastStartStartUp: If (Fan = On) then Goto FanRunning Else Goto
FanShutDownFanShutDown: Fan = Off If (((Date - LastStart) / 60) > 1) then If
(FanHOA = 1) then Goto FanRunning If (FanHOA <> 0) and (Defrost = Off) then
If (ChamberMode = 0) then If (ClgLoSpaceLock = On) then If
(ContSpace > (SetPt + 0.1)) then Goto FanRunning Else Goto
FanRunning Endif Else Goto FanRunning Endif Endif
EndifFanRunning: If (Fan = Off) then LastStart = Date Fan = On If (FanHOA <> 1)
then If (FanHOA = 0) or (Defrost = On) then Goto FanShutDown If (ChamberMode
= 0) then If (ClgLoSpaceLock = On) then If (ContSpace < (SetPt - 0.1))
then Goto FanShutDown Else If (ContSpace < (SetPt - 2)) then
ClgLoSpaceLock = On Endif Endif Endif EndByteCode
CommandLine : False
Description : Ver. 05.10.2000
Status : Active
EndObject

Object : EMXDisplayCont
Type : InfinityProgram
LastChange : 11/3/2014 10:29:25 AM
DeviceId : MorningSide\FairEnvBox_23\Chmbr10C10C
Alias : EMXDisplayCont
CreateTime : 5/27/2009 2:13:29 PM
TimeLocked : 11/3/2014 10:29:25 AM
InstanceId : 7545/35
ByteCode :
MessageDisplay: EMXSensor DisplayMsg = " Space " EMXSensor DisplaySelect =
ShowMessage Goto MessageWaitMessageWait: If (TS >= 2) then If (Defrost = On)
then Goto DefrostDisplay Else Goto ValueDisplay EndifDefrostDisplay:
EMXSensor DisplayMsg = "Defrost " EMXSensor DisplaySelect = ShowMessage Goto
DefrostWaitDefrostWait: If (TS >= 2) then Goto ValueDisplayValueDisplay:
EMXSensor DisplayValue = (Space - 32) / 1.8 EMXSensor DisplaySelect =
ShowDisplayValue Goto ValueWaitValueWait: If (TS >= 15) then Goto MessageDisplay
EndByteCode
CommandLine : False
Description : Ver. 04.03.2000
Status : Active
EndObject

Object : HeaterCont
Type : InfinityProgram
LastChange : 11/3/2014 10:29:25 AM
DeviceId : MorningSide\FairEnvBox_23\Chmbr10C10C
Alias : HeaterCont
CreateTime : 5/27/2009 2:13:29 PM
TimeLocked : 11/3/2014 10:29:25 AM
InstanceId : 7545/36
ByteCode :
Datetime mLastStartStartUp: If (Heater = On) then Goto HeaterOn Else Goto
HeaterOffHeaterOff: Heater = Off If (ChamberMode = 0) then If (CWSup < 108)
and (CWRet < 108) and (PmpRun = On) and (Defrost = On) then Goto HeaterOn Else
If (CWSup < 108) and (CWRet < 108) and (PmpRun = On) and (Space < (SetPt - 0.15))
then Goto HeaterOn EndifHeaterOn: If (Heater = Off) then mLastStart = Date If
(PmpRun = Off) or (CWSup > 110) or (CWRet > 110) then Goto HeaterOff If
(ChamberMode = 0) then Heater = On If (Defrost = Off) then Goto HeaterOff
If (Defrost = On) and (CWSup >= 101) then Goto HeaterOff Else If (Space >
(SetPt + 0.05)) then Goto HeaterOff Goto PulseWait Endif If (ChamberMode = 1)
then Goto PulseWaitPulseWait: If (TS <= HeaterPulse) then Heater = On Else Heater
= Off If (TS >= (HeaterPulse * 2)) then Goto HeaterOn EndByteCode
CommandLine : False
Description : Ver. 07.25.2000
Status : Active
EndObject

Object : SetPtCont
Type : InfinityProgram
LastChange : 11/3/2014 10:29:25 AM
DeviceId : MorningSide\FairEnvBox_23\Chmbr10C10C
Alias : SetPtCont
CreateTime : 5/27/2009 2:13:29 PM
TimeLocked : 11/3/2014 10:29:25 AM
InstanceId : 7545/37
ByteCode :
Numeric mOldSpaceSetting: mOldSpace = ContSpace If (Space < -10) then
ContSpace = SetPt Else If (mOldSpace = NotSet) then mOldSpace = Space
ContSpace = (Space * 0.05) + (mOldSpace * 0.95) Endif If (ChamberMode = 0) then
SetPt = 40 + Bias.1 Else SetPt = 98 + Bias.1 Endif Goto
ProcessOutputProcessOutput: If (TS >= 5) then Goto Setting EndByteCode
EndObject

Object : CWSupSetPtCont
Type : InfinityProgram
LastChange : 11/3/2014 10:29:25 AM
DeviceId : MorningSide\FairEnvBox_23\Chmbr10C10C
Alias : CWSupSetPtCont
CreateTime : 5/27/2009 2:13:29 PM
TimeLocked : 11/3/2014 10:29:25 AM
InstanceId : 7545/38
ByteCode :
WhichMode: InitPIArray(CWSupSetPtTR, 100, 2, 20, 40, 10, 20, 40, 0, 0, 0.01, 0.1,
5, 50) If (ChamberMode = 0) then If (PmpRun = Off) or (Defrost = On) then Goto
ResetLoop Else Goto ModulatingHeat Endif Goto ModulatingCoolResetLoop:
CWSupSetPt = 40 CWSupSetPtTR[8] = 0 Goto ProcessSignalModulatingHeat:
CWSupSetPtTR[2] = 80 CWSupSetPtTR[3] = 120 CWSupSetPtTR[5] = 80 CWSupSetPtTR[6]
= 120 CWSupSetPt = PILoop(ContSpace, SetPt, CWSupSetPtTR) Goto
ProcessSignalModulatingCool: CWSupSetPtTR[2] = 50 CWSupSetPtTR[3] = 73
CWSupSetPtTR[5] = 50 CWSupSetPtTR[6] = 73 CWSupSetPt = PILoop(ContSpace, SetPt,
CWSupSetPtTR) Goto ProcessSignalProcessSignal: If (TS >= CWSupSetPtTR[4]) then
Goto WhichMode EndByteCode
CommandLine : False
Description : Ver. 04.03.2000
Status : Active
EndObject

Object : HeaterPulseCont
Type : InfinityProgram
LastChange : 11/3/2014 10:29:25 AM
DeviceId : MorningSide\FairEnvBox_23\Chmbr10C10C
Alias : HeaterPulseCont
CreateTime : 5/27/2009 2:13:29 PM
TimeLocked : 11/3/2014 10:29:25 AM
InstanceId : 7545/39
ByteCode :
WhichMode: If (ChamberMode = 1) then Goto CalcPulse Else Goto ResettingResetting:
HeaterPulse = HeaterBasePulse HeaterPulseInt = 0 Goto ProcessOutputCalcPulse: If
(Space[1] > 0) and (SetPt[1] > 0) then HeaterPulseInt = HeaterPulseInt +
((SetPt[1] - Space[1]) * 5) HeaterPulseInt = minimum(maximum(HeaterPulseInt,
-9), 9) HeaterPulse = HeaterBasePulse + HeaterPulseInt HeaterPulse =
minimum(maximum(HeaterPulse, 1), 19) Else HeaterPulse = HeaterBasePulse
HeaterPulseInt = 0 Endif Goto ProcessOutputProcessOutput: If (TM >= 60) then
Goto WhichMode EndByteCode
Description : Ver. 04.07.2000
Status : Active
EndObject

Object : ClgVlvCont
Type : InfinityProgram
LastChange : 11/3/2014 10:29:25 AM
DeviceId : MorningSide\FairEnvBox_23\Chmbr10C10C
Alias : ClgVlvCont
CreateTime : 5/27/2009 2:13:29 PM
TimeLocked : 11/3/2014 10:29:25 AM
InstanceId : 7545/40
ByteCode :
WhichMode: ClgVlvOp = Off InitPIArray(ClgVlvTR, 6, 2, 5, 10, 10, 2, 17, 0, 0,
0.05, 0.2, 15, 50) If (PmpRun = Off) or (Defrost = On) then Goto CloseValve If
(ChamberMode = 1) then Goto ModulateHotBox Goto ModulatingCloseValve: ClgVlvPSI =
17 ClgVlvTR[8] = 2.5 Goto ConvertingModulateHotBox: If (CWSup <= 97) then Goto
CloseValve If (Space >= SetPt) then ConvertNumber(Space, ClgVlvPSI, (SetPt -
1), (SetPt + 3), ClgVlvTR[3], ClgVlvTR[2]) Else ClgVlvPSI = 17 ClgVlvTR[8] =
2.5 Endif Goto ConvertingModulating: ClgVlvPSI = PILoop(ContSpace, SetPt,
ClgVlvTR) Goto ConvertingConverting: ConvertNumber(ClgVlvPSI, ClgVlv,
ClgVlvTR[2], ClgVlvTR[3], 100, 0) ConvertNumber(ClgVlvPSI, ClgVlvOp, ClgVlvTR[5],
ClgVlvTR[6], 0.2, 5) Goto ProcessSignalProcessSignal: If (TS >= ClgVlvTR[4]) then
Goto WhichMode EndByteCode
CommandLine : False
Description : Ver. 05.10.2000
Status : Active
EndObject

Object : SpaceCelsius
Type : InfinityProgram
LastChange : 11/3/2014 10:29:25 AM
DeviceId : MorningSide\FairEnvBox_23\Chmbr10C10C
Alias : SpaceCelsius
CreateTime : 10/20/2010 2:09:41 PM
TimeLocked : 11/3/2014 10:29:25 AM
InstanceId : 7545/47
ByteCode :
Space_Celsius = (Space - 32) * 5 / 9 EndByteCode
Status : Active
EndObject

Das könnte Ihnen auch gefallen