Mitsubishi Electric MELSEC iQ-R C Programming Manual page 19

Controller module/c intelligent function module
Hide thumbs Also See for MELSEC iQ-R C:
Table of Contents

Advertisement

DANL_FindCrossPoint
This function calculates the number of cross points of the specified wave and a reference value for the number of cross points
specified to the maximum number of cross points.
■Format
short DANL_FindCrossPoint (float* pfData, long lPoint, float fReferenceValue, long lCrossPattern, long lMaxPoint, long*
plCrossData,long* plCrossPoint)
■Argument
Argument
Name
pfData
Input data storage
destination
lPoint
Data size
fReferenceValue
Reference value
lCrossPattern
Cross point recognition
pattern
lMaxPoint
Maximum number of cross
points
plCrossData
Cross point index storage
destination
plCrossPoint
Number of cross points
• Optional setting (An operating condition can be changed with the DANL_SetOpCondition function.)
Setting
Number of times of reference
value determinations
(Set to the second argument:
plSet[1])
■Description
• The number of cross points is calculated using the wave specified to the input data storage destination (pfData) and the
value specified to the reference value (fReferenceValue), and the result is stored to the cross point (plCrossPoint).
• A cross point is recognized only when the number of elements in the input data storage destination (pfData) has exceeded
or fallen below the reference value (fReferenceValue) consecutively for the number of times specified to the number of
times of the reference value determinations in the optional setting.
• The wave used for calculating cross points is read from the start address specified to the input data storage destination
(pfData) for the size specified to the data size (lPoint). Reserve the area larger than the data size (lPoint) in the input data
storage destination (pfData).
• The indexes of the cross points are stored to the cross point index storage destination (plCrossData). Reserve the area
larger than the number of maximum cross points (lMaxPoint) in the cross point index storage destination (plCrossData).
• The DANL_FindCrossPoint function stops processing when the number of cross points reaches the maximum number of
cross points (lMaxPoint).
• If no cross points exist, '0' will be stored to the cross point (plCrossPoint). The indexes in the cross point index storage
destination (plCrossData) do not change.
Description
Specify the start address of wave data to be operated.
Specify the number of the array elements of wave data to be operated.
(Setting range: 1 to 1000000)
Specify the reference value to be operated.
Specify the pattern to be recognized as a cross point.
0: Both rise and fall
1: Rise only
2: Fall only
Specify the maximum number of cross points to be recognized.
(Setting range: -1, 1 to data size (lPoint))
When -1 is specified, the data is not stored to the cross point index storage destination
(plCrossData). Instead, the number of recognized cross points is only counted.
The indexes of the cross points are stored until the number of cross points reaches the
maximum number of cross points (lMaxPoint).
When the maximum number of cross points (lMaxPoint) is -1, the value of an array does not
change.
The number of recognized cross points is stored.
Default
Description
value
1
Specify the number of consecutive points with which values are recognized as having exceeded or
fallen below the reference value.
The data is recognized as having exceeded or fallen below the reference value only when the number
of cross points has exceeded or fallen below the reference value for the number of specified cross
points consecutively.
(Setting range in the DANL_SetOpCondition function: 1 to 100)
IN/OUT
IN
IN
IN
IN
IN
OUT
OUT
3 DETAILS OF FUNCTIONS
3.1 Data Analysis Functions
3
17

Advertisement

Table of Contents
loading

Table of Contents