This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] MSP430FR6047:使用校准文件的 EVM430-FR6047

Guru**** 1549780 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1340053/msp430fr6047-evm430-fr6047-using-calibration-files

器件型号:MSP430FR6047

您好!

我之前已经提出过这个问题、但没有得到解决问题的答案。

我通过 GUI 构建了一个校准文件、导出了头文件、获取了它导出的三个文件并将它们放在我的当前项目中:
演示代码6047。

这是我的 VFRCalib.h 文件:  (注意所有数字都是灰色的)

...

我定义可以使用校准的模式:   

最后、在校准之前和校准之后、我会看到相同的值。
为什么会发生这种情况?
他为什么不使用我给他的校准文件?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Ido、

     在运行算法之前、您是否在项目中更改了 volumeCalibrationOption 变量的值?

    我之所以提出这个问题、是因为我在 USS 代码中找到了以下注释:

    //! \brief The following API scales Volume Flow Rate by the additional scale 
    //! factor.
    //!
    //! \n \n \b Note1: USS_getResultsInFloat must be called prior to calling
    //! this function.
    //!
    //! The API multiplies results->volumeFlowRate by meterConfig->volumeAddlScaleFactor.
    //! The API is only needed when the additional scale factor is larger than 1.0f. 
    //! It checks the volumeCalibrationOption member in the
    //! USS_Algorithms_User_Configuration structure.
    //! For example:
    //! If volumeCalibrationOption != USS_Alg_volume_flow_Calibration_Option_disabled
    //! Then it also scales results->volumeFlowRateNoCalib member by volumeAddlScaleFactor.
    //! If volumeCalibrationOption == USS_Alg_volume_flow_Calibration_Option_disabled
    //! Then results->volumeFlowRateNoCalib = results->volumeFlowRate.
    //! If API return message code USS_message_code_valid_results, then algorithms
    //! result are valid.
    //!
    //! \param[in] config  is a pointer to the USS SW Library user configuration
    //! \param[in] results  is a pointer to the USS Algorithms Result structure
    //!
    //! \return USS_message_code
    extern USS_message_code USS_scaleVolumeFlowRate(
            USS_SW_Library_configuration *config,
            USS_Algorithms_Results *results);

    如果您没有使用该变量禁用校准、则会为 volumeFlowRateNoCalib 分配与 volumeFlowRate 相同的值。 换句话说、它看起来像是 volumeFlowRateNoCalib 实际上将根据您的校准进行缩放。 我猜是因为它在使用您的校准文件、问题只是变量名称有点误导。 您可以尝试更改该变量以禁用 校准、然后重新检查它计算的流速以验证这一点。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    否我没有更改"volumeCalibrationOption "...

    您能准确地指示哪个设置会使它们获得相同的值吗?

    当我放置断点,他永远不会到达那里,值"不 calib"和正常流速仍然相等... 请参阅图片: