batch-example-2/plc/code/s5/updated/fx-blocks/fx-106-man-add

412 lines
11 KiB
Plaintext
Raw Permalink Normal View History

2023-11-20 21:08:07 +00:00
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-MA
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 :LOAC 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 :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
: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 !
:
:AN -MO169.4 START_BY_PLI
:JC =M001
:
:A -M 0.1 CONSTANT 1
:R -MS161.2 STP 7: ACTIVE
:R -MS161.0 STP 90: ACTIVE
:
:AN -M 0.1 CONSTANT 1
:SD =TDDP
M001 :***
FW 152 = MW 152 PHASE_REQUEST
F 161.4 = MS161.4 ! OPER_CONFRM !
F 169.4 = MO169.4 START_BY_PLI
F 0.1 = M 0.1 CONSTANT 1
F 161.2 = MS161.2 STP 7: ACTIVE additional to stp 10:
F 161.0 = MS161.0 STP 90: ACTIVE
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
:***
FW 152 = MW 152 PHASE_REQUEST
FW 186 = MW186 DW_ADDRESS
F 167.1 = MI167.1 COMPLETE
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 +40
: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 5: last ingredient ?
:***
FW 150 = MW 150 PHASE_STEP_INDEX
F 167.5 = MI167.5 PLI_RUNNING
F 167.6 = MI167.6 RQ_IN_WORK
F 161.6 = MS161.6 STP 5: ACTIVE additional to stp 10:
FW 152 = MW 152 PHASE_REQUEST
F 166.0 = MI166.0 RQ_1100 DLpart
F 0.1 = M 0.1 CONSTANT 1
Segment 11 Step 7: last addition ?
:***
FW 150 = MW 150 PHASE_STEP_INDEX
F 167.5 = MI167.5 PLI_RUNNING
F 167.6 = MI167.6 RQ_IN_WORK
F 161.2 = MS161.2 STP 7: ACTIVE additional to stp 10:
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 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 13 Step 40: unlock lid
:L -MW 150 PHASE_STEP_INDEX
:L KF +40
:><F
:ON -MI167.5 PLI_RUNNING
:JC =M001
:
:A -MS160.3 STP 40: ACTIVE lid open (n EOSI)
:R -MS160.3 STP 40: ACTIVE
:AN -MS160.3 STP 40: ACTIVE
:A -MS160.3 STP 40: ACTIVE lid closed ( 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 14 Step 70: confirm at end ?
:***
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 15 Step 90: Upload reports
:***
FW 150 = MW 150 PHASE_STEP_INDEX
F 167.5 = MI167.5 PLI_RUNNING
F 161.2 = MS161.2 STP 7: ACTIVE additional to stp 10:
F 161.0 = MS161.0 STP 90: ACTIVE
FW 152 = MW 152 PHASE_REQUEST
FW 158 = MW 158 PHASE_ST_FAILURE
Segment 16 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 17 Control bits PLI
:A -MO169.2 STOPPING_BY_PLI
:S -MI167.2 STOPPED
:
:A -MI167.5 PLI_RUNNING
:A -MS161.0 STP 90: ACTIVE
:AN =EOSI lid closed again
: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
:***
F 169.2 = MO169.2 STOPPING_BY_PLI
F 167.2 = MI167.2 STOPPED
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.4 = MO169.4 START_BY_PLI
Segment 18 lock active
:L -MW 150 PHASE_STEP_INDEX
:L KF +40
:>=F running
:A(
:L -MW 150 PHASE_STEP_INDEX 01
:L KF +70 01
:<=F 01 man_add_confirm
:) 01
:AN -MI167.1 COMPLETE
:A -MI167.5 PLI_RUNNING
:= =LOAC
:***
FW 150 = MW 150 PHASE_STEP_INDEX
F 167.1 = MI167.1 COMPLETE
F 167.5 = MI167.5 PLI_RUNNING
Segment 19 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 20 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 21 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
:BE
FW 186 = MW186 DW_ADDRESS
FW 166 = MW 166_IN_PLI Eingangsbitleiste an PLI
FW 160 = MW 160_STATUS_PL