LogGeneric_Output
(FB)
FUNCTION_BLOCK LogGeneric_output EXTENDS AbbLConCA
This Function Block provides a decoded dataset of the corresponding data types from the SRAM-FIFOout of the Datalogger. The Function Block does not cover the transmission of the dataset. But it provides an interface for the user on which the data can be read and send according to application specific requirements and protocols.
The Function Block automatically reads the oldest dataset at a filling level of FIFOout > 0. Then the Function Block decodes the dataset from *.csv format and provides it to the outputs. The Function Block signals its availability through Done = TRUE and State = zLOG_OUTPUT_DATA_AVAILABLE. If this dataset is processed by the user, the user will have to signal this by Sent = TRUE to the Function Block. By the edge 0/1 the RAM-FIFOout is decremented by the value 1, Done changes to “FALSE” and on the output State the text “zLOG_OUTPUT_DATA_HAS_BEEN_SENT” appears. By a 1/0 edge on Sent the Function Block reads the next dataset (which is the same as the self triggered read without command, as long as Sent = false). This happens until FIFOOUT_LEVEL=0” and the Function Block signals “EMPTY”. At the same time at output State the message “zLOG_FIFOOUT_EMPTY” is given and all output values are deleted. While existing communication and exhausted FILE-FIFO the datasets, newly written by LogGeneric_Input to the FIFOin are continuously copied by the LogHandling directly to the FIFOout, as soon as there is space in the FIFOout for new datasets. For this the FIFOout should not be empty (EMPTY). It is different when FILE-FIFO is not empty. In this case at first FIFOout is fully decremented until FIFOOUT_LEVEL=0 and the Function Block signals “EMPTY”. After that a new dataset block is copied from FILE-FIFO into FIFOout.

- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
Enable
BOOL
FALSE
A rising edge (Enable = TRUE) starts the operation, the output Busy goes to TRUE. All other inputs are read and considered continuously. A falling edge (Enable = FALSE) aborts the operation. During Aborting the Busy is still TRUE. Afterward all outputs are reset.
AbbLConCA
Output
Busy
BOOL
FALSE
Operation is running (while output Error is FALSE)
AbbLConCA
Error
BOOL
FALSE
Operation is stopped with error (while output Busy is FALSE). This output is TRUE for at least one cycle or until Enable is set to FALSE. The output ErrorID gives more details about the error.
AbbLConCA
Input
PickedUp
BOOL
- 2: Feedback from Scada, that the data set has been received by the Scada station and that it is ready for the next data set
Done changes to “FALSE” and on the output State the text “zLOG_OUTPUT_DATA_HAS_BEEN_PICKED_UP” appears. By the 1/0 edge on PickedUp the Function Block reads the next dataset it is the same as the automatic reading without a command, as long as PickedUp = FALSE
Output
Done
BOOL
FALSE
2: Execution finished when output Done = TRUE
ErrorID
NO_ERROR
4: Shows error, Refer ERROR_ID enumeration for details of the error
State
zLOG_ENUM_STATE
zLOG_IDLE
5: Actual State of LogOutput, Enumeration of Type zLOG_ENUM_STATE
Empty
BOOL
FALSE
6: Output Buffer empty
FifoOutLevel
DINT
0
7: Level of FIFOout (maximum 161)
Id
STRING(8)
‘’
8: Output of the ID or name of the dataset as string chain (no special characters), maximum 8 characters
Timestamp
DT
9: Output of the time stamp of the dataset in the format year-month-day-hour-minute-second
Msec
UINT
0
10: Output of the milliseconds of the time stamp of the dataset
DataType
BYTE
0
11: Possible Data type’s: 1=BOOL, 2=BYTE, 3=INT, 4=UINT, 5=DINT, 6=UDINT, 7=REAL
BoolArray
ARRAY [0..iMaxARRAY_BOOL] OF BOOL
12: ARRAY[0..57], specified through input DATA_TYPE
ByteArray
ARRAY [0..iMaxARRAY_BYTE] OF BYTE
13: ARRAY[0..87] ,specified through input DATA_TYPE
IntArray
ARRAY [0..iMaxARRAY_INT] OF INT
14: ARRAY[0..49], specified through input DATA_TYPE
UintArray
ARRAY [0..iMaxARRAY_WORD] OF UINT
15: ARRAY[0..57], specified through input DATA_TYPE
DintArray
ARRAY [0..iMaxARRAY_DINT] OF DINT
16: ARRAY[0..28], specified through input DATA_TYPE
UdintArray
ARRAY [0..iMaxARRAY_DWORD] OF UDINT
17: ARRAY[0..30], specified through input DATA_TYPE
RealArray
ARRAY [0..iMaxARRAY_REAL] OF REAL
18: ARRAY[0..26], specified through input DATA_TYPE
Length
INT
0
19: Valid length of data in dataset
NumberItems
UDINT
0
20: Number of items since Enable=TRUE