Float Exponent Conversion

Hello,

I have an analog gauge feeding into my PLC as an input. I have to plug this raw data into an mathematical expression in order to convert voltage into a “raw pressure”

As an example, I have an image showing that I have some basic function inputs being the scaling factor for that particular gauge, as well as the analog input (simulated), with an output for raw pressure.

These outputs are defined as LReal in my TIA project. The last two functions produce:

0.125892404049

0.000158489288

What I’d like to do know is how I can pass these values over to OPC tags and have them displayed inside ignition as:

1.25E-1

1.58E-4

Whereas right now they are displayed the raw value:

image

Should I find a way to do this in the TIA portal, or does Ignition have enough capability to handle this?

There would be multiple ways to do this depending on where you want the numbers displayed. Ignition does include options for specifying the format of the number that you want to display. Here's an example with an expression: numberFormat(0.0000123, '0.###E0')
Which produces:
image

1 Like

That will do! Thanks sir