Sign in to follow this  
Followers 0
scotty_177

Real values on older versions of programmer

5 posts in this topic

Hi Was wondering in older versions of cx programmer did you use commas instead of decimal points for floating point values? Thanks

Share this post


Link to post
Share on other sites
Not on any of the versions that I ever used.

Share this post


Link to post
Share on other sites
Thanks for ur reply. Any idea why the PLC would run a programme with errors in it such as this. The machine seems to be working fine. Bit of background I took a backup of a PLC and found errors to be on it In The form of the original programmer had used commas instead of decimal points when entering REAL values. Eg 3,0 instead of 3.0. Was wondering why this would be the case and why the PLC would run a program with errors in it. Can't get in contact with the original programmer at this current time.

Share this post


Link to post
Share on other sites
Most likely the CX-Programmer project is opened on a system that has wrong regional settings which affects the symbol that is used for decimal separator. CX-Programmer expects a . (point) but with some regional settings, the decimal separator is a , (comma). Then CX-Programmer compiles the project with errors like "can't convert integer literal to real". Solution is to set the Windows regional settings such that a . (point) is used as decimal separator (US English for instance).
1 person likes this

Share this post


Link to post
Share on other sites
Thanks that would make sense as the program was created by a company from Spain, whereas we are based in the UK

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0