adccommunitymod (AutomationDirect) asked a question.

PLC Direct Logic 06, Mathematical Operation.

Created Date: May 09,2017

Created By: ja_varela77

**** 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.****

Could Somebody Help me: I have a Direct Logic 06 PLC that is reading an analog Signal that is saved in the variable V2000. I want convert this data to an unit of engineering (Pressure) and send it to HMI. To do it, I need perform the next mathematical operation, but I dont know that instrucction o logic must use: (V2000 * 0.007082) -14.5. The result will send to a HMI. Please, Could you help me? Regards


  • adccommunitymod (AutomationDirect)

    Created Date: May 09,2017

    Created by: ja_varela77

    Could Somebody Help me:

    I have a Direct Logic 06 PLC that is reading an analog Signal that is saved in the variable V2000.

    I want convert this data to an unit of engineering (Pressure) and send it to HMI.

    To do it, I need perform the next mathematical operation, but I dont know that instrucction o logic must use:

    (V2000 * 0.007082) -14.5.

    The result will send to a HMI.

    Please, Could you help me?

    Regards

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: May 10,2017

    Created by: bcarlton

    If the reading is in the BCD format you must first use the BIN command to change it to the 'binary ' form. (The BCD command would not be needed if the reading is already in the binary format.)

    Then use BTOR to convert this to a REAL (floating point) format.

    Then use MULR with an argument of R0.007082

    Then use SUBR with an argument of R-14.5

    At this point the REAL format result is in the accumulator occupying 32 bits

    Use the OUTD command to send the result to 2 adjacent 'V ' memory registers (eg OUTD V2000 would send the result to V2000 and V2001)

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: May 11,2017

    Created by: ja_varela77

    Hi Bernie

    Thank so much for your help.

    Now all is clear.

    My mistake was not use the instruction BTOR.

    Best Regards