ST v Ladder

norman oliver

Lifetime Supporting Member
Join Date
Oct 2013
Location
sutton coldfield
Posts
33
Hi, I have a program running which is, occasionally, giving me problems. Although I'm a ladder stalwart I've used ST and SFC in its construction due to the nature of the software ( Eurotherm PAC 9 with Eycon HMI & T2750 PLC ).
I have a 20 step SFC auto sequence and also a manual page/screen in which each individual device (e.g. door open/close, ram up/down, pump on/off) can be button operated for set-up or maintenance. Running the sequence requires these devices on the manual page to be off, i.e. Door_open:=0 for instance.
Could these manual instructions interfere with the running sequence, i.e. Door_open:=1 ?
If I had used ladder I would have a n/o contact in a auto/manual rung to isolate manual operation. How, using ST do I negate any instruction on the manual screen?
Your help would be greatly appreciated as I am quite new to using alternatives to ladder.
 
Could these manual instructions interfere with the running sequence

Hi Norman,

A poorly wrote program is a poorly wrote program no matter if its SFC or LAD so I would think the answer is YES, SFC is one I am waiting to learn once I retire :) but this maybe your time...

I would also think there has to be a way to write a NO in in SFC
 
Why you don't map io to seperate memory first?
You could then invert IO on ladder or ST beforehand.

Isn't here simpile NOT(myVariable ) command available?
 
I think if elseif is your tool here most likely without seeing the sequence.

If condition 1 and condition 2 then
This := true;
Elsif condition 1 and not condition 2 then
This := false;
Else
This := false;
Endif
 
Last edited:
Well, the simple answer is

Motor := Start & Interlock OR Motor & NOT Manual;

pretty simple however, ST is not really designed for bool (ladder is far simpler as you can see what is happening visually).
I hate IF then Statements they are long winded, can get confusing, use more code for example normally in compiled code the IF Else etc. use conditional jumps often to subroutines in some PLC's
 
I think if elseif is your tool here most likely without seeing the sequence.

If condition 1 and condition 2 then
This := true;
Elsif condition 1 and not condition 2 then
This := false;
Else
This := false;
Endif
Probably I would write with less lines

This := false;
If condition 1 and condition 2 then
This := true;
endif
 
Thank you all for responding - I will try your various suggestions. Meanwhile can you tell me the difference in using :=1 or :=TRUE and := 0 or := False and when is it appropriate to use either one or the other?
 
Hi All , I have used this to close the bottom door ST:"[OpenTD.OP]:= 0;" and :=1;" to open. They are two buttons on a "manual" screen and they work fine! The question is will ST:"[OpenTD.OP]:= 0;" interfere with a sequence that includes ST:"[OpenTD.OP]:= 1;" will the plc be confused?
 
Thank you all for responding - I will try your various suggestions. Meanwhile can you tell me the difference in using :=1 or :=TRUE and := 0 or := False and when is it appropriate to use either one or the other?


Logical False / true is bit command and (used only for bits) and 0/1 is numerical which should used to word, ints and etc.

Both probably work for bit, but they are different datatypes and maybe can give compile error
 
Hi All , I have used this to close the bottom door ST:"[OpenTD.OP]:= 0;" and :=1;" to open. They are two buttons on a "manual" screen and they work fine! The question is will ST:"[OpenTD.OP]:= 0;" interfere with a sequence that includes ST:"[OpenTD.OP]:= 1;" will the plc be confused?
I don't think that [tag_name]:=0; is valid syntax.

But if you are asking if you can have an assignment of a value to a tag in one statement and also have an assignment of a different value to that same tag in a later statement, then no, that will not "confuse" the PLC, because the PLC will do exactly what it is told: it will assign the first value to the tag when the first statement is evaluated, and that tag will maintain that first value until the second statement, after which that tag will have that second value.

The question is, is that what you want to happen, or are you confused about what the PLC will do with those two statements?

The point I am making is that PLC programming is primarily about time: so when each of two separate statements is evaluated is more important than what those two statements do.
 
Hi All , I have used this to close the bottom door ST:"[OpenTD.OP]:= 0;" and :=1;" to open. They are two buttons on a "manual" screen and they work fine! The question is will ST:"[OpenTD.OP]:= 0;" interfere with a sequence that includes ST:"[OpenTD.OP]:= 1;" will the plc be confused?
Depends where in the scan order each falls.

There's about 100 ways to handle this aspect of the program, best practice in my estimation is to make sure subroutines writing to the same tag/output/whatever are not called at the same time, or the result will be defined by which one is processed last.
 

Similar Topics

Hello, I´m having a problem trying to program in Ladder. An output should be trigged by two possible contacts. Take a look on the printscreen...
Replies
3
Views
27
I got my PanelView Plus 7 working with a Micrologix 1500. How would I connect my laptop to the PanelView to view the ladder logic while operating...
Replies
6
Views
168
please help me . I have to make this ladder diagram and I can’t figure it out :(
Replies
12
Views
363
Hello, I am trying to replicate a piece of logic on the PLC5 onto an SEL RTAC. I am using ladder on SEL and FBD. I am having issue on the ladder...
Replies
13
Views
246
Hi all. Is this the simplest way to debounce inputs in Ladder (there are 2 points being debounced here)? The TOF drives the tag. I'm expecting...
Replies
15
Views
503
Back
Top Bottom