Jump to content

VisiLogic Ladder running sequence


Recommended Posts

Hello,

I have a question about ladder running sequence (what happens first). To be more specific I posted a picture of ladder program. As you can see i have a MB1685 (direct contact and reset coil). I want to know if my program will be able to LOAD LAST DISPLAY (MB1685 needs to stay ON and SB16 is active), before MB1685 will get  RESET (so OFF).  I wonder what will happen first and if this logic will work (so that it will load my last display). Please if you have an answer reply to me, because I can't test it myself on PLC (I don't have one available).

Thank you!

921858534_Visilogicladder.thumb.PNG.99a7dfb559cdf53cb3e21779ca385975.PNG

Link to comment
Share on other sites

  • MVP 2023

In UnitronicsLand, physical placement does not guarantee scan sequence.  It's what the compiler decides to do, which is not always predictable.

Right-click on the left side of the network and select STL Quick View to look at the compiled code sequence.  You should be able to figure it out and this is how the network logic will solve.

If you're worried about this I would break the logic into more than one network.

 

Joe T.

  • Like 1
Link to comment
Share on other sites

  • MVP 2023

The compiler has broken your logic into five separate statements.  Here are some things to remember when looking at STL lists:

! = Start new logical statement

LB = Local Bit - used as a scratchpad between statements

 

So it translates to this order-

1.  If MB 0 and not MB 258 and Rising Edge SB 16 then set local LB 0.

2.  MB 1685 state = LB 1  (saves a copy for later)

3.  If LB 0 then Reset MB 1685 and Reset TD 366  

4.  If SI 9 NEQ 80 AND LB 0 then store constant 80 into SI 9

5.  If LB 0 and LB 1 then Load Last Display

 

You'll have to determine if this logic satisfies your requirements as is.   You'll see that the LD Last function has EN and ENO connections - ENO just echoes what EN was.  I would put the Reset coil after the block which will automatically make it solve afterward.  It would be interesting to see what your STL list is if you move that instruction.

 

Joe T.

 

 

 

 

 

  • Like 1
Link to comment
Share on other sites

Thank you for explanation. I think my last display will not be loaded with this logic because MB 1685 bill be RESET before  my LD LAST element will be active. Will it help if I put my RESET coil in next net? Because it is important that my LD LAST gets active before MB1685 gets RESET.  Will next ladder logic help? (I need to have a direct contact before LD LAST element).1773335466_Zajetaslika2.thumb.PNG.5f10cebb3838dd42bf40b62d5b150201.PNG

Link to comment
Share on other sites

  • MVP 2023
51 minutes ago, ScottF said:

Where in the help file is the explanation for STL. and what its purpose is, and how it works?

I suspect it's not there because it's not a Unitronics thing, it's a PLC thing. You should be able to find many resources online on what STL (Statement List) is, how to read it and how to program with it.

Link to comment
Share on other sites

Thanks.

(Statement List) is what I was after.    Hint to Unitronics help file writers.  Please spell out your 3 letter acronyms.

Google     "   STL  View    "  and the top results are for  3d cad viewers...

The issue is not that I am new to PLCs, rather that I am old to PLCs.      TI 530, and a plug in programing keypad.  Later we had a very expensive portable programmer with 160k floppy, and approx. 6" CRT.

Link to comment
Share on other sites

  • MVP 2023

I did a little digging online on the STL language and it seems to be unique for each PLC.

The Visilogic STL language is not in the Help file.  You can't edit it, so it really doesn't matter.  

@ScottF -  I am old to PLCs as well -🙂 AB T40 and Modicon P190 terminals as well as the GE Series 1 handheld.

There's a lot of information in the Visilogic Help but STL is not one of the topics.  I seriously doubt if it ever will be, as the Vision series is a mature product line and they're focusing their efforts on the UniStream series.  Their Help writing department is very small.

It is what it is. 

Joe T.    

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...