PCS7: FB1809 DoseL - APL V8.2+SP1

: 2016-08-20

: komatic

: SCL



dosing



PCS 7 Advanced Process Library v82sp1,



:



:
/ . , 16 .

. PV1CycLi.





dosing








:



:



Name: FB1809
Symbolic Name: DoseL
Symbol Comment: Dose measurement - Large
Family: Dosage
Version: 4.0
Author: AdvLib82
Last modified: 11/19/2015
Use: SFB35,FC260,FC369,SFC20,SFC6
Size: 23178 bytes
Signature: generiert vom SCL bersetzer Version: SCLCOMP K05.03.08.02_01.02.00.01 release





IF PV_A_DG>0.0 THEN (*A968*)
IF SrPV_AH_OffTimer<=0.0 THEN (*A969*)
PV_AH_Act.Value:=xFeat_SwiPoiFalseAct;
ELSE (*A969*)
SrPV_AH_OffTimer:=SrPV_AH_OffTimer-SampleTime;
END_IF;
ELSE (*A968*)
PV_AH_Act.Value:=xFeat_SwiPoiFalseAct;
END_IF;
ELSE (*A967*)
SrPV_AH_OffTimer:=PV_A_DG;
END_IF;
END_IF;(*A96c*)
ELSE (*A960*)
PV_AH_Act.Value:=xFeat_SwiPoiFalseAct;
SrPV_AH_OnTimer:=PV_A_DC;
SrPV_AH_OffTimer:=PV_A_DG;
END_IF;(*A96d*)
dwStatus4_b[19]:=FALSE;
IF ((PV_AL_En) AND Ctrl.Value) AND (NOT((MsgLock.Value) AND xFeat_SwiPoiDis)) THEN (*A96e*)
IF PV_Out.Value<=PV_AL_Lim THEN (*A96f*)
SrPV_AL_OffTimer:=PV_A_DG;
IF PV_A_DC>0.0 THEN (*A970*)
IF SrPV_AL_OnTimer<=0.0 THEN (*A971*)
PV_AL_Act.Value:=NOT(xFeat_SwiPoiFalseAct);
ELSE (*A971*)
SrPV_AL_OnTimer:=SrPV_AL_OnTimer-SampleTime;
dwStatus4_b[19]:=NOT MsgLock.Value AND PV_AL_MsgEn;
END_IF;
ELSE (*A970*)
PV_AL_Act.Value:=NOT(xFeat_SwiPoiFalseAct);
END_IF;
ELSE (*A96f*)
SrPV_AL_OnTimer:=PV_A_DC;
IF PV_Out.Value>(PV_AL_Lim+PV_Hyst) THEN (*A975*)
IF PV_A_DG>0.0 THEN (*A976*)
IF SrPV_AL_OffTimer<=0.0 THEN (*A977*)
PV_AL_Act.Value:=xFeat_SwiPoiFalseAct;
ELSE (*A977*)
SrPV_AL_OffTimer:=SrPV_AL_OffTimer-SampleTime;
END_IF;
ELSE (*A976*)
PV_AL_Act.Value:=xFeat_SwiPoiFalseAct;
END_IF;
ELSE (*A975*)
SrPV_AL_OffTimer:=PV_A_DG;
END_IF;
END_IF;(*A97a*)
ELSE (*A96e*)
PV_AL_Act.Value:=xFeat_SwiPoiFalseAct;
SrPV_AL_OnTimer:=PV_A_DC;
SrPV_AL_OffTimer:=PV_A_DG;
END_IF;(*A97b*)
IF Ctrl.Value THEN (*A97c*)
SxCoarseFlowAlarms:=((xFeat_SwiPoiFalseAct) XOR PV_AL_Act.Value) OR ((xFeat_SwiPoiFalseAct) XOR PV_AH_Act.Value);
END_IF;(*A97c*)
dwStatus4_b[20]:=FALSE;
IF ((PV_AH2_En) AND Ctrl2.Value) AND (NOT((MsgLock.Value) AND xFeat_SwiPoiDis)) THEN (*A97d*)
IF PV_Out.Value>=PV_AH2_Lim THEN (*A97e*)
SrPV_AH2_OffTimer:=PV_A2_DG;
IF PV_A2_DC>0.0 THEN (*A97f*)
IF SrPV_AH2_OnTimer<=0.0 THEN (*A980*)
PV_AH2_Act.Value:=NOT(xFeat_SwiPoiFalseAct);
ELSE (*A980*)
SrPV_AH2_OnTimer:=SrPV_AH2_OnTimer-SampleTime;
dwStatus4_b[20]:=NOT MsgLock.Value AND PV_AH2_MsgEn;
END_IF;
ELSE (*A97f*)
PV_AH2_Act.Value:=NOT(xFeat_SwiPoiFalseAct);
END_IF;
ELSE (*A97e*)
SrPV_AH2_OnTimer:=PV_A2_DC;
IF PV_Out.Value<(PV_AH2_Lim-PV_Hyst2) THEN (*A984*)
IF PV_A2_DG>0.0 THEN (*A985*)
IF SrPV_AH2_OffTimer<=0.0 THEN (*A986*)
PV_AH2_Act.Value:=xFeat_SwiPoiFalseAct;
ELSE (*A986*)
SrPV_AH2_OffTimer:=SrPV_AH2_OffTimer-SampleTime;
END_IF;
ELSE (*A985*)
PV_AH2_Act.Value:=xFeat_SwiPoiFalseAct;
END_IF;
ELSE (*A984*)
SrPV_AH2_OffTimer:=PV_A2_DG;
END_IF;
END_IF;(*A989*)
ELSE (*A97d*)
PV_AH2_Act.Value:=xFeat_SwiPoiFalseAct;
SrPV_AH2_OnTimer:=PV_A2_DC;
SrPV_AH2_OffTimer:=PV_A2_DG;
END_IF;(*A98a*)
dwStatus4_b[21]:=FALSE;
IF ((PV_AL2_En) AND Ctrl2.Value) AND (NOT((MsgLock.Value) AND xFeat_SwiPoiDis)) THEN (*A98b*)
IF PV_Out.Value<=PV_AL2_Lim THEN (*A98c*)
SrPV_AL2_OffTimer:=PV_A2_DG;
IF PV_A2_DC>0.0 THEN (*A98d*)
IF SrPV_AL2_OnTimer<=0.0 THEN (*A98e*)
PV_AL2_Act.Value:=NOT(xFeat_SwiPoiFalseAct);
ELSE (*A98e*)
SrPV_AL2_OnTimer:=SrPV_AL2_OnTimer-SampleTime;
dwStatus4_b[21]:=NOT MsgLock.Value AND PV_AL2_MsgEn;
END_IF;
ELSE (*A98d*)
PV_AL2_Act.Value:=NOT(xFeat_SwiPoiFalseAct);
END_IF;
ELSE (*A98c*)
SrPV_AL2_OnTimer:=PV_A2_DC;
IF PV_Out.Value>(PV_AL2_Lim+PV_Hyst2) THEN (*A992*)
IF PV_A2_DG>0.0 THEN (*A993*)
IF SrPV_AL2_OffTimer<=0.0 THEN (*A994*)
PV_AL2_Act.Value:=xFeat_SwiPoiFalseAct;
ELSE (*A994*)
SrPV_AL2_OffTimer:=SrPV_AL2_OffTimer-SampleTime;
END_IF;
ELSE (*A993*)
PV_AL2_Act.Value:=xFeat_SwiPoiFalseAct;
END_IF;
ELSE (*A992*)
SrPV_AL2_OffTimer:=PV_A2_DG;
END_IF;
END_IF;(*A997*)
ELSE (*A98b*)
PV_AL2_Act.Value:=xFeat_SwiPoiFalseAct;
SrPV_AL2_OnTimer:=PV_A2_DC;
SrPV_AL2_OffTimer:=PV_A2_DG;
END_IF;(*A998*)
IF Ctrl2.Value THEN (*A99a*)
SxFineFlowAlarms:=((xFeat_SwiPoiFalseAct) XOR PV_AL2_Act.Value) OR ((xFeat_SwiPoiFalseAct) XOR PV_AH2_Act.Value);
END_IF;
ELSE (*A94e*)
PV_AL2_Act.Value:=xFeat_SwiPoiFalseAct;
PV_AH2_Act.Value:=xFeat_SwiPoiFalseAct;
PV_AH_Act.Value:=xFeat_SwiPoiFalseAct;
PV_AL_Act.Value:=xFeat_SwiPoiFalseAct;
SxCoarseFlowAlarms:=FALSE;
SxFineFlowAlarms:=FALSE;
END_IF;(*A99a*)
 
IF xFlowProcessing THEN (*A99b*)
CR_AH_Act.ST:=PV_Out.ST;
IF CR_A_DC<0.0 THEN (*A99c*)
CR_A_DC:=0.0;
END_IF;(*A99c*)
IF CR_A_DG<0.0 THEN (*A99d*)
CR_A_DG:=0.0;
END_IF;(*A99d*)
IF CR_Hyst<0.0 THEN (*A99e*)
CR_Hyst:=0.0;
END_IF;(*A99e*)
IF SrCR_A_DC<>CR_A_DC THEN (*A99f*)
IF SrCR_AH_OnTimer>0.0 THEN (*A99f*)
SrCR_AH_OnTimer:=CR_A_DC;
END_IF;
END_IF;(*A99f*)
SrCR_A_DC:=CR_A_DC;
IF SrCR_A_DG<>CR_A_DG THEN (*A9a1*)
IF SrCR_AH_OffTimer>0.0 THEN (*A9a1*)
SrCR_AH_OffTimer:=CR_A_DG;
END_IF;
END_IF;(*A9a1*)
SrCR_A_DG:=CR_A_DG;
dwStatus4_b[22]:=FALSE;
IF (((NOT(DosOn.Value)) AND CR_AH_En) AND (NOT(DosRelax.Value))) AND (NOT((MsgLock.Value) AND xFeat_SwiPoiDis)) THEN (*A9a3*)
IF PV_Out.Value>CR_AH_Lim THEN (*A9a4*)
SrCR_AH_OffTimer:=CR_A_DG;
IF CR_A_DC>0.0 THEN (*A9a5*)
IF SrCR_AH_OnTimer<=0.0 THEN (*A9a6*)
CR_AH_Act.Value:=NOT(xFeat_SwiPoiFalseAct);
ELSE (*A9a6*)
SrCR_AH_OnTimer:=SrCR_AH_OnTimer-SampleTime;
dwStatus4_b[22]:=NOT MsgLock.Value AND CR_AH_MsgEn;
END_IF;
ELSE (*A9a5*)
CR_AH_Act.Value:=NOT(xFeat_SwiPoiFalseAct);
END_IF;
ELSE (*A9a4*)
SrCR_AH_OnTimer:=CR_A_DC;
IF PV_Out.Value<=(CR_AH_Lim-CR_Hyst) THEN (*A9aa*)
IF CR_A_DG>0.0 THEN (*A9ab*)
IF SrCR_AH_OffTimer<=0.0 THEN (*A9ac*)
CR_AH_Act.Value:=xFeat_SwiPoiFalseAct;
ELSE (*A9ac*)
SrCR_AH_OffTimer:=SrCR_AH_OffTimer-SampleTime;
END_IF;
ELSE (*A9ab*)
CR_AH_Act.Value:=xFeat_SwiPoiFalseAct;
END_IF;
ELSE (*A9aa*)
SrCR_AH_OffTimer:=CR_A_DG;
END_IF;
END_IF;(*A9af*)
ELSE (*A9a3*)
CR_AH_Act.Value:=xFeat_SwiPoiFalseAct;
SrCR_AH_OnTimer:=CR_A_DC;
SrCR_AH_OffTimer:=CR_A_DG;
END_IF;
ELSE (*A99b*)
CR_AH_Act.Value:=xFeat_SwiPoiFalseAct;
END_IF;(*A9b1*)
dwStatus4_b[23]:=dwStatus4_b[16] OR dwStatus4_b[17] OR dwStatus4_b[18] OR dwStatus4_b[19] OR dwStatus4_b[20] OR dwStatus4_b[21] OR dwStatus4_b[22];
SumMsgAct.Value:=(((((((((((xFeat_SwiPoiFalseAct) XOR DQ_AH_Act.Value) OR ((xFeat_SwiPoiFalseAct) XOR DQ_AL_Act.Value)) OR ((xFeat_SwiPoiFalseAct) XOR PV_AH_Act.Value)) OR
((xFeat_SwiPoiFalseAct) XOR PV_AL_Act.Value)) OR ((xFeat_SwiPoiFalseAct) XOR PV_AH2_Act.Value)) OR ((xFeat_SwiPoiFalseAct) XOR PV_AL2_Act.Value)) OR
((xFeat_SwiPoiFalseAct) XOR CR_AH_Act.Value)) OR CSF.Value) OR ExtMsg1.Value) OR ExtMsg2.Value) OR ExtMsg3.Value;
ErrorNum:=xErrorNum;
stcInST.b0:=DQ_Out.ST;
stcInST.b1:=DQ_SP.ST;
stcInST.b2:=SP.ST;
stcInST.b3:=StandStill.ST;
stcInST.b4:=PV_Out.ST;
stcInST.b5:=LocalLi.ST;
stcInST.b6:=StartLocal.ST;
stcInST.b7:=CancelLocal.ST;
stcInST.b8:=PauseLocal.ST;
stcInST.b9:=ContLocal.ST;
stcInST.b10:=CtrlChnST.ST;
stcInST.b11:=Ctrl2ChnST.ST;
ST_Worst:=SelST16(InST := stcInST
,Num := 12
,SelPrio := 0
);
IF SnRunUpCyc>0 THEN (*A7e8*)
SnRunUpCyc:=SnRunUpCyc-1;
END_IF;(*A7e8*)
END_IF;
 
IF ((SnRunUpCyc=0) AND xOB_Cycle) OR xOB_Start THEN (*A9b3*)
IF SnMsgToggle>=1 THEN (*A9b4*)
SnMsgToggle:=0;
ELSE (*A9b4*)
SnMsgToggle:=1;
END_IF;(*A9b5*)
SdwStepNoLoc:=StepNo;
SdwBatchId:=BatchID;
IF SdwPrevBatchId<>SdwBatchId THEN (*A9b6*)
FOR SnErr:=1 TO 32 BY 1 DO
SarBatchName[SnErr]:=B#16#0;
END_FOR; (*A9b8*)
SnErr:=BLKMOV(SRCBLK := BatchName
,DSTBLK := SarBatchName
);
SdwPrevBatchId:=SdwBatchId;
END_IF;(*A9b6*)
IF OosAct.Value THEN (*A9b9*)
SbMsgEff1:=B#16#0;
ELSE (*A9b9*)
SbMsgEff1_b[0]:=(((xFeat_SwiPoiFalseAct) XOR DQ_AH_Act.Value) AND DQ_AH_MsgEn) AND (NOT(MsgLock.Value));
SbMsgEff1_b[1]:=(((xFeat_SwiPoiFalseAct) XOR DQ_AL_Act.Value) AND DQ_AL_MsgEn) AND (NOT(MsgLock.Value));
SbMsgEff1_b[2]:=((((xFeat_SwiPoiFalseAct) XOR PV_AH_Act.Value) AND PV_AH_MsgEn) AND xFlowProcessing) AND (NOT(MsgLock.Value));
SbMsgEff1_b[3]:=((((xFeat_SwiPoiFalseAct) XOR PV_AL_Act.Value) AND PV_AL_MsgEn) AND xFlowProcessing) AND (NOT(MsgLock.Value));
SbMsgEff1_b[4]:=((((xFeat_SwiPoiFalseAct) XOR PV_AH2_Act.Value) AND PV_AH2_MsgEn) AND xFlowProcessing) AND (NOT(MsgLock.Value));
SbMsgEff1_b[5]:=((((xFeat_SwiPoiFalseAct) XOR PV_AL2_Act.Value) AND PV_AL2_MsgEn) AND xFlowProcessing) AND (NOT(MsgLock.Value));
SbMsgEff1_b[6]:=((((xFeat_SwiPoiFalseAct) XOR CR_AH_Act.Value) AND CR_AH_MsgEn) AND xFlowProcessing) AND (NOT(MsgLock.Value));
SbMsgEff1_b[7]:=(((nCmd=2) AND (SnPrevCmd<>2)) AND DosCancelMsgEn) AND (NOT(MsgLock.Value));
END_IF;(*A9ba*)
IF ((SbMsgEff1Old<>SbMsgEff1) OR SxShowAlarm1) OR ((((NOT(OosAct.Value)) AND Feature.Bit22) AND (SnMsgToggle=0)) AND (((MsgAckn1 AND W#16#FF)<>W#16#FF) OR (ALARM_8P_1.STATUS<>W#16#0))) THEN (*A9bb*)
ALARM_8P_1(EN_R := TRUE
,ID := W#16#EEEE // IN: WORD
,EV_ID := MsgEvId1 // IN: DWORD
,SIG_1 := SbMsgEff1_b[0]
,SIG_2 := SbMsgEff1_b[1]
,SIG_3 := SbMsgEff1_b[2]
,SIG_4 := SbMsgEff1_b[3]
,SIG_5 := SbMsgEff1_b[4]
,SIG_6 := SbMsgEff1_b[5]
,SIG_7 := SbMsgEff1_b[6]
,SIG_8 := SbMsgEff1_b[7]
,SD_1 := SarBatchName
,SD_2 := SdwStepNoLoc
,SD_3 := SdwBatchId
,SD_4 := DQ_Out.Value
,SD_5 := PV_Out.Value
,SD_6 := ExtVa106
,SD_7 := ExtVa107
,SD_8 := ExtVa108
);
 
IF Feature.Bit22 THEN (*A9bc*)
MsgErr1:=ALARM_8P_1.ERROR;
MsgStat1:=ALARM_8P_1.STATUS;
MsgAckn1:=ALARM_8P_1.ACK_STATE;
ELSE (*A9bc*)
MsgErr1:=FALSE;
MsgStat1:=W#16#0;
MsgAckn1:=W#16#0;
END_IF;(*A9bd*)
SbMsgEff1Old:=SbMsgEff1;
SxShowAlarm1:=ALARM_8P_1.STATUS=W#16#14;
END_IF;(*A9bb*)
IF OosAct.Value THEN (*A9be*)
SbMsgEff2:=B#16#0;
ELSE (*A9be*)
SbMsgEff2_b[0]:=(NOT((MsgLock.Value) AND xFeatMsgLockAll)) AND CSF.Value;
SbMsgEff2_b[1]:=(NOT((MsgLock.Value) AND xFeatMsgLockAll)) AND ExtMsg1.Value;
SbMsgEff2_b[2]:=(NOT((MsgLock.Value) AND xFeatMsgLockAll)) AND ExtMsg2.Value;
SbMsgEff2_b[3]:=(NOT((MsgLock.Value) AND xFeatMsgLockAll)) AND ExtMsg3.Value;
END_IF;(*A9bf*)
IF ((SbMsgEff2Old<>SbMsgEff2) OR SxShowAlarm2) OR ((((NOT(OosAct.Value)) AND Feature.Bit22) AND (SnMsgToggle=1)) AND (((MsgAckn2 AND W#16#FF)<>W#16#FF) OR (ALARM_8P_2.STATUS<>W#16#0))) THEN (*A9b3*)
ALARM_8P_2(EN_R := TRUE
,ID := W#16#EEEE // IN: WORD
,EV_ID := MsgEvId2 // IN: DWORD
,SIG_1 := SbMsgEff2_b[0]
,SIG_2 := SbMsgEff2_b[1]
,SIG_3 := SbMsgEff2_b[2]
,SIG_4 := SbMsgEff2_b[3]
,SIG_5 := FALSE
,SIG_6 := FALSE
,SIG_7 := FALSE
,SIG_8 := FALSE
,SD_1 := SarBatchName
,SD_2 := SdwStepNoLoc
,SD_3 := SdwBatchId
,SD_4 := ExtVa204
,SD_5 := ExtVa205
,SD_6 := ExtVa206
,SD_7 := ExtVa207
,SD_8 := ExtVa208
);
 
IF Feature.Bit22 THEN (*A9c1*)
MsgErr2:=ALARM_8P_2.ERROR;
MsgStat2:=ALARM_8P_2.STATUS;
MsgAckn2:=ALARM_8P_2.ACK_STATE;
ELSE (*A9c1*)
MsgErr2:=FALSE;
MsgStat2:=W#16#0;
MsgAckn2:=W#16#0;
END_IF;(*A9c2*)
SbMsgEff2Old:=SbMsgEff2;
SxShowAlarm2:=ALARM_8P_2.STATUS=W#16#14;
END_IF;
END_IF;(*A9b3*)
 
IF (xOB_Start) OR xOB_Cycle THEN (*A9c3*)
IF NOT(OosAct.Value) THEN (*A9c4*)
GrpErr.Value:=((CSF.Value) OR xFaultExtCSF) OR SxResetNeededFaultExtCSF;
RdyToStart.Value:=((((((NOT((xFaultExtCSF) OR SxResetNeededFaultExtCSF)) AND AutAct.Value) AND (NOT(SxForceInputActive))) AND (NOT(LockAct.Value))) AND
(NOT(DosRelax.Value))) AND (NOT((DQ_AL_Act.Value) XOR xFeat_SwiPoiFalseAct))) AND ((DQ_Out.Value<DQ_SP.Value) OR xFeatResetQuantity);
END_IF;(*A9c4*)
IF (((LocalAct.Value) OR xSimAct) AND BypProt) OR DosRelax.Value THEN (*A9c5*)
xInterlocked:=FALSE;
ELSE (*A9c5*)
xInterlocked:=(((xIntlock_N) OR xProtect_N) OR SxResetNeededProtect) OR ((NOT(DosOn.Value)) AND xPermit_N);
END_IF;(*A9c6*)

IF (EventTsIn_st.b1=B#16#2) AND (EventTsIn_st.w2=W#16#16) THEN (*A9c7*)
diOffset:=DWORD_TO_DINT(EventTsIn_st.dw4 AND DW#16#FFFFFF)/8;
wEventTsIn:=WORD_TO_BLOCK_DB(EventTsIn_st.w3).DW[diOffset];

EvtTs_Mode.Connected:=TRUE;
EvtTs_Mode.MS_Release:=MS_Release.Value;
EvtTs_Mode.MsgLock:=MsgLock.Value;
EvtTs_Mode.OosAct:=OosAct.Value;
EvtTs_Mode.BatchEn:=BatchEn;
EvtTs_Mode.Occupied:=Occupied;

diOffset:=diOffset+2;
WORD_TO_BLOCK_DB(EventTsIn_st.w3).DW[diOffset]:=EvtTs_Mode_w;
diOffset:=diOffset+2;
WORD_TO_BLOCK_DB(EventTsIn_st.w3).DD[diOffset]:=BatchID;
diOffset:=diOffset+4;
WORD_TO_BLOCK_DB(EventTsIn_st.w3).DB[diOffset]:=tempANY_st.b0;
diOffset:=diOffset+1;
WORD_TO_BLOCK_DB(EventTsIn_st.w3).DB[diOffset]:=tempANY_st.b1;
diOffset:=diOffset+1;
WORD_TO_BLOCK_DB(EventTsIn_st.w3).DW[diOffset]:=tempANY_st.w2;
diOffset:=diOffset+2;
WORD_TO_BLOCK_DB(EventTsIn_st.w3).DW[diOffset]:=tempANY_st.w3;
diOffset:=diOffset+2;
WORD_TO_BLOCK_DB(EventTsIn_st.w3).DD[diOffset]:=tempANY_st.dw4;
diOffset:=diOffset+4;
WORD_TO_BLOCK_DB(EventTsIn_st.w3).DD[diOffset]:=StepNo;
ELSE (*A9c7*)
wEventTsIn:=W#16#0;
END_IF;(*A9c8*)
IF NOT(OosAct.Value) THEN (*A9c9*)
dwStatus1_b[24]:=Occupied;
dwStatus1_b[25]:=BatchEn;
dwStatus1_b[26]:=xSimAct;
dwStatus1_b[30]:=LocalAct.Value;
dwStatus1_b[31]:=xInterlocked;
dwStatus1_b[16]:=SP_ExtAct.Value;
dwStatus1_b[17]:=Ctrl.Value;
dwStatus1_b[18]:=Ctrl2.Value;
dwStatus1_b[19]:=xFeatWeightMeasurement;
dwStatus1_b[20]:=MeterType;
dwStatus1_b[21]:=((((BypProt) AND xSimAct) OR ((((LocalSetting=1) OR (LocalSetting=3)) AND LocalAct.Value) AND BypProt)) OR ((LocalSetting=2) AND LocalAct.Value)) OR SxForceInputActive;
dwStatus1_b[22]:=(xInvalidCommand) OR xInvalidMode;
dwStatus1_b[23]:=xOutStatusWord1x15;
dwStatus1_b[8]:=xIntlock_N;
dwStatus1_b[9]:=(NOT(DosOn.Value)) AND xPermit_N;
dwStatus1_b[10]:=(xProtect_N) OR SxResetNeededProtect;
dwStatus1_b[11]:=DosOn.Value;
dwStatus1_b[12]:=DosRelax.Value;
dwStatus1_b[13]:=DosEnd.Value;
dwStatus1_b[14]:=DosOff.Value;
dwStatus1_b[15]:=DosPause.Value;
dwStatus1_b[0]:=DosStart.Value;
dwStatus1_b[1]:=SxPostDose;
CASE nCmd OF
1 :
dwStatus1_b[2]:=TRUE;
dwStatus1_b[3]:=FALSE;
dwStatus1_b[4]:=FALSE;
dwStatus1_b[5]:=FALSE;
3 :
dwStatus1_b[2]:=FALSE;
dwStatus1_b[3]:=TRUE;
dwStatus1_b[4]:=FALSE;
dwStatus1_b[5]:=FALSE;
4 :
dwStatus1_b[2]:=FALSE;
dwStatus1_b[3]:=FALSE;
dwStatus1_b[4]:=TRUE;
dwStatus1_b[5]:=FALSE;
2,7,8,9 :
dwStatus1_b[2]:=FALSE;
dwStatus1_b[3]:=FALSE;
dwStatus1_b[4]:=FALSE;
dwStatus1_b[5]:=TRUE;
ELSE:
dwStatus1_b[2]:=FALSE;
dwStatus1_b[3]:=FALSE;
dwStatus1_b[4]:=FALSE;
dwStatus1_b[5]:=FALSE;
END_CASE;
(*A9ca*)
dwStatus1_b[6]:=BYTE_TO_INT(UserAna1.ST)<255;
dwStatus1_b[7]:=BYTE_TO_INT(UserAna2.ST)<255;

dwStatus2_b[24]:=MsgLock.Value;
dwStatus2_b[27]:=DQ_AH_En;
dwStatus2_b[28]:=DQ_AL_En;
dwStatus2_b[29]:=DQ_AH_MsgEn;
dwStatus2_b[30]:=DQ_AL_MsgEn;
dwStatus2_b[17]:=(PV_AH_En) AND xFlowProcessing;
dwStatus2_b[18]:=(PV_AL_En) AND xFlowProcessing;
dwStatus2_b[19]:=PV_AH_MsgEn;
dwStatus2_b[20]:=PV_AL_MsgEn;
dwStatus2_b[23]:=(PV_AH2_En) AND xFlowProcessing;
dwStatus2_b[8]:=(PV_AL2_En) AND xFlowProcessing;
dwStatus2_b[9]:=PV_AH2_MsgEn;
dwStatus2_b[10]:=PV_AL2_MsgEn;
dwStatus2_b[12]:=(CR_AH_En) AND xFlowProcessing;
dwStatus2_b[13]:=CR_AH_MsgEn;
dwStatus2_b[14]:=((xIntl_En) OR xPerm_En) OR xProt_En;
dwStatus2_b[15]:=((NOT(SxTareDone)) AND xFeatWeightMeasurement) AND DosOn.Value;
IF (((((((((NOT(xFeatSwitchMode)) AND StartAut.Value) AND CancelAut.Value) AND AutAct.Value) OR
(((NOT(xFeatSwitchMode)) AND StartAut.Value) AND ContAut.Value)) OR
(((NOT(xFeatSwitchMode)) AND StartAut.Value) AND PauseAut.Value)) OR
(((NOT(xFeatSwitchMode)) AND CancelAut.Value) AND PauseAut.Value)) OR
(((NOT(xFeatSwitchMode)) AND CancelAut.Value) AND ContAut.Value)) OR
(((NOT(xFeatSwitchMode)) AND PauseAut.Value) AND ContAut.Value)) OR xOB_Start THEN (*A9d3*)
dwStatus2_b[0]:=DosOn.Value;
dwStatus2_b[1]:=DosRelax.Value;
dwStatus2_b[2]:=DosEnd.Value;
dwStatus2_b[3]:=DosOff.Value;
dwStatus2_b[4]:=DosPause.Value;
ELSE (*A9d3*)
IF ((((NOT(SxStartAut)) AND StartAut.Value) AND xStartCmd) AND (NOT((xFeatSwitchMode) AND PauseAut.Value))) OR
((((NOT(xFeatSwitchMode)) AND ContAut.Value) OR (((xFeatSwitchMode) AND StartAut.Value) AND (NOT(PauseAut.Value)))) AND xContCmd) THEN (*A9d5*)
dwStatus2_b[0]:=TRUE;
dwStatus2_b[1]:=FALSE;
dwStatus2_b[2]:=FALSE;
dwStatus2_b[3]:=FALSE;
dwStatus2_b[4]:=FALSE;
ELSIF (((NOT(xFeatSwitchMode)) AND CancelAut.Value) OR ((NOT(StartAut.Value)) AND xFeatSwitchMode)) AND (NOT(DosEnd.Value)) THEN (*A9d7*)
dwStatus2_b[0]:=FALSE;
dwStatus2_b[1]:=FALSE;
dwStatus2_b[2]:=TRUE;
dwStatus2_b[3]:=FALSE;
dwStatus2_b[4]:=FALSE;
ELSIF (PauseAut.Value) AND DosOn.Value THEN (*A9d8*)
dwStatus2_b[0]:=FALSE;
dwStatus2_b[1]:=FALSE;
dwStatus2_b[2]:=FALSE;
dwStatus2_b[3]:=FALSE;
dwStatus2_b[4]:=TRUE;
ELSE (*A9d8*)
dwStatus2_b[0]:=DosOn.Value;
dwStatus2_b[1]:=DosRelax.Value;
dwStatus2_b[2]:=DosEnd.Value;
dwStatus2_b[3]:=DosOff.Value;
dwStatus2_b[4]:=DosPause.Value;
END_IF;
END_IF;(*A9d4*)
dwStatus2_b[5]:=((((StartForce.Value) OR CancelForce.Value) OR PauseForce.Value) OR ContForce.Value) AND (NOT(LocalAct.Value));
IF xFeatBypass THEN (*A9d9*)
dwStatus2_b[6]:=(((Intl_En) AND Intlock_b[1]) OR ((Prot_En) AND Protect_b[1])) OR ((Perm_En) AND Permit_b[1]);
ELSE (*A9d9*)
dwStatus2_b[6]:=((((Intlock.Value) AND Intl_En) AND (Intlock.ST=B#16#60)) OR (((Protect.Value) AND Prot_En) AND (Protect.ST=B#16#60))) OR (((Permit.Value) AND Perm_En) AND (Permit.ST=B#16#60));
END_IF;(*A9da*)
dwStatus3_b[24]:=xIntl_En;
dwStatus3_b[25]:=xPerm_En;
dwStatus3_b[26]:=xProt_En;
dwStatus3_b[27]:=DosCancelMsgEn;
dwStatus3_b[28]:=xFeat_FlowInWeightMode;
dwStatus3_b[29]:=xFlowProcessing;
dwStatus3_b[30]:=xFeatFlowSPInPercent;
dwStatus3_b[31]:=NOT((xFeatFlowSPInPercent) OR xFeatWeightMeasurement);
dwStatus3_b[16]:=((NOT(xOSPerResetProtect)) AND xResetEnabled) AND AutAct.Value;
dwStatus3_b[17]:=xFeatFineQtyAbsolute;
dwStatus3_b[18]:=SimLiOp.Value;
dwStatus3_b[19]:=(xFaultExtCSF) OR SxResetNeededFaultExtCSF;
IF (SxOverdosage) AND xFeatOvDoseAckn THEN (*A9db*)
dwStatus3_b[20]:=TRUE;
END_IF;(*A9db*)
IF (NOT(xFeatOvDoseAckn)) OR SxUnderdosage THEN (*A9dc*)
dwStatus3_b[20]:=FALSE;
END_IF;(*A9dc*)
dwStatus3_b[21]:=(DosEnd.Value) AND SxDosEndWithAckn;
dwStatus3_b[11]:=(((NOT(xFrcInvalidCommand)) AND StartForce.Value) OR ((xFrcInvalidCommand) AND (dwStatus1_b[2]))) AND (NOT(LocalAct.Value));
dwStatus3_b[12]:=(((NOT(xFrcInvalidCommand)) AND CancelForce.Value) OR (((xFrcInvalidCommand)) AND (dwStatus1_b[5]))) AND (NOT(LocalAct.Value));
dwStatus3_b[13]:=(((NOT(xFrcInvalidCommand)) AND PauseForce.Value) OR ((xFrcInvalidCommand) AND (dwStatus1_b[3]))) AND (NOT(LocalAct.Value));
dwStatus3_b[14]:=(((NOT(xFrcInvalidCommand)) AND ContForce.Value) OR ((xFrcInvalidCommand) AND (dwStatus1_b[4]))) AND (NOT(LocalAct.Value));
dwStatus3_b[4]:=GrpErr.Value;
dwStatus3_b[5]:=RdyToStart.Value;
dwStatus3_b[6]:=NOT(CtrlChnST.ST=B#16#FF);
dwStatus3_b[7]:=NOT(Ctrl2ChnST.ST=B#16#FF);
dwStatus4_byte[3]:=wEventTsIn_b[1];
dwStatus5_byte[3]:=wEventTsIn_b[0];
 
dwStatus4_b[15]:=Permit_b[1];
dwStatus4_b[0]:=Intlock_b[1];
dwStatus4_b[1]:=Protect_b[1];
dwStatus4_b[2]:=xFeatBypass;
ELSE (*A9c9*)
dwStatus1:=DW#16#0;
dwStatus2:=dwStatus2 AND DW#16#1F000000;
dwStatus3:=DW#16#0;
dwStatus4:=DW#16#0;
dwStatus5:=DW#16#0;
END_IF;(*A9dd*)
dwStatus1_b[27]:=OosAct.Value;
dwStatus1_b[28]:=OosLi.Value;
dwStatus1_b[29]:=AutAct.Value;
dwStatus2_b[25]:=(xFeat_SwiPoiFalseAct) XOR DQ_AH_Act.Value;
dwStatus2_b[26]:=(xFeat_SwiPoiFalseAct) XOR DQ_AL_Act.Value;
dwStatus2_b[31]:=(xFeat_SwiPoiFalseAct) XOR PV_AH_Act.Value;
dwStatus2_b[16]:=(xFeat_SwiPoiFalseAct) XOR PV_AL_Act.Value;
dwStatus2_b[21]:=(xFeat_SwiPoiFalseAct) XOR PV_AH2_Act.Value;
dwStatus2_b[22]:=(xFeat_SwiPoiFalseAct) XOR PV_AL2_Act.Value;
dwStatus2_b[11]:=(xFeat_SwiPoiFalseAct) XOR CR_AH_Act.Value;
dwStatus2_b[7]:=MS_RelOp;
Status1:=dwStatus1;
Status2:=dwStatus2;
Status3:=dwStatus3;
Status4:=dwStatus4;
Status5:=dwStatus5;
dwOS_Perm_byte[3]:=OS_Perm_b[0];
dwOS_Perm_byte[2]:=OS_Perm_b[1];
dwOS_Perm_byte[1]:=OS_Perm_b[2];
dwOS_Perm_byte[0]:=OS_Perm_b[3];
OS_PermOut:=dwOS_Perm;
IF xOB_Start THEN (*A9de*)
OS_PermLog:=DW#16#0;
ELSIF OosAct.Value THEN (*A9e0*)
OS_PermLog:=DW#16#80002 AND OS_PermOut;
ELSE (*A9e0*)
dwOS_Perm:=OS_Perm_dw;
dwOS_Perm_b[0]:=(NOT(xBumpLessTransfer)) AND xOSPerAuto;
dwOS_Perm_b[1]:=xOSPerMan;
dwOS_Perm_b[2]:=xOSPerLocal;
dwOS_Perm_b[3]:=xOSPerOOS;
dwOS_Perm_b[4]:=xOSPerStart;
dwOS_Perm_b[5]:=xOSPerPause;
dwOS_Perm_b[6]:=xOSPerContinue;
dwOS_Perm_b[7]:=xOSPerCancel;
dwOS_Perm_b[8]:=xOSPerResetProtect;
dwOS_Perm_b[9]:=xOSPerResetQuantity;
dwOS_Perm_b[10]:=xOSPerAcknOverUnderdose;
dwOS_Perm_b[11]:=xOSPerSPExt;
dwOS_Perm_b[12]:=xOSPerSPInt;
dwOS_Perm_b[13]:=xOSPerSPQuantity;
dwOS_Perm_b[14]:=xOSPerSPQuantityFine;
dwOS_Perm_b[15]:=xOSPerSPFlowRate;
dwOS_Perm_b[16]:=xOSPerSPFlowRateFine;
dwOS_Perm_b[18]:=(NOT(SimLiOp.Value)) AND xOSPerSim;
dwOS_Perm_b[19]:=(xOSPerMSRel) AND ManAct.Value;
dwOS_Perm_b[21]:=(((NOT(DosRelax.Value)) AND xFeatChangeDribbVal) OR DosEnd.Value) AND xOSPerDribbIn;
dwOS_Perm_b[25]:=((((xOSPerSimPV) AND SimOn) AND (NOT(SimLiOp.Value))) AND (NOT(OosAct.Value))) AND (NOT(xFeatWeightMeasurement));
dwOS_Perm_b[26]:=(((xOSPerSimDQ) AND SimOn) AND (NOT(SimLiOp.Value))) AND (NOT(OosAct.Value));

byTemp:=dwOS_Perm_byte[3];
dwOS_Perm_byte[3]:=dwOS_Perm_byte[0];
dwOS_Perm_byte[0]:=byTemp;
byTemp:=dwOS_Perm_byte[2];
dwOS_Perm_byte[2]:=dwOS_Perm_byte[1];
dwOS_Perm_byte[1]:=byTemp;
OS_PermLog:=dwOS_Perm;
END_IF;(*A9df*)
dwOS_Perm_byte[3]:=OS1Perm_byte[0];
dwOS_Perm_byte[2]:=OS1Perm_byte[1];
dwOS_Perm_byte[1]:=OS1Perm_byte[2];
dwOS_Perm_byte[0]:=OS1Perm_byte[3];

OS1PermOut:=dwOS_Perm;
IF xOB_Start THEN (*A9e1*)
OS1PermLog:=DW#16#0;
ELSIF OosAct.Value THEN (*A9e3*)
OS1PermLog:=DW#16#0;
ELSE (*A9e3*)
OS1PermLog:=dwOS_Perm;
END_IF;(*A9e2*)
IF NOT(OosAct.Value) THEN (*A9e4*)
IF (xLiResetRequest) AND xResetEnabled THEN (*A9e5*)
RdyToReset.Value:=TRUE;
ELSE (*A9e5*)
RdyToReset.Value:=FALSE;
END_IF;(*A9e6*)
SxRstLi:=RstLi.Value;
SxResetDQLi:=RstDQ_Li.Value;
SxUAckLi:=U_AckLi.Value;
SnPrevCmd:=nCmd;
SxStartAut:=StartAut.Value;
SxContAut:=ContAut.Value;
SxPauseAut:=PauseAut.Value;
SxStartLocal:=StartLocal.Value;
SxPauseLocal:=PauseLocal.Value;
SxCancelLocal:=CancelLocal.Value;
SxContLocal:=ContLocal.Value;
SrPrevSimDQ:=SimDQ;
SxSPExtAct:=SP_ExtAct.Value;
END_IF;(*A9e4*)
OosOp:=FALSE;
IF NOT(OosAct.Value) THEN (*A9c3*)
StartMan:=FALSE;
CancelMan:=FALSE;
PauseMan:=FALSE;
ContMan:=FALSE;
RstOp:=FALSE;
AutModOp:=FALSE;
ManModOp:=FALSE;
LocalOp:=FALSE;
U_AckOp:=FALSE;
RstDQ_Op:=FALSE;
SP_IntOp:=FALSE;
SP_ExtOp:=FALSE;
IF xFeatResetAutModLi THEN (*A9e8*)
AutModLi.Value:=FALSE;
ManModLi.Value:=FALSE;
END_IF;(*A9e8*)
IF xFeatResetAutInLi THEN (*A9c3*)
RstLi.Value:=FALSE;
StartAut.Value:=FALSE;
CancelAut.Value:=FALSE;
PauseAut.Value:=FALSE;
ContAut.Value:=FALSE;
END_IF;
END_IF;
END_IF;(*A9c3*)
END_FUNCTION_BLOCK





dosing










dosing


SCADA







dose

Block checksum .



PCS7 (APL (V8.2sp1) (zip, 1.3Mb)

(pdf, 21Mb)







: 3244

: xflash    : 2016-08-26

It seems that the first part of code and statements are missing...

It is glad you are back.

: komatic    : 2016-08-26

New rules now -
full versions of some sources sends personally by email after donate project of any amount.
link on main page.
Thank you for your attention to this project.

: xflash    : 2016-08-29

Well, I didn't notice that. Webmoney is very unusable in my region. Is there any other way?
I didn't get your reply, I will try other method.

:

(4000 max):

: