Jump to content

Recommended Posts

Posted

I have this issue. working on Omron's CJ2M.

String received can be +4.24737E-03 or +2.17737E+01

Somehow, the structure text function does not have STRING_TO_REAL.

We need to extract some readings from a Meter and do some value comparison in the PLC to set the passing range. Any advise I can get from personnel here?


Posted

Seems the FVAL is in the Ladder format. Under Structure Text, like don't have direct.

Anyway, I have work around this by extracting the Integer part to a DINT -> Real, the Decimal part to another DINT -> Real -> Convert into Decimal value. Add them together. Then check if it is E+ or E-, and Multiply or Divide according to the E number.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...