Announcement

Collapse
No announcement yet.

How to calculation floating point in Direct05

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to calculation floating point in Direct05

    Hi guy

    someone help me i would like to calculate floating in plc Direct05
    EXample

    yyyy.y=xxxx.x/3.14

    How to do that? Please suggest me. (Example program)

  • #2
    The DL05 does not have floating point (REAL) instructions. The best you can do is store 'xxxx.x' as multiplied by 10 to get 'xxxxx'. For the operation multiply the 'xxxxx' by 100 to make it effectively 'xxxxx00'. Divide that by 314. Divide the result by 100 to get 'yyyyy' which is the actual result multiplied by 10.

    Or purchase a more powerful unit like the DL06 which does have floating point instructions.
    thePLCguy

    Bernie

    Comment


    • #3
      Thank you for your answer.

      Comment


      • #4
        Originally posted by bcarlton View Post
        Or purchase a more powerful unit like the DL06 which does have floating point instructions.
        Or if one has budget / space constraints one might consider a CLICK (500 dedicated 32bit floating point registers, math box with trigonometric functions and square root, etc.) , but one would have to learn a new programing interface. Oh, and the CLICK does require 24VDC, so the required power supply somewhat reduces the space advantage, though there is flexibility in where the PS is mounted.

        Comment

        Working...
        X