PLUS+1 User Forum

PLUS+1™ Software => General controls => Topic started by: LBee11 on September 08, 2016, 01:12:08 PM

Title: Constant Real Value
Post by: LBee11 on September 08, 2016, 01:12:08 PM
Hi All,

I'm new to the PLUS+1 Guide software and am struggling with how to provide a constant Real value. I'm trying to use a Multi-Character constant but when I put the value of "32.5" in, there is not a value type that will accept decimal places?

Am I missing something? I'm sure a Constant Real value is achievable!

Thanks
Title: Re: Constant Real Value
Post by: FStelzer on September 08, 2016, 03:33:58 PM
Hello,

as far as I know is there no possibility to define a constant real value.

You have to multiple your value with 10 to get "decimal" places.

Regards,
FStelzer
Title: Re: Constant Real Value
Post by: oiltronic on September 08, 2016, 09:43:07 PM
Welcome to Danfoss Land, Alvxx1.  When it comes to numbers Plus+1 GUIDE only does integer values: 8, 16 or 32-bits wide, signed or unsigned.  You'll need to scale all values as FSelzer said.  Because of this, I add a suffix to all my variable names that indicates the units, for example "EE_MaxCylSpeed_pctx100" for the typical hundredths of a percent values scaled up to an integer, or "CP_LeftPressure_mV" for millivolts.
Title: Re: Constant Real Value
Post by: Nilla on September 09, 2016, 08:06:18 AM
Hi all!

Floating point data types REAL and LREAL are available in the PLC editor of GUIDE.
In GUIDE graphical code there is no possibility to create floating point constants, although floating point variables can be routed through GUIDE graphical code from one PLC POU to another.

Best regards
Nilla
PLUS+1 Helpdesk team
Title: Re: Constant Real Value
Post by: FluidPowerTom on September 12, 2016, 05:52:38 PM
The Structured Text POU's in GUIDE is what I go to when I need floating point.