Detailed description
2.12 Block descriptions
Basic logic functions: PLC basic program solution line (P3 sl)
Function Manual, 11/2006, 6FC5397-0BP10-2BA0
171
2.12.10
FB 29: Signal recorder and data trigger diagnostics
Signal recorder
The "diagnostics" FB allows various diagnostic routines to be performed on the PLC user
program. A diagnostic routine logs signal states and signal changes. In this diagnostic
routine, function number 1 is assigned to the "Func" parameter. Up to 8 signals of the
parameters "Signal_1" to "Signal_8" are recorded in a ring buffer each time one of the
signals changes. The current information of parameters "Var1" as BYTE value, and "Var2"
and "Var3" as INTEGER values are also stored in the ring buffer.
The number of past OB 1 cycles is also stored in the buffer as additional information. This
information enables the graphical evaluation of signals and values in OB 1 cycle grid. The
first time the "diagnostics" FB is called in a new PLC cycle, the "NewCycle" parameter must
be set to TRUE. If the "diagnostics" FB is called several times in the same OB 1 cycle, the
"NewCycle" parameter must be set to FALSE for the second and subsequent calls. This
prevents a new number of OB 1 cycles from being calculated.
The ring buffer, specified by the user, must have an ARRAY structure specified as in the
source code. The array can have any number of elements. A size of 250 elements is
recommended. The "ClearBuf" parameter is used to clear the ring buffer and set the BufAddr
pointer (I/O parameter) to the start. The instance DB related to the FB is a DB from the user
area and is to be transferred to the FB "Diagnostics" with the parameter "BufDB".
Data trigger
The data trigger function is intended to allow triggering on specific values (or bits) at any
permissible memory cell. The cell to be triggered is "rounded" with a bit mask ("AndMask"
parameter) before the "TestVal" parameter is compared in the diagnostic block.
Note
The source code for the function is available in the source container of the basic-program
library under the name Diagnose.awl.. The instance DB and the ring buffer DB are also
defined in this source block. The function call is also described in the function. The DB
numbers and the call must be modified.
Summary of Contents for SINUMERIK 840D sl
Page 282: ...Index Basic logic functions Acceleration B2 64 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...
Page 388: ...Basic logic functions Travel to fixed stop F1 Function Manual 11 2006 6FC5397 0BP10 2BA0 52 ...
Page 962: ...Index Basic logic functions Emergency Stop N2 20 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...
Page 1704: ...Constraints Basic logic functions Spindles S1 94 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...
Page 1716: ...Index Basic logic functions Spindles S1 106 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...
Page 1996: ...Index Basic logic functions Tool Offset W1 208 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...
Page 2150: ...Table of contents Basic logic functions Appendix 4 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...
Page 2184: ...Glossary Basic logic functions Appendix 38 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...