plcladder-logic

PLC "program counter" concept


I am new at ladder/grafcet programming for PLC's.

I have a Windows application of my own that will write on a OMRON PLC memory (D register). The idea is to fill blocks of memory that will trigger some output (ladder programming).

So imagine for example a memory block of 5 words (D0000 to D0004). The outputs will be trigger by the contents of this 5 words.

My idea is to have one simple ladder program to "run" block of memory. So each 5 memory blocks will contain "instructions" to activate my outputs.

I tough : maybe I can implement like a "program counter" concept where the program counter points to the first 5 words and co+y/move its content to a general location on memory that will trigger the contracts of the ladder program. Then after the execution of the first 5 words the program counter will point to the next 5 words block to copy it content again and the ladder program execute its "instructions" and keep this for undefined number of 5 words block.

I am not sure if I was able to clarify my idea. There is a way to implement this using PLC ladder logic ?

Or there is any other ways to implement such thing ?

Keep in mind the idea is to have blocks of memory (composed by a fixed number of words) and each memory block will have on its bit the necessary configuration to trigger the necessary outputs (using the same ladder diagram/program).

Any help or better ideas will much appreciated. Thank you very much

This is to use with a OMRON C2JM PLC.


Solution

  • You're thinking too hard about this. A PLC is a state machine, not a procedural processor. Just route the bits directly to the outputs they need to control.

    For example, bit 0 of D1234 should control CIO output 1.00 then

     D1234.00                     1.00
    ----| |------------------------()
    

    and if D1234 bit 12 should control CIO 2.15

     D1234.12                     2.15
    ----| |------------------------()
    

    etc.