4 Replies Latest reply on Jan 26, 2018 2:51 PM by Boost01

    Tag Average issue

    Boost01

      I am having an issue using the Tag Average in Event Frames.

       

      I am trying to pull the average tag value for the duration of the Event Frame, which is simple enough, however I am also using an SDK application to sync Event Frame data to SQL for additional reporting.

      The attribute for the Tag Average is set up as a double, which works very well in most cases, but sometimes the average is so small, that instead of displaying something like

      0.000067589

      it is displaying

      6.7589E-5

      This is messing up the sync as it is trying to put a double value from AF into SQL, but there are characters in the value, so errors with entering a VARCHAR into a Double field.

       

      My work around is to do a roundfrac() of the average, but I would prefer not to have 2 attributes when 1 can do the same job. Is there some way to stop AF displaying the values in this way?

       

      Kevin

        • Re: Tag Average issue
          dhearn

          Could you post code from your SDK application that is reading the values using the AF SDK and then writing them to SQL? It appears that you are converting to string values instead of writing the values directly as double to SQL.