Mitsubishi Electric MELSEC iQ-R C Programming Manual page 16

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

Advertisement

DANL_DigitalFilter
This function performs digital filter operation for the specified wave.
■Format
short DANL_DigitalFilter (float* pfData, long lPoint, long lSamplingCycle, DIGITAL_FILTER_SETTINGS_STRUCT
DigitalFilterSettings, float* pfOutput)
■Argument
Argument
pfData
lPoint
lSamplingCycle
DigitalFilterSettings
pfOutput
• The details of the DIGITAL_FILTER_SETTINGS_STRUCT structure is as follows:
No.
Type
Argument
1
long
lFilterType
2
float
fCutoffFreqHz1
3
float
fCutoffFreqHz2
4
long
lFilterCalcType
5
long
lDegree
6
float
fRipple
■Description
• A digital filter operation is performed for the wave specified to the input data storage destination (pfData).
• The wave data for the digital filter operation is read from 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 result of the digital filter operation is stored to the operating result storage destination (pfOutput) for the size specified
to the data size (lPoint) in the input data storage destination (pfData). Reserve the area larger than the data size (lPoint) in
the operating result storage destination (pfOutput).
• The DANL_DigitalFilter function supports low-pass filter, high-pass filter, band-pass filter, and band elimination filter.
• The DANL_DigitalFilter function supports FIR filter, IIR filter (Butterworth), and IIR filter (Chebyshev).
3 DETAILS OF FUNCTIONS
14
3.1 Data Analysis Functions
Name
Input data storage destination
Data size
Sampling cycle
Digital filter setting
Operating result storage
destination
Name
Frequency response filter
type
Cutoff frequency 1
Cutoff frequency 2
Digital filter type
Degree
Ripple
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: 16 to 1000000)
Specify the sampling cycle of the wave data to be operated.
(Setting range: 1 to 1000000[us])
Specify the filter parameters set to the DIGITAL_FILTER_SETTINGS_STRUCT
structure.
Specify the start address of a operating result storage destination.
Description
Specify a filter type.
0: Low-pass filter (LPF)
1: High-pass filter (HPF)
2: Band-pass filter (BPF)
3: Band elimination filter (BEF)
Specify a cutoff frequency 1.
Any value can be specified within the following range:
• A value larger than 1.192093e-07 and less than the sampling frequency which is
divided by 2
Specify a cutoff frequency 2.
Any value can be specified within the following range:
• A value larger than the cutoff frequency 1 and less than the sampling frequency
which is divided by 2
(Enable only when BPF or BEF is specified to the cutoff frequency 2.)
Specify a filter type.
(IIR filters can be used only when LPF or HPF is specified.)
0: FIR filter
1: IIR filter (Butterworth)
2: IIR filter (Chebyshev)
Specify a degree.
Any value can be specified within the following range:
• For FIR filter: 2 to 200 (even number only)
• For IIR filters: 2 to 40.
Specify a value lower than the data size (lPoint).
Specify a ripple [dB].
Any value can be specified within the following range:
• 0.015625 to 1.0
A ripple is used only when the IIR filter (Chebyshev) is specified.
IN/OUT
IN
IN
IN
IN
OUT

Advertisement

Table of Contents
loading

Table of Contents