• Shawn Tierney commented on lesson Lesson 05: Ladder Logic 4 years ago

    Good morning Jose.

    When it comes to the period numbers ( .# ) those are the individual bits of the DINT they are under.

    So, since the analog value “Local:3:O.Ch0Data” is a double integer (aka DINT,) it will have 32 bits under it, like Local:3:O.Ch0Data.0 through Local:3:O.Ch0Data.31.

    Here's an exercise to see exactly what I mean:
    – Create a new Double Integer named “MyDINT”
    – Now expand this double integer and notice under it you'll find .0 – .31, or the 32 bits that make up the Double Integer
    – Now create a new Integer called “MyINT”
    – Now expand this integer and notice under it you'll find .0 – .15, or the 15 bits that make up the Integer

    As far as what bits would be on or off if you had a number of 3074, we cover how to make this conversion if the prerequisite course, PLC basics, and this is the bit pattern that would result:

    1100 0000 0010
    (2048+1024+2. See PLC Basics for details on converting Decimal to Binary)

    As you can see above, with a decimal value of 3074 you will have bits .1, .10 and .11 on.

    Hope this helps0,

    Shawn Michael Tierney
    Instructor at The Automation School