Communication using function blocks
6.6 Delete receive buffer, FB12 "P_RESET"
PtP coupling and configuration of CP 340
Manual, 04/2011, A5E00369892-03
121
6.6
Delete receive buffer, FB12 "P_RESET"
P_RESET FB
The P_RESET FB deletes the entire receive buffer of the CP 340. All saved frames will be
discarded. Any frame that is incoming at the time when the P_RESET FB is called will be
saved.
The FB is activated by a positive edge at the REQ input. The job can run over several calls
(program cycles).
The LADDR parameter specifies the address of the CP 340 to be addressed.
Error display on the P_RESET FB
The DONE output shows "job completed without errors". ERROR indicates whether an error
has occurred. If there was an error, the corresponding event number is displayed in
STATUS. If no error arises, the STATUS has the value 0. If an error arises the binary result
BR is reset. If the block is terminated without errors, the binary result has the status "1".
Note
The P_RESET FB function block does not have a parameter check, which means that if
there are invalid parameters, the CPU may switch to STOP mode.
STL representation
LAD representation
CALL P_RESET, I_P_RESET
REQ: =
LADDR: =
DONE: =
ERROR: =
STATUS: =
(1
(12
5(4
'21(
/$''5
(5525
67$786
5B5(6(7,B35(6(7
Note
The EN and ENO parameters are only present in the graphical representation (LAD or FBD).
The block is started with EN = TRUE. If the function ends without an error, ENO = TRUE is
set. To process these parameters, the compiler uses the binary result.
The binary result is set to signal state "1" if the block was terminated without errors. If there
was an error, the binary result is set to "0".
Summary of Contents for SIMATIC CP 340
Page 6: ...Preface PtP coupling and configuration of CP 340 6 Manual 04 2011 A5E00369892 03 ...
Page 10: ...Table of contents PtP coupling and configuration of CP 340 10 Manual 04 2011 A5E00369892 03 ...
Page 200: ...Index PtP coupling and configuration of CP 340 200 Manual 04 2011 A5E00369892 03 ...