Skip to content

OPEN CIRCUIT, SHORT CIRCUIT

LDmicroGitHub edited this page May 10, 2018 · 5 revisions

This page caused by LDmicro Forum - Effect of open circuit element on compiled code

  • How does the 'OPEN CIRCUIT' element in a ladder diagram is compiled to the hex code?
    The 'OPEN CIRCUIT' element differs from the break-out of the current flow circuit in a real scheme.
    The output condition of an 'OPEN CIRCUIT' is always false. It affects the input of the next element in the rung.
    The calculation sequence is not braked(not interrupted), it continues with a 'false' input state for the following elements of the rung.

  • Is the code for the rung containing the 'OPEN CIRCUIT' is included or excluded in the final hex file?
    The code for the rung containing the 'OPEN CIRCUIT' is included in the final hex file fully.

  • I can see the possibility if the 'OPEN CIRCUIT' element is within a compound ladder rung but what happens when the entire rung is effectively disabled by the open circuit element?
    Instructions are compiled (and then executed in the microcontroller) following the ladder diagram, from left to right and from top to bottom.

  • Note 1.a: The normal 'COIL' element transfers the input state to the output pin of the MCU without fail.
    This example demonstrates a non-obvious switching of the signal level at the output pin Y1.
    default
    OPEN_CIRCUIT.ZIP

  • Note 1.b: Similarly Y1 switching take place when the MASTER CONTROL RELAY element used.
    default

  • Note 1.c: Avoid Y1 switching with the GOTO element.
    Instructions are compiled and placed in hex code but will be skipped by GOTO.
    default

  • Note 1.d: Use Classic PLC scan cycle style with LDmicro:

    1. Transfer inputs to internal relays.
    1. SOLVE LADDER (Any number of operations with the internel relays).
    1. Transfer internal relays to outputs.
      See PLC and safety
  • Note 2: Please add more examples.

  • 'SHORT CIRCUIT' element does not change the hex code of the rung. It needs only for cover(wrap over) the 'OPEN CIRCUIT' element.

Any questions welcome to the forum or LDmicroGitHub@gmail.com

Clone this wiki locally