PLC Binary Counter

Discussion in 'Programmer's Corner' started by Greg Paterson, Sep 8, 2014.

  1. Greg Paterson

    Thread Starter New Member

    Sep 8, 2014
    1
    1
    As I'm new to PLC's and their awful outdated ladder logic, I challenged myself to devise a binary counter using ladder logic. The counter automatically increments at each DS1 time interval, which I set at 500 ms.

    The counter works by flip flopping internal variable C3 which triggers the output light Y201. Timers T1 & T2 take turns turning C3 on and off. The remainder of the triggers are based on the negative differential contacts of the bit less significant. Since when the bit before turns off, the next bit must turn on.

    I also solved this problem the following day by using a counter, and math functions to convert the integer of the counter into binary variables for output. If you give a damn, just ask and I'll post it.


    Flip Flop Counter Ladder Logic_001.png Flip Flop Counter Ladder Logic_002.png
     
    risky fajar likes this.
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,509
    2,369
    They may seem outdated as to the mode of programming, but they remain relevant still today due to their ability to display pictorially in electrical schematic format, this is an aid when used on a factory shop floor by maintenance personnel, in fact this was the reason behind GM's request for someone to design a PLC system in the first place and replace relay logic control.
    Most of the main PLC manuf. have documentation with typical examples to work from, as well as some of the 3rd party publications out there.
    Max.
     
  3. faley

    Member

    Aug 30, 2014
    94
    13
    What's the point? If you don't like ladder logic go to mnemonics. Ladder logic is easy. It's as simple as reading any ladder diagram. I've worked with PLC diagrams since the mid '70's and, frankly, found them easier than ladder logic for relay circuits. Basically, in the industrial world most wiring diagrams are of the ladder type. They remain because they work. The only thing you really need to remember when dealing with a PLC ladder is scan time and operation sequence. Also, bear in mind that each PLC manufacturer has it's own standards and protocols for devices. Allen-Bradley, for example, has some real oddities compared to others but, for better or worse, they took over the US market in the early '80's. These days Mitsubishi is giving them a run for their money though. Hang in there.
     
Loading...