Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

In this section we want to answer question around specific calculations in jBEAM.

How to use map values in formula?

Only the Formula Editor with Text Resolver allows the direct selection of a map value in the window. For the other two (Formula Editor for numeric Objects, Formula Editor for numeric Channels), the map value must first be converted into a data object.

Proceed as follows:

  1. Use Property → DataItem component (menu: Math → Conversions) and select the requested map value. If the map value provides a measurement unit, this gets also applied to the data object:

  2. The result from step 1 is a data object you can use in i.e. Formula Editor for numeric Objects:

The result of max(abs(A)) in formula editor for numeric object (line by line)is max (A), not considering the negative part

The formula editor (line by line) calculates the complete formula line by line. There are no intermediate channels available but only individual values for each line. Therefore a max() operation can be done only with a direct input channel as argument (max(A)). Then it takes for each line the maximum of the input channel A. Also it does only know the last used input channel was A but not, that another operation was done in between (as max(abs(A))). Therefore any statistical function (max(), min(), …) is only allowed with an input channel as direct argument. In the past we had no statistical functions in this formula editor. But customers wanted formulas as "A - min(A)“ which works as long as these statistical values have only a direct input channel as argument.

The object formula editor works completely different. Each operation is done completely for the whole input object (channel, matrix, single value) and gets the appropriate resulting object. In your sample with A as a channel the intermediate result of abs(A) is a channel and the following max(abs(A)) is the maximum of the intermediate channel, which is a single value. 

Meanwhile we can say the object formula editor is the favorite one. It is faster has more functions and works better due to its object approach. The formula editor (line by line) should be used only in special circumstances, e.g. with an input channel of a measurement component where the measurement value come into jBEAM value by value, which is line by line.

  • No labels