Announcement

Collapse
No announcement yet.

DL06 LD does not allow v locations to OUT

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


  • DL06 LD does not allow v locations to OUT

    I am new at this, but the instructions and examples for the LD function usually show it to be followed by an OUT to a v location. But it won't let me use OUT except for X, Y and C.

    I want to get the RTD coming in as a double on v3000 (& v3001) into my PID Current Value (v2003). I converted v3000 to a real using BCDTOR and then used RtoBCD and I get a value into v2003, but if the temp read in the real is 81.3, v2003's value is 2066. I must be missing something.

    John


  • #2
    There are two OUT instructions. One is a coil, which is what you have selected. Coils only allow output to bits.

    The other out is a box instruction which allows outputs to V-memory addresses.

    Press the "/" key to toggle between the coil and box type instruction.


    If it is coming in as BCD, all you need to do is to do the following: (assuming it will never be a negative value)

    STR SP1
    LD V3000
    BIN
    OUT V2003
    Last edited by Do-more PE; 05-27-2012, 09:10 PM.
    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
      <rant>

      I can't help but wonder why you gotta switch the function of OUT with "/". I understand there are two instructions but this seems like a senseless fight that every new programmer has gone through.

      Indeed, I myself have forgotten this requirement before and had to angrily search the manual and this forum to figure out how to make it work (again).

      From a product design/user functionality standpoint, eventually the designer/developer must admit that something's wrong and make an adjustment. Arguably Apple is the richest company on earth for precisely this reason.

      </rant>
      Last edited by lasernerd; 05-29-2012, 07:47 AM. Reason: Characters

      Comment



      • #4
        I had no idea you could use the '/' to switch between them. I've always just grabbed the word OUT from F7 and the bit OUT from 'O'. Pretty handy

        You're right though lasernerd, it's very confusing if you're just starting with this line. It should probably just pick the correct one for you based on output type.

        Comment



        • #5
          Thanks!

          Finding the right OUT and the right LD got that part working, so thanks again.

          I did not understand your first line "STR SP1". Is that needed?

          When I used the non-iBox LD in setting up the PID loop, it allowed the PID parameters to be filled using the c701, etc. since it would not save using non-iBox OUT to v701. Is this a problem? The PID seems to work.

          Comment



          • #6
            Originally posted by JDemsey View Post
            I did not understand your first line "STR SP1". Is that needed?
            "SP1" is a system contact that is always on. Using SP1 will do the LD, BIN, OUT every PLC scan to keep your V2003 info up to date.

            Another time frequency could be used if you wish.
            Bob

            Comment



            • #7
              Written out it should make more sense.
              If I recall correctly you need a store command before the LD.. The software will not let you have a LD by itself on the rung.

              ---------l sp1 l------------------[ LD V3000 ]

              Comment



              • #8
                Originally posted by Gvanauken View Post
                Written out it should make more sense.
                If I recall correctly you need a store command before the LD.. The software will not let you have a LD by itself on the rung.

                ---------l sp1 l------------------[ LD V3000 ]
                Sure it will...but you will loose it at every scan if you don't put it somewhere. You're just loading V3000 into the accumulator. It will get overwritten on the next ld instruction.

                Use an Out command to get it out of the accumulator and into memory somewhere.

                Code:
                ----|sp1|--------------|--[ LD V3000 ]
                                       |--[ OUT V3001 ]

                Comment



                • #9
                  I was refering to his question "I do not understand your first line STR SP1. Is that needed"
                  The BIN conversion and the Out v2003 were already covered by ADC App.

                  Comment



                  • #10
                    Regarding the use of SP1 (basically an 'always on' contact) in a rung which otherwise would have no contacts because the output instructions are intended to run all the time:

                    The interpretation of a logic rung uses a 'logic stack' and a 'logic accumulator'. The DL CPU manuals cover this just before the instructions are covered. The 'logic accumulator' keeps track of the current TRUE or FALSE state of the logic as the rung is being evaluated. The 'logic stack' keeps track of logic states which must be remembered because it will be used at the end of an AND or OR branch.

                    When a rung in Allen-Bradley begins to execute there is an SOR (Start of Rung) instruction. (You don't usually see this unless you look at the full rung mnemonics.) This instruction sets a logical TRUE into the 'logic accumulator' before even the first branch or contact is encountered. Thus the evaluation of a rung starts from a known condition.

                    A rung in DL DOES NOT HAVE such an instruction. The first contact (if there is one) may be a STR (or STR NOT) xxx. This pushes the current contents of the 'logic accumulator' on to the 'logic stack' then places the result of this instruction into the 'logic accumulator' totally replacing whatever (TRUE or FALSE) may have already been there. If it were possible to have no contact or conditioning instruction on the rung then the output instructions at the end of the rung get whatever logical state existed previously.

                    Now, you ask yourself, what would the logical state of the 'logic accumulator' be at the start of such a rung? It is the TRUE or FALSE state which existed AT THE END OF THE PREVIOUS RUNG! Can you see the chaos which would exist if such rungs were allowed to be constructed?

                    (Note that the program itself, a Stage or a Subroutine begins execution with a logical TRUE in the 'logic accumulator' thus they are the exception and the first rung is allowed to have no conditioning instructions. And there are other instructions, like END, which will always execute and thus have no contacts allowed.)

                    Thus Directsoft prevents a confusing 'rung without a conditioning contact' by - on acceptance - merging the output code with the end of the previous rung - demonstrating exactly the logical relationship which exists.
                    Last edited by bcarlton; 06-25-2012, 07:07 AM.
                    thePLCguy

                    Bernie

                    Comment



                    • #11
                      I must clarify concerning my previous post. I did not design nor do I have secret inside information on the execution of rungs in these systems. It's just my deduction after a long time working with microprocessors and studying ladder execution. To really blow your mind try to truly understand the Modicon network/rung execution.
                      thePLCguy

                      Bernie

                      Comment



                      • #12
                        Originally posted by bcarlton View Post
                        To really blow your mind try to truly understand the Modicon network/rung execution.
                        This man speaks the truth!
                        -Lee

                        “Felix, qui potuit rerum cognoscere causas” - Happiness is understanding how things work.

                        Comment

                        Working...
                        X