SgxEventCapture (FB)
FUNCTION_BLOCK SgxEventCapture EXTENDS AbbLConC3
The “SgxEventCapture” function block detects measurement limit violations AND records(peak value and duration)
Peak value is the maximum or minimum value in 16-bit data format captured in detection cycle
Duration represents the event duration captured with 100μs resolution, a value of 0 indicates normal measurement operation
“Application” determines whether the “UpperLimit” and “LowerLimit” are sourced from channel parameters(application = FALSE) or functionblock itself (application = TRUE)
When the digital output is configured as “Event-application FB”, it signals the exceedance OF either “UpperLimit” OR ”LowerLimt”
Event capture triggers on the Enable = TRUE
- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
EnableBOOLFALSE
A rising edge (Enable = TRUE) starts the operation, the output Busy goes to TRUE. All other inputs are read and considered continuously. Execution will continue forever until a falling edge (Enable = FALSE) aborts the operation. During Aborting the Busy is still TRUE. Afterward all outputs are reset.
AbbLConC3
Output
BusyBOOLFALSE
Operation is running (while output Error is FALSE)
AbbLConC3
ErrorBOOLFALSE
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.
AbbLConC3
Input
PauseBOOLFALSE
0 => Normal operation; 1 => pause the current operation
ApplicationBOOLFALSE
FALSE => Upper/lower limit is active from parameter data; TRUE => Upper/lower paramter is active from this “Function block”
LockBOOLFALSE
FALSE => continue capture; TRUE => lock the current result not to be overlapped
EventOutputEnableBOOLFALSE
FALSE => mask the digital output not to be activated by event; TRUE => enable the event trigger of digital output
DigitalOutputBOOLFALSE
Imaged digital output field when “general digital output” is configured
ObjectSgx_WEIGHT_OBJECT.Net
0 => Net; 1 => Gross
UpperLimitINT (-1500..1500)
1500
Upper limit to trigger an event when “application” is “TRUE”
LowerLimitINT (-1500..1500)
-1500
Lower limit to trigger an event when “application” is “TRUE”
ChannelPOINTER TO SgxChannelIo
Instance of strain gauge channel to be connected
Output
ActiveBOOLFALSE
0 => IndexReturn, PulseWidthReturn and PeakValueReturn are under capture; 1 => IndexReturn, PulseWidthReturn and PeakValueReturn are refreshed
ErrorIDERROR_ID.NO_ERROR
Error code of event detection cycle
OverRunBOOLFALSE
0 => Data read in time; 1 => Data missing (IndexReturn > Previous IndexReturn + 1)
StateReturnWORD0
State of event capture cycle returned,
IndexReturnWORD0
Index of event detected and returned, [0] => digital output state;[1] => ACTIVE; [2] => STATE OF LOCK, [3] = STATE OF EVENT_OUTPUT_ENABLE;[4:7] => Object, 0 = Net, 1 = Gross; [8:9] => fixed unit = 0; [10:11] => diagnosis class; [12:15] => fixed function code = 4
PulseWidthReturnWORD0
Pulse width of event detected and returned, x 100us
PeakValueReturnINT0
Maximum peak value, Max(maximum value - upper limit, lower limit - minimum value)