Ladder logic not working as expected

Describe your system and processes, and post your config file.
Post Reply
User avatar
bbrally
Posts: 198
Joined: Sat Mar 27, 2010 3:59 am
Bot?: No
Location: Vancouver, BC or NST, Thailand
Contact:

Ladder logic not working as expected

Post by bbrally » Mon Sep 03, 2018 8:29 am

I want to stop all processes and start process 0 is an output is asserted.

I've used the following ladder logic, but when output 0 is not asserted it forces a stop to process 0 and a start to all others.

I thought that with no output asserted, nothing would be done.

How can I accomplish what I want?


ladder logic.jpg
ladder logic.jpg (80.92 KiB) Viewed 72 times
Move, copy, clear processes/states: http://manipulator.from-ca.com/
Perform coefficient mods: http://calculator.from-ca.com/
HMI Builder: http://bbrally.altervista.org/GUI/index.html
HMI Builder latest ver: http://bbrally.altervista.org/guibeta/index.html

User avatar
JonW
Site Admin
Posts: 1606
Joined: Sun Jul 18, 2010 7:51 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: Ladder logic not working as expected

Post by JonW » Mon Sep 03, 2018 10:58 am

With ladder logic, controlling outputs or processes also works in the inverse of what is defined. e.g. if you're forcing the proc on when the output is on, then they are also forced off when output is off.

I find process triggers like this are better handled in a state change trigger where you can spawn or kill a process.

User avatar
oakbarn
Posts: 777
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

Re: Ladder logic not working as expected

Post by oakbarn » Tue Sep 04, 2018 9:19 am

Processes in the Coil Slot are sort of Convoluted in Ladder Logic. I do use a Process in the Coil Slot to insure that it cannot be turned off. It it is, it is immediately started again.

As Jon says, you can assert or kill a Process in the State Pane of the Process Editor, but that only happens On Exit of a State.

You can control a Process with an "Output" in Ladder Logic, but that becomes the only way to Turn it "On" or "Off"

Since a Process always turns on in State 0, you would need to "burn" :o that State and exit after 1 second to State 1. You could then Kill all of the other Processes when exiting State 0.
ll3.png
ll3.png (23.94 KiB) Viewed 59 times

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests