batch-example-2/plc/code/s5/original/fx-blocks/fx-105-blend

584 lines
14 KiB
Plaintext

Segment 1
*****************************************************************************
BESCHREIBUNG :
---------------
Dieser Baustein setzt das PLI ( Phase Logic Interface ) von Open - Batch
auf die Schnittstelle HsH - PC zur SPS - Waage ( DB 210 ) um
******************************************************************************
PARAMETER :
-----------
PLDX : Nr. des DX Datenbaustein fuer PLI
OFFS : Offset fuer PLI Anfang
WZNR : Zaehlnummer der SPS - Waage
DBPC : Datenbaustein fuer Schnittstelle PC - SPS Waage
DBST : Steuerdatenbaustein PC - SPS Waage
AUTO : Automatik - Mode
******************************************************************************
Name :PL-SS-BL
Decl :PLDX I/Q/D/B/T/C: D KM/KH/KY/KS/KF/KT/KC/KG: KF
Decl :OFFS I/Q/D/B/T/C: D KM/KH/KY/KS/KF/KT/KC/KG: KF
Decl :MADB I/Q/D/B/T/C: D KM/KH/KY/KS/KF/KT/KC/KG: KF
Decl :EOSI I/Q/D/B/T/C: I BI/BY/W/D: BI
Decl :BLEN I/Q/D/B/T/C: Q BI/BY/W/D: BI
Decl :UNID I/Q/D/B/T/C: I BI/BY/W/D: BI
Decl :PREP I/Q/D/B/T/C: Q BI/BY/W/D: BI
Decl :TDDP I/Q/D/B/T/C: T
:***
Segment 2 PLI DX oeffnen
:LW =PLDX
:T -MW188 ADDR_OBJECT_DB/DX
:DO -MW188 ADDR_OBJECT_DB/DX
:CX -DX 0 SYSTEM PARAMETER
:***
FW 188 = MW188 ADDR_OBJECT_DB/DX
DX 0 = DX 0 SYSTEM PARAMETER
Segment 3 Load Control bits PLI
:LW =OFFS
:L KF +10
:+F
:T -MW186 DW_ADDRESS
:DO -MW186 DW_ADDRESS
:L DW 0
:T -MW 168_OUT_PLI Ausgangsbitleiste von PLI
: --------------------------------
:L -MW186 DW_ADDRESS
:L KF +1
:+F
:T -MW186 DW_ADDRESS 11
:DO -MW186 DW_ADDRESS
:L DW 0
:T -MW 166_IN_PLI Eingangsbitleiste von PLI
: --------------------------------
:***
FW 186 = MW186 DW_ADDRESS
FW 168 = MW 168_OUT_PLI Ausgangssteuerbitleiste von PLI
FW 166 = MW 166_IN_PLI Eingangsbitleiste an PLI
Segment 4 Load Status bits PLI/ Unit idle
:LW =OFFS
:L KF +19
:+F
:T -MW186 DW_ADDRESS
:DO -MW186 DW_ADDRESS
:L DW 0
:T -MW 160_STATUS_PL Status bits PLI
: --------------------------------
:JU =M001 !!! TEST !!!
:A -MO169.4 START_BY_PLI
:AN =UNID
:R -MO169.4 START_BY_PLI
:S -MI167.4 IDLE(ready)
M001 :***
FW 186 = MW186 DW_ADDRESS
FW 160 = MW 160_STATUS_PL
F 169.4 = MO169.4 START_BY_PLI
F 167.4 = MI167.4 IDLE(ready)
Segment 5 Request registers
:LW =OFFS
:T -MW 152 PHASE_REQUEST
:
:L -MW 152 PHASE_REQUEST
:I 13
:T -MW 154 REQ_DATA1
:
:L -MW 152 PHASE_REQUEST
:I 14
:T -MW 156 REQ_DATA2
:
:L -MW 152 PHASE_REQUEST
:I 12
:T -MW 158 PHASE_ST_FAILURE
:
:L KF +0
:DO -MW 158 PHASE_ST_FAILURE
:T DW 0 reset stored failure
:***
FW 152 = MW 152 PHASE_REQUEST
FW 154 = MW 154 REQ_DATA1
FW 156 = MW 156 REQ_DATA2
FW 158 = MW 158 PHASE_ST_FAILURE
Segment 6 Operator confirm
:DO -MW 152 PHASE_REQUEST
:L DW 0
:L KF +1200
:>=F
:= -MS161.4 ! OPER_CONFRM !
:***
FW 152 = MW 152 PHASE_REQUEST
F 161.4 = MS161.4 ! OPER_CONFRM !
Segment 7 Request in work
:DO -MW 152 PHASE_REQUEST
:L DW 0
:L KF +6000
:!=F
:= F 200.0 RQ 6000
:R -MI167.6 RQ_IN_WORK
:DO -MW 152 PHASE_REQUEST
:L DW 0
:L KF +1000
:>=F
:AN F 200.0 RQ 6000
:S -MI167.6 RQ_IN_WORK
:JC =M001
:
:L KF +0
:DO -MW 154 REQ_DATA1
:T DW 0
:DO -MW 156 REQ_DATA2
:T DW 0
M001 :***
FW 152 = MW 152 PHASE_REQUEST
F 167.6 = MI167.6 RQ_IN_WORK
FW 154 = MW 154 REQ_DATA1
FW 156 = MW 156 REQ_DATA2
Segment 8 Complete
:L -MW 152 PHASE_REQUEST
:L KF +4
:+F
:T -MW186 DW_ADDRESS
:DO -MW186 DW_ADDRESS
:L DW 0
:L KF +70
:!=F
:S -MI167.1 COMPLETE
:
:AN -MO169.4 START_BY_PLI
:JC =M001
:
:AN -M 0.1 CONSTANT 1
:SD =TDDP
M001 :***
FW 152 = MW 152 PHASE_REQUEST
FW 186 = MW186 DW_ADDRESS
F 167.1 = MI167.1 COMPLETE
F 169.4 = MO169.4 START_BY_PLI
F 0.1 = M 0.1 CONSTANT 1
Segment 9 start sequence
:L -MW 152 PHASE_REQUEST
:L KF +3
:+F
:T -MW186 DW_ADDRESS
:DO -MW186 DW_ADDRESS
:L DW 0
:T -MW 150 PHASE_STEP_INDEX
:
:AN -MO169.4 START_BY_PLI
:AN F 200.0 RQ 6000
:JC =M001
:
:L KF +0
:T -MW 160_STATUS_PL
:
:AN -MO169.4 START_BY_PLI
:JC =M001
:L KF +10
:T -MW 150 PHASE_STEP_INDEX
M001 :***
FW 152 = MW 152 PHASE_REQUEST
FW 186 = MW186 DW_ADDRESS
FW 150 = MW 150 PHASE_STEP_INDEX
F 169.4 = MO169.4 START_BY_PLI
FW 160 = MW 160_STATUS_PL
Segment 10 Step 10: load para
:L -MW 150 PHASE_STEP_INDEX
:L KF +10
:><F
:ON -MI167.5 PLI_RUNNING
:O -MI167.6 RQ_IN_WORK
:JC =M001
:A -MS160.0 STP 10: ACTIVE
:JC =M002
:AN -MI167.7 RQ_1000 DLall
:S -MI167.7 RQ_1000 DLall
:S -MS160.0 STP 10: ACTIVE
:JU =M001
M002 :
:L -MW 152 PHASE_REQUEST
:I 40
:T FW 190
:DO FW 190
:L DW 0
:L KF +1
:><F
:AN -S 2.6 SPEED FAULT BD560 *(6)
:O -MS161.7 STP 10:HOLD_ACT
:JC =M003
:AN -S 2.6 SPEED FAULT BD560 *(6)
:JC =M004 *(6)
:L KF +50 *(6) device Hold
M004 :DO -MW 158 PHASE_ST_FAILURE *(6)
:T DW 0
:
:AN -S 2.6 SPEED FAULT BD560 *(6)
:S -MS161.7 STP 10:HOLD_ACT
:JU =M001
:
:A -M 0.1 CONSTANT 1
M003 :R -MS160.0 STP 10: ACTIVE
:R -MS161.7 STP 10:HOLD_ACT
:
:L KF +40
:T -MW 150 PHASE_STEP_INDEX
M001 :***
FW 150 = MW 150 PHASE_STEP_INDEX
F 167.5 = MI167.5 PLI_RUNNING
F 167.6 = MI167.6 RQ_IN_WORK
F 160.0 = MS160.0 STP 10: ACTIVE
F 167.7 = MI167.7 RQ_1000 DLall
FW 152 = MW 152 PHASE_REQUEST
S 2.6 = S 2.6 SPEED FAULT BD560 *(6)
F 161.7 = MS161.7 STP 10:HOLD_ACT
FW 158 = MW 158 PHASE_ST_FAILURE
F 0.1 = M 0.1 CONSTANT 1
Segment 11 Step 40: start blending
:L -MW 150 PHASE_STEP_INDEX
:L KF +40
:><F
:ON -MI167.5 PLI_RUNNING
:JC =M001
:O -MS160.2 STP 30: ACTIVE simul.
:O -MS160.3 STP 40: ACTIVE
:JC =M002
:AN -MS160.2 STP 30: ACTIVE
:S -MS160.2 STP 30: ACTIVE simul. for transfer impuls
:JU =M001
M002 :
:A =EOSI
:R -MS160.3 STP 40: ACTIVE
:R -MS160.2 STP 30: ACTIVE simul.
:
:AN =EOSI
:S -MS160.3 STP 40: ACTIVE
:R -MS160.2 STP 30: ACTIVE
:JC =M001
:
:L KF +90
:T -MW 150 PHASE_STEP_INDEX
M001 :***
FW 150 = MW 150 PHASE_STEP_INDEX
F 167.5 = MI167.5 PLI_RUNNING
F 160.2 = MS160.2 STP 30: ACTIVE
F 160.3 = MS160.3 STP 40: ACTIVE
Segment 12 Step 90: Upload reports
:L -MW 150 PHASE_STEP_INDEX
:L KF +90
:><F
:ON -MI167.5 PLI_RUNNING
:O -MI167.6 RQ_IN_WORK
:JC =M001
:AN -MS161.0 STP 90: ACTIVE
:S -MS161.0 STP 90: ACTIVE
:JC =M001
:
:A -MS161.0 STP 90: ACTIVE
:R -MS161.0 STP 90: ACTIVE
:
:L -MW 152 PHASE_REQUEST
:I 41
:T FW 190
:DO FW 190
:L DW 0
:L KF +1
:><F
:AN -S 2.6 SPEED FAULT BD560 *(6)
:JC =M001
:AN -S 2.6 SPEED FAULT BD560 *(6)
:L KF +2 Hold at end
:JC =M002 *(6)
:L KF +50 *(6) device Hold
M002 :DO -MW 158 PHASE_ST_FAILURE *(6)
:T DW 0
M001 :***
FW 150 = MW 150 PHASE_STEP_INDEX
F 167.5 = MI167.5 PLI_RUNNING
F 167.6 = MI167.6 RQ_IN_WORK
F 161.0 = MS161.0 STP 90: ACTIVE
FW 152 = MW 152 PHASE_REQUEST
S 2.6 = S 2.6 SPEED FAULT BD560 *(6)
FW 158 = MW 158 PHASE_ST_FAILURE
Segment 13 transfer requested blend time
:LW =MADB
:T FW 190
:
:L KF +28
:T FW 192
:
:L -MW 152 PHASE_REQUEST
:L KF +20
:+F
:T -MW186 DW_ADDRESS
:DO -MW186 DW_ADDRESS
:L DW 0
:T -MW180 PARAMETER 1
:
:A -MS160.2 STP 30: ACTIVE simul. for transfer impuls
:JC -FB176 STORE DW INDIR.
Name :TANS DW
DB : FW 190
DW : FW 192
WERT : -MW180 PARAMETER 1
DBDX : KS DB
:***
FW 152 = MW 152 PHASE_REQUEST
FW 186 = MW186 DW_ADDRESS
FW 180 = MW180 PARAMETER 1
F 160.2 = MS160.2 STP 30: ACTIVE
FB 176 = FB176 STORE DW INDIR. sp
Segment 14 Control bits PLI
:A =UNID
:= -MS161.5 !! UNIT IDLE !!
:
:A -MO169.4 START_BY_PLI
:AN -MO169.0 ABORTING_BY_PLI
:AN -MO169.2 STOPPING_BY_PLI
:S -MI167.5 PLI_RUNNING
:
:A -MO169.4 START_BY_PLI
:S -M 61.0 RESET ALL BLTIME
:
:A -MO169.0 ABORTING_BY_PLI
:S -MI167.3 ABORTED
:
:A -MO169.1 HOLDING_BY_PLI
:S -MI167.0 HELD
:
:A -MO169.3 RESTART_BY_PLI
:S -MI166.3 RESTART_COMPL
:***
F 161.5 = MS161.5 !! UNIT IDLE !!
F 169.4 = MO169.4 START_BY_PLI
F 169.0 = MO169.0 ABORTING_BY_PLI
F 169.2 = MO169.2 STOPPING_BY_PLI
F 167.5 = MI167.5 PLI_RUNNING
F 61.0 = M 61.0 RESET ALL BLTIME
F 167.3 = MI167.3 ABORTED
F 169.1 = MO169.1 HOLDING_BY_PLI
F 167.0 = MI167.0 HELD
F 169.3 = MO169.3 RESTART_BY_PLI
F 166.3 = MI166.3 RESTART_COMPL
Segment 15 Control bits PLI
:O -MI167.5 PLI_RUNNING
:O -MO169.2 STOPPING_BY_PLI
:A(
:L -MW 150 PHASE_STEP_INDEX 01
:L KF +40 01
:>=F 01
:) 01
:= =PREP
:
:A -MO169.2 STOPPING_BY_PLI
:AN -MI167.6 RQ_IN_WORK
:AN -MI167.2 STOPPED
:= F 200.0
:S -MI167.2 STOPPED
:
:A F 200.0
:A =PREP
:S -MI166.1 RQ_2000 ULall
:***
F 167.5 = MI167.5 PLI_RUNNING
F 169.2 = MO169.2 STOPPING_BY_PLI
FW 150 = MW 150 PHASE_STEP_INDEX
F 167.6 = MI167.6 RQ_IN_WORK
F 167.2 = MI167.2 STOPPED
F 166.1 = MI166.1 RQ_2000 ULall
Segment 16 Control bits PLI
:A -MI167.5 PLI_RUNNING
:A -MS161.0 STP 90: ACTIVE
:S -MI167.1 COMPLETE
:
:O -MO169.0 ABORTING_BY_PLI
:O -MO169.1 HOLDING_BY_PLI
:O -MO169.2 STOPPING_BY_PLI
:O -MO169.4 START_BY_PLI
:R -MI167.1 COMPLETE
:
:A -MI167.5 PLI_RUNNING
:AN -MI167.1 COMPLETE
:= =BLEN
:***
F 167.5 = MI167.5 PLI_RUNNING
F 161.0 = MS161.0 STP 90: ACTIVE
F 167.1 = MI167.1 COMPLETE
F 169.0 = MO169.0 ABORTING_BY_PLI
F 169.1 = MO169.1 HOLDING_BY_PLI
F 169.2 = MO169.2 STOPPING_BY_PLI
F 169.4 = MO169.4 START_BY_PLI
Segment 17 PLI DX
:LW =PLDX
:T -MW188 ADDR_OBJECT_DB/DX
:DO -MW188 ADDR_OBJECT_DB/DX
:CX -DX 0 SYSTEM PARAMETER
:***
FW 188 = MW188 ADDR_OBJECT_DB/DX
DX 0 = DX 0 SYSTEM PARAMETER
Segment 18 Store step number
:LW =OFFS
:L KF +3
:+F
:T -MW186 DW_ADDRESS
:
:L -MW 150 PHASE_STEP_INDEX
:DO -MW186 DW_ADDRESS
:T DW 0
:***
FW 186 = MW186 DW_ADDRESS
FW 150 = MW 150 PHASE_STEP_INDEX
Segment 19 Store Control bits PLI
:LW =OFFS
:L KF +11
:+F
:T -MW186 DW_ADDRESS
:
:L -MW 166_IN_PLI
:DO -MW186 DW_ADDRESS
:T DW 0
:
:LW =OFFS
:L KF +19
:+F
:T -MW186 DW_ADDRESS
:
:L -MW 160_STATUS_PL
:DO -MW186 DW_ADDRESS
:T DW 0
:***
FW 186 = MW186 DW_ADDRESS
FW 166 = MW 166_IN_PLI Eingangsbitleiste an PLI
FW 160 = MW 160_STATUS_PL
Segment 20 Report Time to PLI
:LW =MADB
:T FW 190
:
:L KF +31
:T FW 192
:
:L -MW 152 PHASE_REQUEST
:L KF +44
:+F
:T FW 194
:
:L KF +1
:T FW 196
:***
FW 152 = MW 152 PHASE_REQUEST
Segment 21 Report Time to PLI
:O -MS161.0 STP 90: ACTIVE
:O -MO169.2 STOPPING_BY_PLI
:AN -MI167.6 RQ_IN_WORK
:JC -FB173 COPY BLOCK
Name :COPY DKF
QUEL : KS DB
DB-Q : FW 190
VON : FW 192
BIS : FW 192
ZIEL : KS DX
DB-Z : -MW188 ADDR_OBJECT_DB/DX
NACH : FW 194
FEHL : -M 0.0 IND.ADDRES(DUMMY)
LAEN : FW 196
L-B : KS LA
:***
F 161.0 = MS161.0 STP 90: ACTIVE
F 169.2 = MO169.2 STOPPING_BY_PLI
F 167.6 = MI167.6 RQ_IN_WORK
FW 188 = MW188 ADDR_OBJECT_DB/DX
F 0.0 = M 0.0 IND.ADDRES(DUMMY)
FB 173 = FB173 COPY BLOCK parameter: EW sp
Segment 22 Report Revolution to PLI
:LW =MADB
:T FW 190
:
:L KF +44
:T FW 192
:
:L -MW 152 PHASE_REQUEST
:L KF +45
:+F
:T FW 194
:
:L KF +2
:T FW 196
:***
FW 152 = MW 152 PHASE_REQUEST
Segment 23 Report Revolution to PLI
:O -MS161.0 STP 90: ACTIVE
:O -MO169.2 STOPPING_BY_PLI
:AN -MI167.6 RQ_IN_WORK
:JC -FB173 COPY BLOCK
Name :COPY DKF
QUEL : KS DB
DB-Q : FW 190
VON : FW 192
BIS : FW 192
ZIEL : KS DX
DB-Z : -MW188 ADDR_OBJECT_DB/DX
NACH : FW 194
FEHL : -M 0.0 IND.ADDRES(DUMMY)
LAEN : FW 196
L-B : KS LA
:BE
F 161.0 = MS161.0 STP 90: ACTIVE
F 169.2 = MO169.2 STOPPING_BY_PLI
F 167.6 = MI167.6 RQ_IN_WORK
FW 188 = MW188 ADDR_OBJECT_DB/DX
F 0.0 = M 0.0 IND.ADDRES(DUMMY)
FB 173 = FB173 COPY BLOCK parameter: EW sp