News:

  • February 19, 2026, 05:59:23 PM

Login with username, password and session length

Author Topic: Help With Math Function  (Read 202 times)

Saturn_Europa1

  • Jr. Member
  • **
  • Posts: 10
Help With Math Function
« on: February 18, 2026, 01:24:52 PM »
I am having a bit of trouble with this code.  Please see attached screenshot.


V2110 is written as 85 elsewhere in the program.  V1470 is the first Output for a 0-10V Analog Card.  Its written in Direct Logic 6. 

Looking through the manual, it looks like R65535 * V1600 function is taking the double word 85 written with two decimals and converting it to 8.5 volts analog output?   Is this correct? 

 

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3794
    • Host Engineering
Re: Help With Math Function
« Reply #1 on: February 18, 2026, 01:48:42 PM »
85 BCD with 2 implied decimal places is 0.85 not 8.5 (box is using K2 for number of implied decimal places)

Another example, if it was 123 BCD with 2 implied decimal places, it would be 1.23 real