Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

calulate

2018-10-10
2018-10-25
  • Reinier Geers - 2018-10-10

    I implementet a formula.
    I found out that

    Real_Var:= 1 / 6 ; is 0 Why ?

    i have to use Real_1 :=1; Real_6:=6;

    Real_Var:= Real_1 / Real_6 ; is 0.166666

     
  • Lo5tNet - 2018-10-10

    You need to include a decimal so that the values you are dividing start off as a real:
    Real_Var:= 1.0/6.0;

     
  • Reinier Geers - 2018-10-25

    Thanks

     

Log in to post a comment.