DFD Save to Text File VI
Owning Palette: Utilities VIs
Installed With: Digital Filter Design Toolkit
Saves a filter to a text file in XML format.
Use the DFD Load from Text File VI to load the filter from the text file.
Note This VI uses periods for decimal points in the coefficients values. |
Place on the block diagram | Find on the Functions palette |
filter in specifies the input filter. | |||||||
file path in specifies the path to the file in which you want to save the 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. Use the DFD Load from Text File VI to load the filter from the text file. | |||||||
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.
| |||||||
filter out returns the filter in unchanged. | |||||||
file path out returns the path to the file to which this VI saved the 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.
|
DFD Save to Text File Details
This VI saves a 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 filter. | ||
CustomerComments | Contains the information you specified in the comments input of this VI. | ||
Order | Contains the filter order. | ||
Structure | Contains the filter structure. | ||
Coefficients | Contains the floating-point filter coefficients. If the filter is a fixed-point filter, this tag contains the coefficients of the reference floating-point filter. Depending on the type of filter you specified in the filter in input, this tag can contain the following sub-tags:
| ||
ZeroPoleGain | Contains the floating-point zeroes, poles, and filter gain. If the filter is a fixed-point filter, this tag contains the zeroes, poles, and filter gain of the reference floating-point filter. This tag contains the following sub-tags:
| ||
FXPInformation | Contains the entire information about the fixed-point filter. If the filter is a floating-point filter, this XML file does not contain this tag. If the filter is a fixed-point filter, this tag can contain the following sub-tags:
|
Examples
Refer to the following VIs for examples of using the DFD Save to Text File VI:
- Export FIR Coef to Xilinx COE File VI: labview\examples\Digital Filter Design\Fixed-Point Filters\Single-Rate
- Export SOS Coef to MathScript VI: labview\examples\Digital Filter Design\Getting Started\Apply Filters
- Export SOS Zero-Pole-Gain to MathScript VI: labview\examples\Digital Filter Design\Getting Started\Apply Filters
- Save and Load Filter to and from Text File VI: labview\examples\Digital Filter Design\Getting Started\Apply Filters