438 lines
11 KiB
Plaintext
438 lines
11 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-EM
|
||
|
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 :WZNR I/Q/D/B/T/C: D KM/KH/KY/KS/KF/KT/KC/KG: KF
|
||
|
Decl :EMPY 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 :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 +30
|
||
|
: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
|
||
|
:***
|
||
|
|
||
|
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 20: confirm empty or overri
|
||
|
:***
|
||
|
|
||
|
FW 150 = MW 150 PHASE_STEP_INDEX
|
||
|
F 167.5 = MI167.5 PLI_RUNNING
|
||
|
F 167.6 = MI167.6 RQ_IN_WORK
|
||
|
F 160.1 = MS160.1 STP 20: 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 30: Upload reports
|
||
|
:L -MW 150 PHASE_STEP_INDEX
|
||
|
:L KF +30
|
||
|
:><F
|
||
|
:ON -MI167.5 PLI_RUNNING
|
||
|
:O -MI167.6 RQ_IN_WORK
|
||
|
:JC =M001
|
||
|
:AN -MS160.2 STP 30: ACTIVE
|
||
|
:S -MS160.2 STP 30: ACTIVE
|
||
|
:JC =M001
|
||
|
M002 :R -MS160.2 STP 30: ACTIVE
|
||
|
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
|
||
|
FW 158 = MW 158 PHASE_ST_FAILURE
|
||
|
F 0.1 = M 0.1 CONSTANT 1
|
||
|
|
||
|
Segment 13 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.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 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 14 Control bits PLI
|
||
|
:A -MO169.2 STOPPING_BY_PLI
|
||
|
:AN -MI167.6 RQ_IN_WORK
|
||
|
:AN -MI167.2 STOPPED
|
||
|
:S -MI167.2 STOPPED
|
||
|
:
|
||
|
:O -MO169.0 ABORTING_BY_PLI
|
||
|
:O -MO169.2 STOPPING_BY_PLI
|
||
|
:R -MS160.2 STP 30: ACTIVE
|
||
|
:
|
||
|
:A -MI167.5 PLI_RUNNING
|
||
|
:A -MS160.2 STP 30: ACTIVE
|
||
|
:S -MI167.1 COMPLETE
|
||
|
:O -MO169.0 ABORTING_BY_PLI
|
||
|
:O -MO169.1 HOLDING_BY_PLI om 169.1
|
||
|
:O -MO169.2 STOPPING_BY_PLI
|
||
|
:O -MO169.4 START_BY_PLI
|
||
|
:R -MI167.1 COMPLETE
|
||
|
:***
|
||
|
|
||
|
F 169.2 = MO169.2 STOPPING_BY_PLI
|
||
|
F 167.6 = MI167.6 RQ_IN_WORK
|
||
|
F 167.2 = MI167.2 STOPPED
|
||
|
F 169.0 = MO169.0 ABORTING_BY_PLI
|
||
|
F 160.2 = MS160.2 STP 30: ACTIVE
|
||
|
F 167.5 = MI167.5 PLI_RUNNING
|
||
|
F 167.1 = MI167.1 COMPLETE
|
||
|
F 169.1 = MO169.1 HOLDING_BY_PLI
|
||
|
F 169.4 = MO169.4 START_BY_PLI
|
||
|
|
||
|
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
|
||
|
:***
|
||
|
|
||
|
FW 186 = MW186 DW_ADDRESS
|
||
|
FW 150 = MW 150 PHASE_STEP_INDEX
|
||
|
|
||
|
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 =WZNR
|
||
|
:L KF +100
|
||
|
:+F
|
||
|
:T FW 190
|
||
|
:
|
||
|
:L KF +198
|
||
|
:T FW 192
|
||
|
:
|
||
|
:L KF +38
|
||
|
:T FW 194
|
||
|
:
|
||
|
:L KF +2
|
||
|
:T FW 196
|
||
|
:***
|
||
|
|
||
|
|
||
|
Segment 19 Record report
|
||
|
:AN -MI167.5 PLI_RUNNING
|
||
|
:R -MS160.2 STP 30: ACTIVE
|
||
|
:
|
||
|
:O -MS160.2 STP 30: ACTIVE
|
||
|
:O -MO169.2 STOPPING_BY_PLI
|
||
|
:AN -MI167.6 RQ_IN_WORK
|
||
|
:JC -FB173 COPY BLOCK
|
||
|
Name :COPY DKF
|
||
|
QUEL : KS DB DB
|
||
|
DB-Q : FW 190 10X
|
||
|
VON : FW 192 198
|
||
|
BIS : FW 192
|
||
|
ZIEL : KS DB DB
|
||
|
DB-Z : FW 190 10X
|
||
|
NACH : FW 194 38
|
||
|
FEHL : -M 0.0 IND.ADDRES(DUMMY)
|
||
|
LAEN : FW 196 2 DW's
|
||
|
L-B : KS LA
|
||
|
:***
|
||
|
|
||
|
F 167.5 = MI167.5 PLI_RUNNING
|
||
|
F 160.2 = MS160.2 STP 30: ACTIVE
|
||
|
F 169.2 = MO169.2 STOPPING_BY_PLI
|
||
|
F 167.6 = MI167.6 RQ_IN_WORK
|
||
|
F 0.0 = M 0.0 IND.ADDRES(DUMMY)
|
||
|
|
||
|
FB 173 = FB173 COPY BLOCK parameter: EW sp
|
||
|
|
||
|
Segment 20 Reports to PLI
|
||
|
:L -MW 152 PHASE_REQUEST
|
||
|
:L KF +44
|
||
|
:+F
|
||
|
:T FW 198
|
||
|
:O -MS160.2 STP 30: ACTIVE
|
||
|
:O -MO169.2 STOPPING_BY_PLI
|
||
|
:AN -MI167.6 RQ_IN_WORK
|
||
|
:JC -FB173 COPY BLOCK
|
||
|
Name :COPY DKF
|
||
|
QUEL : KS DB DB
|
||
|
DB-Q : FW 190 10X
|
||
|
VON : FW 192 198
|
||
|
BIS : FW 192
|
||
|
ZIEL : KS DX DX
|
||
|
DB-Z : -MW188 ADDR_OBJECT_DB/DX
|
||
|
NACH : FW 198 44
|
||
|
FEHL : -M 0.0 IND.ADDRES(DUMMY)
|
||
|
LAEN : FW 196 2 DW's
|
||
|
L-B : KS LA
|
||
|
:BE
|
||
|
|
||
|
FW 152 = MW 152 PHASE_REQUEST
|
||
|
F 160.2 = MS160.2 STP 30: 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
|