Command: ChnEventDetectionWindow



DIAdem 2018ヘルプ


発行年月: 2018年6月
製品番号: 370858P-0112
製品情報を参照

ダウンロード (Windowsのみ)


DIAdem 2017 ヘルプ
DIAdem 2018 ヘルプ
DIAdem 2019 ヘルプ
DIAdem 2020 ヘルプ
DIAdem 2020 SP1 ヘルプ

Checks whether the values of a channel are in a specified window. You can specify an optional hysteresis range for the upper and lower window limit.

ReturnValue = ChnEventDetectionWindow(XW, Y, ChnEventWindowLowerLimit, ChnEventWindowUpperLimit, [ChnEventWindowLowerLimitHysteresis], [ChnEventWindowUpperLimitHysteresis], [ChnEventBeginIndex], [ChnEventEndIndex], [ChnEventMaxResultCount], [ChnEventCloseOnNoValue], [ChnEventUseFirstXValueOutside])

Input Parameters

XW Specifies the data channel containing the xw-values.
Y Specifies the data channel containing the y-values.
ChnEventWindowLowerLimit Specifies the lower limit value for which DIAdem checks the channel. If the value is NOVALUE, DIAdem uses a value range without a lower limit.
ChnEventWindowUpperLimit Specifies the top limit value for which DIAdem checks the channel. If the value is NOVALUE, DIAdem uses a value range without an upper limit.
[ChnEventWindowLowerLimitHysteresis] Specifies the value of the hysteresis for the bottom limit value of the value range. DIAdem positions a hysteresis window, which is twice as wide as the specified value, centric around the bottom limit value. The default value is 0 and means that DIAdem does not use a hysteresis.
Floating-point number variable
0 <= ChnEventWindowLowerLimitHysteresis <= 1E300
[ChnEventWindowUpperLimitHysteresis] Specifies the value of the hysteresis for the top limit value of the value range. DIAdem positions a hysteresis window, which is twice as wide as the specified value, centric around the top limit value. The default value is 0 and means that DIAdem does not use a hysteresis.
Floating-point number variable
0 <= ChnEventWindowUpperLimitHysteresis <= 1E300
[ChnEventBeginIndex] Specifies at which line number DIAdem starts checking the values of the data channel. The default value is 0, which means that DIAdem starts checking the values from the first row.
Longinteger variable
0 <= ChnEventBeginIndex <= 2147483647
[ChnEventEndIndex] Specifies the line number up to which DIAdem checks the values of the data channel. The default value is 0, which means that DIAdem checks the values up to the last row.
Longinteger variable
0 <= ChnEventEndIndex <= 2147483647
[ChnEventMaxResultCount] Specifies the maximum number of result values. The default value is 0 and means that DIAdem uses all result values.
Longinteger variable
0 <= ChnEventMaxResultCount <= 2147483647
[ChnEventCloseOnNoValue] Specifies whether DIAdem uses a NoValue at the end of the value area searched for. The default value is FALSE, which means that DIAdem ignores NoValues.
Boolean

Access: Read/Write
[ChnEventUseFirstXValueOutside] Specifies whether DIAdem uses the last x-value that meets the condition as the end of the wanted value range or the next value. The default value is FALSE, which specifies that DIAdem uses the last x-value as the end of the wanted value range. The ChnEventUseFirstXValueOutside only influences the x-value index but not the value index.
Boolean

Access: Read/Write

Return Parameters

ReturnValue A return value is a two-dimensional array containing the search results. Refer to Result of the Event Search for a detailed description of the array. Use the variables ChnEventList1, ChnEventList2, or ChnEventResultList as the return value of this function, or define your own variable.

Examples

The following example searches for the areas in which the values of the [1]/[2] channel are between 40 and 50. As a result the example returns an Event/EventStatus channel which always contains the value 1, if the values of the second channel of the first group is between 40 and 50. Otherwise the result channel contains the value 0.

ChnEventResultList= Null 
ChnEventResultList = ChnEventDetectionWindow(, "[1]/[2]", 40, 50, 0, 0)
Call ChnEventCreateStatusChn("Event/EventStatus", ChnEventResultList, "[1]/[2]", 0, 1)

The following example first searches for the areas in which the values of the [1]/[2] channel are between 40 and 50. Then the example checks whether values between 5500 and 6500 lie within the [1]/[3] channel. The example connects the two search results with the AND operator. The result of this example is a channel Event/EventStatus, which always contains the value 1 if the values of the second channel of the first group are between 40 and 50 and, simultaneously, the values of the third channel of the first group are between 5500 and 6500. Otherwise the result channel contains the value 0.

ChnEventList1 = Null 
ChnEventList2 = Null 
ChnEventResultList = Null 
ChnEventList1 = ChnEventDetectionWindow(, "[1]/[2]", 40, 50, 0, 0)
ChnEventList2 = ChnEventDetectionWindow(, "[1]/[3]", 5500, 6500, 0, 0)
ChnEventResultList = ChnEventOperationAND(ChnEventList1, ChnEventList2)

If Data.GetChannel("[1]/[2]").Size < Data.GetChannel("[1]/[3]").Size Then
  Call ChnEventCreateStatusChn("Event/EventStatus", ChnEventResultList, "[1]/[2]", 0, 1)
Else
  Call ChnEventCreateStatusChn("Event/EventStatus", ChnEventResultList, "[1]/[3]", 0, 1)
End If

Dialog Box Call

Call SUDDlgShow("Main", ResourceDrv & "AnaChnEventDetection")

Event Search

Related Topics

Command: ChnEventCompareChnEQ | Command: ChnEventCompareChnGE | Command: ChnEventCompareChnGT | Command: ChnEventCompareChnLE | Command: ChnEventCompareChnLT | Command: ChnEventCompareChnNE | Command: ChnEventCopyValues | Command: ChnEventCount | Command: ChnEventCreateFilteredChn | Command: ChnEventCreateFilteredFalseChn | Command: ChnEventCreateFilteredTrueChn | Command: ChnEventCreateStatusChn | Command: ChnEventDetectionDifference | Command: ChnEventDetectionEqualStr | Command: ChnEventDetectionInStr | Command: ChnEventDetectionSlope | Command: ChnEventDuration | Command: ChnEventFilter | Command: ChnEventFind | Command: ChnEventGate | Command: ChnEventInvalidValues | Command: ChnEventOperationAND | Command: ChnEventOperationEventIncluded | Command: ChnEventOperationNOT | Command: ChnEventOperationOR | Command: ChnEventPatternFind | Command: ChnEventResultAddPrePost | Command: ChnEventSampleCount | Command: ChnEventSort | Command: ChnEventStatArithMean | Command: ChnEventStatMax | Command: ChnEventStatMin | Command: ChnEventStatRange | Command: ChnEventStatStandardDeviation | Command: ChnEventStatSum | Command: ChnEventStatValueCount | Command: ChnFind | Command: ChnFindReverse | Result of the Event Search



この記事は役に立ちましたか。

役に立たなかった