01-07-2017 03:18 PM - edited 05-30-2017 11:13 AM
Overview
The DCAF Scaling Framework provides all hooks needed for custom scaling modules within DCAF. This is the abstract component that all concrete scaling implementations inherit from. The DCAF Polynomial Scaling module is one such implementation to both handle the most common use case and serve as a model for how to extend the DCAF Scaling Framework with your own custom scale type.
Description
Frequently there is a need for users to convert data acquired from a measurement system into engineering units suitable for use in modelling, processing, logging, or display. This framework provides all of the necessary infrastructure to support creation of custom scaling modules, including a common configuration interface and runtime code to perform the scaling. Child classes need implement only a subpanel in the configuration editor where the specific scaling parameters are entered and override a dynamic dispatch runtime method to perform the actual scaling calculation.
Configuration of Scales
All Scaling modules share a common interface, shown below.
The Scales control on the left permits creation, deletion, and renaming of scales. Each scale will have its own configuration, consisting of two parts, Mappings and Scaling Configuration, each of which has a separate tab.
The Mappings tab is common for all scales, and defines the data type and mapped tag of the input as well as the output. Each scale can be reused many times with different mappings. For example, to apply the same scaling factors to eight channels of an input module, create one scale and define eight mappings (one for each channel).
The Scaling Configuration tab contains the specific configuration for the type of scale module you're working with. In the case of a Polynomial Scale module, it allows input of an array of polynomial scale factors. If you create your own custom scaling module, you'll need to implement the small editor page contained within the subpanel on this tab. See the Polynomial Scale module source code as an example of what to do. If you'd like detailed instructions, please contact the DCAF developers by posting on this page. We'll be happy to write up a document if there is interest.
The Scaling Configuration tab for the Polynomial Scaling module is as shown below. The module accepts polynomial coefficients that will be applied to a polynomial evaluation of the input signal. The page displays the polynomial formula and a quick graph to visualize the scale.
Each scale defined in the Scales column on the left side of the editor page has one Scaling Configuration and potentially many Mappings. If you are using the same scale factors on multiple channels, don't create multiple Scales, create one Scale and create multiple mappings using the same Scaling Configuration. This optimizes performance by limiting the number of calls necessary. Further performance enhancement is possible if all mappings have the same data type.
Only have one instance of a particular scaling module in a particular engine. Having multiple Polynomial Scaling modules defined in a single engine will function identically to, but run slower than, having one Polynomial Scaling module with multiple scales defined inside of it.
Quality
Software Requirements
Hardware Requirements
Limitations
Additional Uses
Installation
Install the DCAF Polynomial Scaling module directly from VI Package Manager. This will include the DCAF Scaling Framework as a dependency.
Support
Please post issues on this module's Github repository.
Visit Collaborating on the Development of DCAF to learn how to contribute your own improvements to this module directly.