Announcement

Collapse
No announcement yet.

DL06 with F04DA2DA-2 Module - Trying to use the remainder

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


  • DL06 with F04DA2DA-2 Module - Trying to use the remainder

    Greetings. I am using a DL06 with FO4AD2DA-2 module. I am inputting 0-5 volts and simply want to display the value on my C-More touch screen. The problem is I cannot figure out how to get the remainder to display on the C-More.

    I am basically inputting a 0 - 24V voltage into a transducer that outputs 0-5 volts to the analog input card. I perform the scaling function and it results in a value plus a remainder. The remainder is in the stack and I can't figure out how to get it to display as the remainder on my touch screen. It seems easy enough but I can't find a way to do it. I need to be able to display the value as 23.57 as an example.

    Can you please help me out with what I am missing?

    Thanks.


  • #2
    POP
    OUT vxxxx

    Right after your scaling gets the remainder. Or convert your analog signal and scale into a real number and use real math. If you have a BCD number; BIN, BTOR then use real math. If it is a binary number then just BTOR then use real math.

    See chapter 5 of the DL06 user manual: https://cdn.automationdirect.com/sta...d006userm.html
    Last edited by Do-more PE; 06-13-2019, 07:11 AM.
    If you have an urgent issue, please contact AutomationDirect's Technical Support team.

    AutomationDirect.com Technical Support: 1(800) 633-0405 or (770) 844-4200 Email Tech Support

    Comment



    • #3
      After a DIV, the remainder is at the 2nd level of the stack, the quotient is at the top of stack (the accumulator). After doing the OUT Vxxxx to get the quotient, do a POP. This will remove the quotient and shift all the values on the stack up one level. The remainder will now be in the accumulator. Now do another OUT Vdifferentxxxx, and this should be your remainder.
      There are 10 kinds of people in this world, those who know binary, and those who do not.

      Comment



      • #4
        Thank you both for your information.

        Comment

        Working...
        X