522 lines
12 KiB
Plaintext
522 lines
12 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-DN
|
||
|
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 :ADB 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 :REPO I/Q/D/B/T/C: I BI/BY/W/D: BI
|
||
|
Decl :UNID I/Q/D/B/T/C: I BI/BY/W/D: BI
|
||
|
Decl :CEMP I/Q/D/B/T/C: Q BI/BY/W/D: BI
|
||
|
Decl :PCOM I/Q/D/B/T/C: I 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 & Aborted
|
||
|
:L -MW 152 PHASE_REQUEST
|
||
|
:L KF +4
|
||
|
:+F
|
||
|
:T -MW186 DW_ADDRESS
|
||
|
:DO -MW186 DW_ADDRESS
|
||
|
:L DW 0
|
||
|
:L KF +70
|
||
|
:!=F
|
||
|
:O =PCOM
|
||
|
:S -MI167.1 COMPLETE
|
||
|
:
|
||
|
:O -MI167.0 HELD
|
||
|
:O -MI167.2 STOPPED
|
||
|
:O -MI167.3 ABORTED
|
||
|
:RB =CEMP
|
||
|
:
|
||
|
: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 167.0 = MI167.0 HELD
|
||
|
F 167.2 = MI167.2 STOPPED
|
||
|
F 167.3 = MI167.3 ABORTED
|
||
|
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
|
||
|
:L KF +4
|
||
|
:DO -MW 154 REQ_DATA1
|
||
|
:T DW 0
|
||
|
:DO -MW 156 REQ_DATA2
|
||
|
:T DW 0
|
||
|
:
|
||
|
:A -M 0.1 CONSTANT 1
|
||
|
:L KT 003.2
|
||
|
:SD =TDDP
|
||
|
:
|
||
|
:AN =TDDP
|
||
|
:JC =M001
|
||
|
:L KF +1104
|
||
|
:DO -MW 152 PHASE_REQUEST
|
||
|
:T DW 0
|
||
|
:
|
||
|
:AN -MI166.0 RQ_1100 DLpart
|
||
|
:S -MI166.0 RQ_1100 DLpart
|
||
|
:S -MS160.0 STP 10: ACTIVE
|
||
|
:AN -M 0.1 CONSTANT 1
|
||
|
:SD =TDDP
|
||
|
:JU =M001
|
||
|
M002 :
|
||
|
:L -MW 152 PHASE_REQUEST
|
||
|
:I 40
|
||
|
:T FW 190
|
||
|
:DO FW 190
|
||
|
:L DW 0
|
||
|
:L KF +1
|
||
|
:><F
|
||
|
:O -MS161.7 STP 10:HOLD_ACT
|
||
|
:JC =M003
|
||
|
:DO -MW 158 PHASE_ST_FAILURE Hold at start
|
||
|
:T DW 0
|
||
|
:
|
||
|
:A -M 0.1 CONSTANT 1
|
||
|
: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 +30
|
||
|
: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
|
||
|
FW 154 = MW 154 REQ_DATA1
|
||
|
FW 156 = MW 156 REQ_DATA2
|
||
|
F 0.1 = M 0.1 CONSTANT 1
|
||
|
FW 152 = MW 152 PHASE_REQUEST
|
||
|
F 166.0 = MI166.0 RQ_1100 DLpart
|
||
|
F 161.7 = MS161.7 STP 10:HOLD_ACT
|
||
|
FW 158 = MW 158 PHASE_ST_FAILURE
|
||
|
|
||
|
Segment 11 Step 30: confirm to start ?
|
||
|
:L -MW 150 PHASE_STEP_INDEX
|
||
|
:L KF +30
|
||
|
:><F
|
||
|
:ON -MI167.5 PLI_RUNNING
|
||
|
:O -MI167.6 RQ_IN_WORK
|
||
|
:JC =M001
|
||
|
:O -MS160.2 STP 30: ACTIVE
|
||
|
:JC =M002
|
||
|
:L -MW 152 PHASE_REQUEST
|
||
|
:I 42
|
||
|
:T FW 190
|
||
|
:DO FW 190
|
||
|
:L DW 0
|
||
|
:L KF +1
|
||
|
:><F
|
||
|
:JC =M003
|
||
|
:
|
||
|
:L KF +1201
|
||
|
:DO -MW 152 PHASE_REQUEST
|
||
|
:T DW 0
|
||
|
:AN -MI166.0 RQ_1100 DLpart
|
||
|
:S -MI166.0 RQ_1100 DLpart
|
||
|
M003 :S -MS160.2 STP 30: ACTIVE
|
||
|
:JU =M001
|
||
|
M002 :
|
||
|
:A -M 0.1 CONSTANT 1
|
||
|
:R -MS160.2 STP 30: ACTIVE
|
||
|
:
|
||
|
: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.2 = MS160.2 STP 30: ACTIVE
|
||
|
FW 152 = MW 152 PHASE_REQUEST
|
||
|
F 166.0 = MI166.0 RQ_1100 DLpart
|
||
|
F 0.1 = M 0.1 CONSTANT 1
|
||
|
|
||
|
Segment 12 Step 40: start discharge
|
||
|
:L -MW 150 PHASE_STEP_INDEX
|
||
|
:L KF +40
|
||
|
:><F
|
||
|
:ON -MI167.5 PLI_RUNNING
|
||
|
:JC =M001
|
||
|
:
|
||
|
:A =EOSI
|
||
|
:R -MS160.3 STP 40: ACTIVE
|
||
|
:
|
||
|
:AN =EOSI
|
||
|
:S -MS160.3 STP 40: ACTIVE
|
||
|
:JC =M001
|
||
|
:
|
||
|
:L KF +70
|
||
|
:T -MW 150 PHASE_STEP_INDEX
|
||
|
M001 :***
|
||
|
|
||
|
FW 150 = MW 150 PHASE_STEP_INDEX
|
||
|
F 167.5 = MI167.5 PLI_RUNNING
|
||
|
F 160.3 = MS160.3 STP 40: ACTIVE
|
||
|
|
||
|
Segment 13 Step 70: confirm at end ?
|
||
|
:L -MW 150 PHASE_STEP_INDEX
|
||
|
:L KF +70
|
||
|
:><F
|
||
|
:ON -MI167.5 PLI_RUNNING
|
||
|
:O -MI167.6 RQ_IN_WORK
|
||
|
:JC =M001
|
||
|
:A -MS160.6 STP 70: ACTIVE
|
||
|
:JC =M002
|
||
|
:L -MW 152 PHASE_REQUEST
|
||
|
:I 43
|
||
|
:T FW 190
|
||
|
:DO FW 190
|
||
|
:L DW 0
|
||
|
:L KF +1
|
||
|
:><F
|
||
|
:JC =M003
|
||
|
:AN =REPO only blender
|
||
|
:S =CEMP
|
||
|
:L KF +1202
|
||
|
:DO -MW 152 PHASE_REQUEST
|
||
|
:T DW 0
|
||
|
:AN -MI166.0 RQ_1100 DLpart
|
||
|
:S -MI166.0 RQ_1100 DLpart
|
||
|
M003 :S -MS160.6 STP 70: ACTIVE
|
||
|
:JU =M001
|
||
|
M002 :
|
||
|
:A -M 0.1 CONSTANT 1
|
||
|
:R -MS160.6 STP 70: ACTIVE
|
||
|
:RB =CEMP
|
||
|
:
|
||
|
: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 167.6 = MI167.6 RQ_IN_WORK
|
||
|
F 160.6 = MS160.6 STP 70: ACTIVE
|
||
|
FW 152 = MW 152 PHASE_REQUEST
|
||
|
F 166.0 = MI166.0 RQ_1100 DLpart
|
||
|
F 0.1 = M 0.1 CONSTANT 1
|
||
|
|
||
|
Segment 14 Step 90: Upload reports
|
||
|
:L -MW 150 PHASE_STEP_INDEX
|
||
|
:L KF +90
|
||
|
:><F
|
||
|
:ON -MI167.5 PLI_RUNNING
|
||
|
:O(
|
||
|
:A =REPO 01 if reports
|
||
|
:AN -MI167.1 COMPLETE 01
|
||
|
:) 01
|
||
|
:O -MI167.6 RQ_IN_WORK
|
||
|
:JC =M001
|
||
|
:A -MS161.0 STP 90: ACTIVE
|
||
|
:JC =M001
|
||
|
: Upload fin. after complete
|
||
|
:L -MW 152 PHASE_REQUEST
|
||
|
:I 41
|
||
|
:T FW 190
|
||
|
:DO FW 190
|
||
|
:L DW 0
|
||
|
:L KF +1
|
||
|
:><F
|
||
|
:JC =M002
|
||
|
:L KF +2 Hold at end
|
||
|
:DO -MW 158 PHASE_ST_FAILURE
|
||
|
:T DW 0
|
||
|
:
|
||
|
:A -M 0.1 CONSTANT 1
|
||
|
M002 :S -MS161.0 STP 90: ACTIVE
|
||
|
M001 :***
|
||
|
|
||
|
FW 150 = MW 150 PHASE_STEP_INDEX
|
||
|
F 167.5 = MI167.5 PLI_RUNNING
|
||
|
F 167.1 = MI167.1 COMPLETE
|
||
|
F 167.6 = MI167.6 RQ_IN_WORK
|
||
|
F 161.0 = MS161.0 STP 90: ACTIVE
|
||
|
FW 152 = MW 152 PHASE_REQUEST
|
||
|
FW 158 = MW 158 PHASE_ST_FAILURE
|
||
|
F 0.1 = M 0.1 CONSTANT 1
|
||
|
|
||
|
Segment 15 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 16 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
|
||
|
:
|
||
|
:A =UNID
|
||
|
:= -MS161.5 !! UNIT IDLE !!
|
||
|
:***
|
||
|
|
||
|
FW 186 = MW186 DW_ADDRESS
|
||
|
FW 150 = MW 150 PHASE_STEP_INDEX
|
||
|
F 161.5 = MS161.5 !! UNIT IDLE !!
|
||
|
|
||
|
Segment 17 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 18 Reports to PLI
|
||
|
:LW =ADB
|
||
|
:T FW 190
|
||
|
:
|
||
|
:L KF +136
|
||
|
:T FW 192
|
||
|
:
|
||
|
:L -MW 152 PHASE_REQUEST
|
||
|
:L KF +44
|
||
|
:+F
|
||
|
:T FW 194
|
||
|
:
|
||
|
:L KF +6
|
||
|
:T FW 196
|
||
|
:***
|
||
|
|
||
|
FW 152 = MW 152 PHASE_REQUEST
|
||
|
|
||
|
Segment 19 Reports to PLI
|
||
|
:A =REPO
|
||
|
: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
|
||
|
|
||
|
FW 188 = MW188 ADDR_OBJECT_DB/DX
|
||
|
F 0.0 = M 0.0 IND.ADDRES(DUMMY)
|
||
|
|
||
|
FB 173 = FB173 COPY BLOCK parameter: EW sp
|