LogGeneric_Input (FB)
FUNCTION_BLOCK LogGeneric_Input EXTENDS AbbLConCA
This function at the same time, can write Datasets of type BOOL, BYTE, INT, UINT, DINT, UDINT and REAL with different length of 27…88 values (depending on type) are stored as Format *.csv in SRAM-FIFOin of Data logger
The Function Block writes datasets in the SRAM-FIFOin of the controller and doesn’t send them directly to a central control station. This is done by the user. With the Function Block LogGeneric_Output the data to be sent are provided as an interface.
- InOut:
Scope
Name
Type
Initial
Comment
Input
SendBOOL2: Start a send request on raising edge
CycleBOOL3: Perform a cyclic send each scandown cycle. At Scandown=0 a dataset is written in each cycle
AutoBOOL4: With each change of an input value or exceeding/falling down of Threshold, this input writes a dataset in FIFOin
ScandownUINT- 5: On cyclic send only send in each <scandown< cycle
e.g. Scandown = 100: every hundredth cycle writes a value in FifoIn
e.g. Scandown = 0: in every cycle a dataset is written
ThresholdRefreshBOOL6: Threshold refresh. FALSE: refresh each thresholds separately. TRUE: refresh all thresholds together when one threshold reached
IdSTRING(8)7: Sender Identity - maximum 8 character, freely selectable name/text
DataTypeBYTE8: Possible Data types: 1=BOOL, 2=BYTE, 3=INT, 4=UINT, 5=DINT, 6=UDINT, 7=REAL
LengthINT9: Current length of Data. Maximum value 88
ThresholdPOINTER TO DINT
- 10: When exceeding or falling below a threshold, a writing operation of a dataset into the FIFOin is started.
After this operation, either only the single threshold difference (between input and threshold) is deleted (ThresholdRefresh=FALSE) or all differences (ThresholdRefresh=TRUE). As the input is a poiner to, it has to be connected to an preceding ADR-Operator, to which any available input type can be provided: BOOL, BYTE, INT, UINT, DINT, UDINT, REAL or an array of these data types. Make sure that Threshold is always of the same type as the respective input E.g. if the Input is an ARRAY[0..n] OF BYTE, Threshold has to be an ARRAY[0..n] OF BYTE too. This input is only relevant for 2=BYTE, 3=INT, 4=UINT, 5=DINT, 6=UDINT, 7=REAL, not for bool. For the BOOL type inputs, Threshold is not needed.
DataPOINTER TO DINT
- 11: Address of Data (ARRAY or VALUE with ADR on Data of FB)
Input value as single value or as ARRAY for the possible values. As the input is a POINTER TO, it has to be connected to a preceding ADR-Operator, to which any available input-type can be provided: BOOL, BYTE, INT, UINT, DINT, UDINT, REAL or an ARRAY of these data types
Output
ErrorIDNO_ERROR
3: Shows error, Refer ERROR_ID enumeration for details of the error
StatezLOG_IDLE
4: Actual state of LogInput, enumeration of Type zLOG_ENUM_STATE
InExecutionBOOLFALSE
5: A command was received when InExecution=TRUE - write datasets is carried out
OverflowBOOLFALSE
6: Overflow, FIFOin is full, datasets are rejected. Output will be TRUE, if an overflow occurs. On this output a rising edge (FALSE -> TRUE) shows that communication/logging request occurred too fast and therefore the SRAM-FIFOin is full
FifoInLevelDINT0
7: Level FIFOin (0…161)
FifoInNextWriteDINT0
8: Next write position in FIFOin
FifoInMaxLimitDINT0
9: Maximum limit of FIFOin - Standard value 161
NumberItemsDINT0
10: Number of Items since Enable=TRUE
NumberOverflowDINT0
11: Number of Overflow items since Enable=TRUE
Methods:
A_StartAction
B_CyclicAction
D_AbortAction
E_ResetAction
Structure: