Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/20/2021 in all areas

  1. Every time you see a "!" in STL the compiler is starting it's own logical statement. It's kind of like assembly language and it takes liberties and re-arranges your rung. It can only make one decision at a time and writes results to the temporary memory. For example, look at the first few lines- ! MB 6 / MB 38 = LB 0 Translation- Look at MB 6 OR MB 38 and store the temporary result in LB 0. ! TD 4 = LB 1 Store TD 4 in LB 1. You can see here that it's looking at TD 4 before it's even called !N MB 35 & LB 0 = TD 4 Look at NOT MB 35 AND my LB 0; if true run TD 4 And so on. The more lines you have in STL View with "LB" in them, the more the compiler is performing somersaults to get your code to work. It's mission is to get it all in. Other brands of PLCs force you to finish a rung and number each one. Unitronics does not have that limitation but it can get you in trouble. When you create a new network, the slate is wiped clean and the result much more resembles what you were thinking. Compare the STL views after you break it up an you'll see what I mean. Joe T.
    1 point
  2. The only reason I caught it so fast it that I've done it myself a few times. Only other advice most of the forum guru's would give is to break up the three lines in rung 1 into individual nets. I'm sure it works fine as coded but in some cases line stacking in a single rung (net) can give unexpected results. Something to do with the compiler, not sure... I'm loosely re quoting others. Glad you got it working to your satisfaction.
    1 point
×
×
  • Create New...