Reputation: 376
I am looking for a way to convert a floating-point value to scientific notaiton string in Beckhoff TwinCAT or codesys. The documentation for their FB_FormatString says this is not currently supported. Does anyone have a "goto" approach for this?
Upvotes: 2
Views: 1155
Reputation: 36
In TwinCAT I use LREAL_TO_FMTSTR
sOut := LREAL_TO_FMTSTR( 0.46523, 2, TRUE );
Upvotes: 2