Configuration | Algorithms Eyeglasses: If you click on the eyeglasses icon you can see the optional parameter Enable Execution . You can select a Boolean signal for this parameter, so that the algorithm is just active, if the value of the selected signal is TRUE . Reset arrow: If you click on the arrow the output values of the specific algorithm will be reset. Minimize arrow: If you click on the minimize arrow on the right, the algorithm will be collapsed. The various categories and their algorithms are described in more detail below.
6.4.1 Analytics algorithms | Analytics algorithms The basic algorithms of the TwinCAT Analytics Engineering Tools originate from the PLC library TF3500 Analytics Library. 6.4.1.1 Analytics - Base | Analytics - Base The algorithms of the category Analytics-Base provide base functionalities for analyzing process and application data. For example threshold detection, timing analysis or calculation of minimum, maximum and average values. 6.4.1.1.1 BatchNShift 1Ch | BatchNShift 1Ch The BatchNShift 1Ch buffers the values of the input signal according to the buffer size and the sample mode. The number of output channels in which the buffered input values are stored corresponds to the buffer size.
With the help of the sample mode it is possible to distinguish between two different operating modes of the algorithm. If the sample mode Flow is selected, a ring buffer or shift register is realized (Shift). The values are written to the buffer one after the other and shifted by one position of the buffer in each cycle. If the buffer is full, the last value falls out. In the Wait mode, the buffer is instead completely emptied and filled with new values whenever it is completely full, so that the values are processed in the form of batches (batch). At the beginning of an analysis, the system also waits until the buffer is completely filled before writing the values to the buffer.
Therefore, the function block supplies valid values only from the cycle ( BufferSize + 1) . Optionally, a Boolean signal can be selected for the Enable Execution input so that the algorithm is only active if the value of the selected signal is TRUE . Configuration options Buffer Size: specifies the size of the buffer and thus the number of values that are stored. The number of output channels equals the buffer size. Sample Mode: the values from the buffer can be passed to the output channels in two different modes: Flow : the buffer is filled like a ring buffer. At the start of the analysis all output values are set to zero.
Each change to the ring buffer is transferred to the output channels immediately. The New Result flag is set to TRUE, once all output channels got assigned a value and is always true, when a new value is saved in the buffer. Wait : at the start of the analysis or after reset all output channels are set to zero. Only when the internal buffer is full, these values are transferred to the output channels and the New Result flag is set to TRUE. These values stay as output values until all the values in the internal buffer are renewed. Only then they are transferred to the output channels. Output values Output Value 00..n : results of the BatchNShift buffer according to the Sample Mode.
Each output channel represents a buffer storage space. TE3500 95 Version: 1.15.0