Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - insert branch in the middle of rung

(you are viewing a thread; or go back to list of threads)

insert branch in the middle of rung (by Plamen)
Good day All
I have reached a point that I need to insert a branch with contact to supply additional coil. This contact must after the first one, bridge the rest and supply the second coil.
Yes, it can be done if I started with this one but now I have so many placed that is too difficult to start from the beginning.
Please, if anyone knows how to do this...(:-)
Fri Oct 19 2018, 16:39:23, download attachment Untitled.png
(no subject) (by Tommy)
I don't think you can, have to delete and recreate.
Mon Oct 29 2018, 15:15:13
(DO NOT) insert branch in the middle of rung (1) (by DanielH)
Hi, Plamen.

I suggest you to DO NOT insert a branch as you ask for.
Inserting a branch sometime increases program memory usage; it depends on how the compiler interacts with the ladder code.
Often, branching ONLY the OUTPUTS of a logic (adding more coils or logic/math/move ops) doesn't increase program memory usage.

In your program, it's preferable to add a new rung after the first (0001) and program a new serial on it, repeating the first contact and adding the new contact(s) and coil.

As example, I will send two programs, branch.ld and no_branch.ld, both for the same task, the first attached to this message and the second later.

If you compile both programs, you can see:
no_branch.hex is slighty short than branch.hex.
no_branch.hex: 133 words program, 20 byte RAM; 817 bytes
branch.hex: 137 words program, 20 byte RAM; 846 bytes.

Best regards,
DanielH
Tue Oct 30 2018, 16:26:05, download attachment branch.ld
(DO NOT) insert branch in the middle of rung (2) (by DanielH)
no_branch.ld
Tue Oct 30 2018, 16:27:09, download attachment no_branch.ld
(no subject) (by Ziggy)
Interesting observation Daniel.

Thank You
Tue Oct 30 2018, 19:16:19
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):