trace32lauterbach

How to write a float value to a csv file using cmm scripts


I have the following piece of lauterbach cmm script

OPEN #1 ..\..\make\Measurement_scripts\export.csv /CREATE
WRITE #1 "ttc_tracker"

PRINT "RePeaT Measuring Throughput"
RePeaT 0xFF
(
  WinPOS ,,,,,0

  ; Concatenate the values with commas
  WRITE #1 \
    %Decimal Var.VALUE((*(p_OAL_pong)).ttc_tracker) 
) 

    CLOSE #1

%Decimal writes the value as an integer, I want to write the floating point value to the file. I don't find anything in the documentation here https://www2.lauterbach.com/pdf/practice_ref.pdf

Any help would be appreciated


Solution

  • The function Var.VALUE() returns integer values. Use Var.FVALUE() to get floating point results.