Connect with us

PLC programming languages

Discussion in 'Electronic Design' started by Frank Buss, Sep 28, 2008.

Scroll to continue with content
  1. Frank Buss

    Frank Buss Guest

    I've posted this to a german newsgroup, but not much response so far. Maybe
    people using PLC's don't read newsgroups at weekend or not at all :)

    Maybe next year, when I have less client projects, I want to build a small
    microprocessor system for simple DAQ tasks, but it should work standalone,
    too. Using the PLC standard IEC 61131-3 for the programming language
    environment looks like a good idea. I've found a summary in this document:

    My idea is, that even hobby programmers can use this system. The hardware
    should be extendable with terminal blocks, like this one: Photos/1711039.jpg

    for I2C, SPI, digital IO and analog IO. For DAQ, transfering PLC programs
    and debugging it should use USB.

    The most work would be to create the PC side software for a useful
    development system. Do you think that IEC 61131-3 standard is a good
    starting point for it? The software could compile all 5 defined languages
    to byte code, which is then interpreted on the device, and it could even be
    extended with other languages, like Basic, for the casual programmer. Time
    critical parts could be written in assembler.

    I expect at least a year development time. Maybe it could be started as a
    open source community project on
  2. Jamie

    Jamie Guest

    you're a little behind.. Things like this already exist how ever, if you
    think you can do better then do so.

    I would how ever, brush up on the format use of the PLC ladder that
    you have posted in the link you provided. Some parts are not user
    friendly much like the OR/AND logic for example.
    Most PLC's at the start of a scan, will take a snap shot of all
    inputs ,outputs and at the end of the scan will then write back all of
    this to
    the output area's.

    So, putting that in context.

    | |

    The above could be treated as a OR sequence.

    And that as a AND sequence of control.

    Now if you want to perform MATH functions, you then
    would have a CMD that actually has the "OR" / "AND"
    statements on memory etc..
    For others that are interested in the subject matter.
    here is a short but simple pictation of a PLC.

  3. Frank Buss

    Frank Buss Guest

    Thanks for the hint, looks like there are already some interesting open
    source projects, like this one:

    But other projects and websites are dead, like or
    I didn't use it so far, but doesn't look complicated or not user friendly,
    at least not for simple controlling tasks. Where do you think is the
    This sounds like a good idea, something like in LabView. Meanwhile I've
    bought the standard document and looks like you can define your own
    function blocks, with typed input and outputs, which can be combined like
    the predefined boolean types. This concept sounds very powerful:
    Mathematical calculations, or e.g. a filter, can be implemented in ST,
    which then are the building blocks of a schematic like diagram in LD.
    Thanks, nice example.
  4. Jamie

    Jamie Guest

    each vender of PLC's like to come up with their own little
    variety of complexities.
    For example in the Keyences families. the advanced logic may look like

    |--------[LDA #100]--[STA TM100]------|

    and in Alan Bradleys like this.

    using a whole block box with full descriptions of the operations.

    |------ MOVE -----+
    | Source xxxxx |
    | DEST xxxxx |

    The operand values could be memory,timers, ADC, DAC or immediate
    values etc////

    Addressing inputs/outputs are also different among venders///

    some use actual numbers that would look like PORT numbers..
    0500, 501, 502 etc... for outputs and 0,1,2,3, etc.. for inputs..

    they normally designate a max range for input numbers and the values
    above that are for outputs..

    You can find this in units like Keyence..

    In Alan Bradley's they're using I = input, O = output for external
    references and normally specify a unit point..
    for example
    I0:2 means an input on module 0 which is the CPU in this case of
    #2 point.
    O1:0 is OUT on module 1 at point 0.
    normally each module device has no more than 16 points of reference
    on it.

    So you can now see how things can get a little mixed up in the PLC
    world when you're trying to support all..

    We deal with DirectLogic, Keyence, Omron, Siemans, Alan Bradley of
    various generations along with On panel view systems using things like
    Wonder Ware etc... So touch base with others at times.

    We also deal with micro controller chips etc..

    It's gets tough on some days."
  5. Frank Buss

    Frank Buss Guest

    This doesn't look very useful, because I think in diagrams it is not useful
    to use IL code without blocks.
    This looks better.
    But I hope you can define some names for it? Would be much better to use
    shutdownReactor=1 instead of guessing that O1:42 is the right port, but it
    was assigned to a motor for adding the next fuel rod.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day