Ladder Logic DIN, sluggish/no response

Get help and insight.
Post Reply
clearwaterbrewer
Posts: 383
Joined: Wed Feb 09, 2011 3:43 pm
Bot?: No
Location: Clearwater, FL
Contact:

Ladder Logic DIN, sluggish/no response

Post by clearwaterbrewer »

I have momentary button on a digital input in a contactor sealing circuit on rungs 2-3 of the following ladder logic diagram (now working in 3.4.3, thank you!), but the Din0 and Din1 take a full 2 seconds to be recognized... I tried one-shot on and off, no difference.. is there a scanning rate of the ladder logic? If I press a button, I really need it to recognize it very quickly...

-mike

Din0 - OFF.png
Din0 - OFF.png (10.63 KiB) Viewed 5798 times
User avatar
ECC
Posts: 676
Joined: Fri Sep 12, 2008 12:29 pm
Bot?: No
Contact:

Re: 2-sec delay for recognizing Digital Input?

Post by ECC »

Scan time is 100ms. The 2sec delay that you are seeing is just the refresh rate of the display on your browser. When you hook it up to something real you will see it happen instantly.
JonW
Site Admin
Posts: 1726
Joined: Sun Jul 18, 2010 7:51 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: 2-sec delay for recognizing Digital Input?

Post by JonW »

I'm using a Din to cancel the hardware alarm. While it is not a full 2 seconds, I do have to push and hold it to cancel the alarm versus just being able to momentarily push it.
User avatar
ECC
Posts: 676
Joined: Fri Sep 12, 2008 12:29 pm
Bot?: No
Contact:

Re: 2-sec delay for recognizing Digital Input?

Post by ECC »

We debounce the inputs for 160ms... maybe that's a little excessive, could probably halve that so at least it fits within a scan.
clearwaterbrewer
Posts: 383
Joined: Wed Feb 09, 2011 3:43 pm
Bot?: No
Location: Clearwater, FL
Contact:

Re: 2-sec delay for recognizing Digital Input?

Post by clearwaterbrewer »

here is a youtube video showing 2 seconds http://www.youtube.com/watch?v=44YvttEtXDc
JonW
Site Admin
Posts: 1726
Joined: Sun Jul 18, 2010 7:51 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: 2-sec delay for recognizing Digital Input?

Post by JonW »

I brewed again today and made extensive use of the alarm output for hop additions, process changes, etc. I had to press and hold the button I put on a DIN to cancel the alarm for a good two seconds every time. It seemed like it occasionally even took longer. I know this isn't exactly a bug, but it is pretty annoying.
clearwaterbrewer
Posts: 383
Joined: Wed Feb 09, 2011 3:43 pm
Bot?: No
Location: Clearwater, FL
Contact:

Re: 2-sec delay for recognizing Digital Input?

Post by clearwaterbrewer »

I will probably wire up a 555 timer as a one-shot for the inputs that need it... unless we hear a faster scan rate is in the works... hint, hint ;-)
User avatar
ECC
Posts: 676
Joined: Fri Sep 12, 2008 12:29 pm
Bot?: No
Contact:

Re: 2-sec delay for recognizing Digital Input?

Post by ECC »

This turned out to be a bug in the ladder logic. Its actually a nasty little bug, the DIN contacts incorrectly used a variable that was only updated when the interface requested a refresh. So if a browser wasn't connected, the DIN contact wouldn't close.

Thanks for finding this. I think the ladder logic feature is finally getting some real-world testing.

Fixed in v3.4.4
clearwaterbrewer
Posts: 383
Joined: Wed Feb 09, 2011 3:43 pm
Bot?: No
Location: Clearwater, FL
Contact:

Re: 2-sec delay for recognizing Digital Input?

Post by clearwaterbrewer »

Works great! Thanks!
User avatar
ECC
Posts: 676
Joined: Fri Sep 12, 2008 12:29 pm
Bot?: No
Contact:

Re: Ladder Logic DIN, sluggish/no response

Post by ECC »

I updated the topic title to be a little more descriptive in case others are searching for a solution to this problem.
Post Reply