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 using calibration files

Part Number: MSP430FR6047


Hi !

I have already asked this question before and did not receive an answer that solved the problem.

I built a calibration file through the GUI, exported headers, took the three files it exports and put them in my current project:
Demo code of 6047.

this is my VFRCalib.h file :    (notice that all the numbers are gray color)

...

i define the mode that can use the calibration:  

And finally I see the same values, before calibration and after calibration
why is it happening?
Why doesn't he use the calibration file I gave him?

  • Hi Ido,

    Have you changed the value of the volumeCalibrationOption variable in your project before running the algorithms?

    I ask this because I have found the following comments in the USS code:

    //! \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);

    It looks like if you do not disable the calibration using that variable, then the volumeFlowRateNoCalib will be assigned the same value as volumeFlowRate. In other words, it looks like the volumeFlowRateNoCalib will actually be scaled according to your calibration. So my guess is that it is using your calibration file, the problem is just that the variable name is a bit misleading. You could try changing that variable to disable  calibration and then re-checking the flow rate it calculates to verify this.

  • no i didnt change "volumeCalibrationOption "...

    Can you direct me exactly which setting causes them to get the same value?

    when i put breakpoint he never get there,and the value "not calib" and the normal flow rate still equal... see picture:

**Attention** This is a public forum