adccommunitymod (AutomationDirect) asked a question.

Analog In/Math Help

Created Date: November 06,2008

Created By: cmpeters

**** 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 am reading in a high speed counter input on address V700 (v700 is the scaled value in inches setup using the Ctrio software). This value reads in perfectly. I need to offset this value by 15 inches using the directsoft software and output it to a variable. My current code looks like: LDD v700 (scaled encoder value) ADDD V1614 (Offset Value of 15, I typed 15 in the Real value section using the value tab in the program) OUTD V1610 (Value I want to write to) For testing only, I am executing this code every scan. My output on V1610 equals whatever the encoder reads regardless of what I type in for V1614. Any suggestions?


  • adccommunitymod (AutomationDirect)

    Created Date: November 06,2008

    Created by: milldrone

    LDD v700 (scaled encoder value)

    ADDD V1614 (Offset Value of 15, I typed 15 in the Real value section using the value tab in the program)

    OUTD V1610 (Value I want to write to)

    For testing only, I am executing this code every scan. My output on V1610 equals whatever the encoder reads regardless of what I type in for V1614. Any suggestions?

    If this means you checked the "real " radio button then you just added double 41700000 to v700 and v701. Because "15 " in real = 41700000 in double BCD. so the net effect is that you just added 0000 to V700 and 4170 to V710, with the end result in V1610 and V1611.

    If the values in V700 are in BCD then you need to add BCD to them. The default when the "value " window opens for a Vmem is BCD.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: November 07,2008

    Created by: cmpeters

    Here is what i have also tried. In the Ctrio software Output Settings I setup the Output format to be in BCDx100 (was previously floating point) and just to make it easy I switched to adding an offset of just 1.

    LDD v700 (scaled encoder value set to BCDx100)

    ADDD V1614 (Offset Value of 1, specified in BCD)

    OUTD V1610 (Value I want to write to)

    V1610 still equals V700 even with the same number format.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: November 07,2008

    Created by: milldrone

    cmpeters,

    Hmm! Things to look for

    1. Is there and "end " statement before this rung?

    2. Is this rung in a stage?

    3. Is this rung in a subroutine?

    4. Is there only one instance of V1610 in the program?

    5. Any pointers or indexed addressing used in the program?

    6. Just for giggles LDD V7767 (minutes on the clock)

    ........................ADDD V1614

    ........................OUTD V1610 What do we get?

    Edit: Can you change the value in V1610 via data view?

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: November 19,2008

    Created by: Power Tech

    Need Help With Similar Issue

    We use Watt/Var XDCR's with an output range of 4-20mA DC. The XDCR output is connected to a F4-04ADS isolated analog module. Using DirectSoft4 programing software, where is the scaling factor for watts and vars found in the PLC program?

    Can the scaling factors be seen off line?

    Thx.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: November 19,2008

    Created by: bcarlton

    To: Power Tech

    Get the manual for this analog module from Automation Direct. They have them for free online in PDF format. Read how the module works.

    Scaling for the reading could be anywhere in your program. You will have to consult with the program documentation or, lacking that, with the writer of the program.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: November 06,2008

    Created by: cmpeters

    I am reading in a high speed counter input on address V700 (v700 is the scaled value in inches setup using the Ctrio software). This value reads in perfectly. I need to offset this value by 15 inches using the directsoft software and output it to a variable. My current code looks like:

    LDD v700 (scaled encoder value)

    ADDD V1614 (Offset Value of 15, I typed 15 in the Real value section using the value tab in the program)

    OUTD V1610 (Value I want to write to)

    For testing only, I am executing this code every scan. My output on V1610 equals whatever the encoder reads regardless of what I type in for V1614. Any suggestions?

    Expand Post