Ladder Logic 105 Scanning Solution

What is the state of Output 2?
What is the state of Output 2?

Last week I posted a fairly straightforward question at the end of my post on PLC Scanning. I then shared the post on Linked In as well as on my company’s Facebook page.

One reason I share these posts on other forums such as this is that I really don’t spend time engaging readers as I probably should; most blogs collect readers and send e-mails announcing when a new post is published or otherwise actively engage people on their list. My list comes either from people who download Mastering the Machine or otherwise put their name in the “Subscribe” field. I guess I am too lazy to follow up with that sort of thing, plus I am not really actively marketing anything. Anyway, I got lots of responses. Mission accomplished!

The best answers explained the result pretty simply; the first rung’s memory flag is on, therefore it is also on in the second rung. The second rung’s Output 1 flag energizes Output 2’s flag, placing it into the ON state also. The third rung unconditionally turn’s off Output 1’s flag, but this has no effect on Output 2. Therefore Output 2 is always ON at the end of the scan.

Other answers went into more depth, mentioning the RPI of the ControlLogix platform, the way the old Modicon scan cycle used to work, or Siemen’s order of operations. The only comment that would have an effect on the result was the Modicon comment; I e-mailed the guy that posted it and he sort of explained the scan process, but I have no first hand experience with the old 084 and 184 processors so I have no way to easily explain it myself. I doubt any of them are actively used in manufacturing though, so for the purpose of this post the answer remains the same.

By the way, Output 1 WILL occasionally flicker on the ControlLogix platform with a 20ms RPI, but only visibly on the CompactLogix built-in CPU based I/O. I know this from practical experience and experimentation; I am fortunate in that I usually have L6x’s, L7x’s and L23E’s to play around with when doing training. But Output 2 does not flicker.

Final results from all sources; 17 always ON, 13 always OFF and 3 “Flickers”. So most people actually got it right.

There were also about 12 comments that didn’t answer, but posted some other comment saying that it varied from platform to platform, there was no way to answer the question, or I couldn’t tell what they were trying to say at all. Until someone shows me a current PLC that acts differently I stand by my answer that that Output 2 is Always On.

There were also 85 “likes”. I appreciate those too, it means some folks though it was a valid point of discussion even if they didn’t answer.

Sometime I get comments that simply point to their website in an attempt to gain readers. If the comment points to a non-automation-related site or is simply spam you won’t see it, my filters (Akismet) do a pretty good job of getting rid of most of them. I one case I let the comment through, because the answer was correct and the site was automation related, but I have seen the poster put links on a lot of other sites also and honestly, it looks a little desperate (sorry :-))

Anyway, I appreciate all of the comments, and learned a lot myself on the social experiment side!


Electrical Engineer and business owner from the Nashville, Tennessee area. I also play music, Chess and Go.

2 Comments on “Ladder Logic 105 Scanning Solution

    • Hi Mohan, you didn’t leave much to go on, but I am going to assume your platform is Siemens.
      If you mean how do you set up the array in the first place, when you select “Complex Data Type – Array”, you will specify the range first by typing in Array(1..50) as an example. After hitting Enter a few times, another row will appear with one entry field in it, where you type or select INT. If you are asking how to actually save the values into your program, you will have to copy the Online data block to the Offline file. If so, from Simatic Manager, with your offline file open, press the icon on the toolbar that opens the online view. Select the Data Block you wish to copy, right click and copy, select the Offline program and paste it over your existing data block. Off course you will have to ensure the data you want is in there. Hope this helps! *The more info you provide, platform, etc. the easier it is to answer 🙂