DFD Save MRate to Text File VI

Digital Filter Design VIs and Functions

DFD Save MRate to Text File VI

Owning Palette: Multirate Utilities VIs

Installed With: Digital Filter Design Toolkit

Saves a multirate filter to a text file in XML format.

Note  This VI uses periods for decimal points in the coefficients values.

Details  Examples

 Place on the block diagram  Find on the Functions palette
multirate filter in specifies the input multirate filter. You cannot specify a multistage multirate filter for this input.
file path in specifies the path to the file in which you want to save the multirate filter. The default file extension is .xml. You can use any other file extension for the file. If file path in is empty (default) or <Not A Path>, this VI displays a dialog box from which you can select a file. This VI returns an error if you specify a file path that does not exist or if you click the Cancel button on the dialog box.
comments specifies the comments that you want to add to the text file.
error in describes error conditions that occur before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.
status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.
code is the error or warning code. The default is 0. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
source specifies the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.
multirate filter out returns the multirate filter in unchanged.
file path out returns the path to the file to which this VI saved the multirate filter.
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.
status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.
code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning.

DFD Save MRate to Text File Details

This VI saves a multirate filter as an .xml file by default. The following table lists the tags that the .xml file might contain.

Tag Name Description
DFDTData Contains the entire information about a multirate filter.
CustomerComments Contains the information you specified in the comments input of this VI.
Structure Contains the multirate filter structure.
FilteringMode Contains the filtering mode setting of the multirate filter.
Factor Contains the sampling frequency conversion factor of the multirate filter. This tag contains the following sub-tags:
  • L—Contains the value of the interpolation factor.
  • M—Contains the value of the decimation factor.
CICParameters Contains the filter parameters of the cascaded integrator comb (CIC) filter. If the filter is not a CIC filter, this XML file does not contain this tag. If the filter is a CIC filter, this tag contains the following sub-tags:
  • NumberOfStages—Contains the number of stages of the CIC filter.
  • DifferentialDelay—Contains the differential delay value of the CIC filter.
  • FilterType—Contains the filter type of the CIC filter.
Order Contains the multirate filter order.
Coefficients Contains the floating-point multirate filter coefficients. If the filter is a fixed-point multirate filter, this tag contains the coefficients of the reference floating-point multirate filter.
FXPInformation Contains the entire information about the fixed-point multirate filter. If the filter is a floating-point multirate filter, this XML file does not contain this tag. If the filter is a fixed-point multirate filter, this tag can contain the following sub-tags:
  • FXPCoefficients—Contains the fixed-point multirate filter coefficients.
  • FXPGain—Contains the fixed-point multirate filter gain.
  • IntegerCoefficients—Contains the integer multirate filter coefficients.
  • IntegerGain—Contains the integer multirate filter gain.
  • Quantizers—Contains the multirate filter coefficients quantizer settings and multirate filter gain quantizer settings. This tag contains the following sub-tags:
    • CoefficientsQuantizer—Contains the multirate filter coefficients quantizer settings.
    • ScaleByPowerOf2—Indicates the scaling setting of the multirate filter. This tag appears only if you set the scale by power of 2? input of the DFD FXP MRate Quantization VI to TRUE.
    • ScaleType—Contains the scale type setting of the multirate filter.
    • GainQuantizer—Contains the multirate filter gain quantizer settings.

    The CoefficientsQuantizer and GainQuantizer tags can contain the following sub-tags:

    • WordLength—Contains the word length of the quantizer.
    • IntegerWordLength—Contains the integer word length of the quantizer.
    • OverflowMode—Contains the overflow mode setting of the quantizer.
    • RoundingMode—Contains the rounding mode setting of the quantizer.
    • Signed—Indicates the quantizer uses a signed fixed-point format. This tag is always empty.
    • Unsigned—Indicates the quantizer uses an unsigned fixed-point format. This tag is always empty.
    Note  If the gain processing occurs on a host machine, or if the gain processing occurs on a target but the filter gain is a power-of-2 value, the multirate filter gain quantizer contains the following message only: No integer gain is processed on the target.

Examples

Refer to the following VIs for examples of using the DFD Save MRate to Text File VI:

  • Export Multirate FIR Coef to Xilinx COE File VI: labview\examples\Digital Filter Design\Fixed-Point Filters\Multirate

     Open example  Browse related examples

  • Save Multirate Filter to Text File VI: labview\examples\Digital Filter Design\Getting Started\Apply Filters

     Open example  Browse related examples