Announcement

Collapse
No announcement yet.

MATH. Log vs Ln round or truncate

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

  • MATH. Log vs Ln round or truncate

    I am attempting to use Log() to find yhe magnitude of a value.
    I am using S32 tags as the value and the result.
    I have used Log() successfully in other languages, but it seems that PAC rounds.
    Can I coerce the math instruction to truncate the result or will I be forced to long-hand this operation?

    Ideas?

  • #2
    So I did both LOG & LN functions. I agree they both round. But if you multiply by 10 then integer divide by 10 it will strip off the remainder.

    Click image for larger version  Name:	math1.png Views:	0 Size:	62.3 KB ID:	128373
    Attached Files
    Last edited by ADC_CommTeam02; 02-11-2020, 07:14 AM.

    Comment

    Working...
    X