adccommunitymod (AutomationDirect) asked a question.

Negetive numbers DL-05

Created Date: August 13,2010

Created By: dieseltwitch

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

I'm trying to find a way to work with a negative number, I have a y=mx+b formula that I need to use. It's a negative slope, ie y=-.85x+120 Any thoughts?


  • adccommunitymod (AutomationDirect)

    Created Date: August 13,2010

    Created by: ezfx

    You have to convert everything to Real numbers

  • adccommunitymod (AutomationDirect)

    Created Date: August 13,2010

    Created by: franji1

    You have to convert everything to Real numbers

    I don't think 05 supports REAL

  • adccommunitymod (AutomationDirect)

    Created Date: August 13,2010

    Created by: Tom Jenkins

    "Back in the day " most PLCs wouldn't support anything but positive integers. We ended up essentially programming many routines twice. We would test the variables to see which was greater, set a bit to indicate the number is negative, then adjust the math accordingly.

  • adccommunitymod (AutomationDirect)

    Created Date: August 13,2010

    Created by: Adisharr

    "Back in the day " most PLCs wouldn't support anything but positive integers. We ended up essentially programming many routines twice. We would test the variables to see which was greater, set a bit to indicate the number is negative, then adjust the math accordingly.

    That's the way I probably would right the routine if it was as simple as above.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: August 13,2010

    Created by: dieseltwitch

    I'm trying to find a way to work with a negative number,

    I have a y=mx+b formula that I need to use.

    It's a negative slope, ie y=-.85x+120

    Any thoughts?