STL that I just can't get...

geniusintraining

Lifetime Supporting Member + Moderator
Join Date
Jun 2005
Location
SC
Posts
8,274
Hello all,

I just don’t get it…

I am having issues with this, I have found the problem but…I still need to learn what is happening

I 21.2 is the upper level detector
I 21.3 is the lower level detector
Q 7.2 is the request to the other PLC to enable the pump
I think F 1.5 is control voltage
F 40.4….I have no idea… e-stop maybe? but whatever
What its doing is controlling the level of a tank, I lost the lower level detector it over flowed onto the ground (300-400 gals)

I don’t want that to happen again (the fix is easy, I will add another Hi/Hi level indicator and that will stop this from happening), but this logic is working and works good for level control …but I still need to learn the logic

I understand that it changes state of Q 7.2 and toggles the output by changing state, set and resets the output, but…if 21.2 is NC and it’s the upper level, then its will be high when fluid is not present and 21.3 will be high when fluid is present…that’s *** backwards? Am I missing something? From what I can tell all is wired NO in the real world, are the German descriptors wrong?

S5.jpg
 
I 21.2 is the upper level detector
I 21.3 is the lower level detector

Is that how it is wired, or is that how you translated it? Because according to the comments, it is the other way around (oben = upper, unten = lower).
 
Thanks for the reply S7...

That was my mistake, but that still does not make sense to me

AN lower
A upper
= output???

That’s wrong right??

edit: Q 7.2 (high) is my run permissive I am sure of that
 
Last edited:
Are you absolutely sure that I21.2 isn't a "1" when the tank is empty? Knowing that the descriptor is a low level indicator, maybe the original programmer and installer installed it such that it was a positive indication of a low level condition. If so, the code makes sense.
 
Translated your comments using babel fish (very iffy at times) and split the STL into three sections:

res_stl.JPG



The sensores were opposite of what you said, I thought so as high level is normally failsafe and ON when BELOW the level.

These translates into three easy networks:

res_lad.JPG



As a personal thing I never SET/RESET real world I/O, just think its bad programming (personal thing as I said). Also I would never have the low level probe in the logic for completion (RESET), the high level must be the control feature, for reasons that you have learn't.

Hope it helps in understanding, a little advice with STL, if your trying to convert to ladder to to read easier, break it down as above, into the sections where you would normally see a new rung, i.e. coils.

Not always possible where maths and comparisons are used, but still these should be able to be broken inti easier to chew lumps.



EDIT:

The condition where the low level is OFF and High level is OFF should be an ALARM condition which would stop the process.


BTW, when using babel fish, it translated vw into voltswagon....;)
 
Last edited:
As for the flag 'F40.4', the shortcut 'VW'
could be 'Vorwahl' == preselection, ( maybe set by
an operatorpanel)so probably it means
'Preselection solvent --> resin kitchen'.

Furthermore look at flag 'F23.7'. The text tranlation
for 'Stoerung: Niveau Loesungsmitteltank' is:
'Fault: level solvent tank'. This should be the 'ALARM'-condition
and maybe there is something wrong in the program?

regards
Rolf
 
As a personal thing I never SET/RESET real world I/O, just think its bad programming (personal thing as I said).

Ok, what's your way? How would you write the above ladder?
 
Gromit said:
As a personal thing I never SET/RESET real world I/O, just think its bad programming (personal thing as I said).

Ok, what's your way? How would you write the above ladder?


A translation without latching outputs with a SET/RESET

res_alt.JPG



This is without the high level in the reset line, which I believe is an error.

OK the retainer is still a latch in a way, but controlling outputs this way makes it clearer what is happening and what is holding the coil in. As shown by myself and Simons example, in Siemens at least, the latch and unlatch can be on the same or in seperate networks. The unlatch can even be in a different block (I have seen this).

A simple error can leave an output latched ON.

I know this can happen in programming, but as a personal thing, I prefer the above type of logic, neat in one line and definately in the same block. :D


EDIT:

Its just a translation of the above, normally I would not set an output mid network either. Also as M 23.7 is a fault condition at the resin source, should this not also stop the pump??


EDIT 2: OOops, that Hi should be N/O, before anyone picks it up. The input will be ON when below hi level.
 
Last edited:
First thank you all…

I will research this further, I think S7 may have been correct, parts of the prints are not complete, I think the logic is really reverse

There is a intrinsically safe relay that is changing the state of the level indicator, this is not shown on the prints…but I need to research it further

If so then PeterW was also correct, it was the low level that failed, there is no need to have that in the reset…reset when the upper is true

RolfB, could this be 'Preselection solvent --> resin kitchen' kitchen being mixroom? And yes there is also a HMI that would be selected

Again thank you
 
PeterW said:
Time for a lie down I think. Low level should not be in reset line... DOH..

I know what you meant...thats why I had my response...:)

GIT said:
If so then PeterW was also correct, it was the low level that failed, there is no need to have that(low Level) in the reset…reset when the upper is true..
 
A translation without latching outputs with a SET/RESET

Yes, you are right, it's more clear for reading.
But when a man has been a PC programmer, its more intuitive using S and R.
 
I kind of like the original code that was displayed. It translates to ladder in one network, and is concise. I know some people don’t like explicitly using a Set instruction on an output, but in reality there is no difference in using this Set vs using a latch. In the wrong hands, both methods can be dangerous.



Genius, I would be interested in the level switch. I also don’t care for the low level being used on the reset, but for all I know maybe the intrinsically safe system drops out the control voltage and resets the pump anyway if there are conflicting conditions. Knowing this, maybe the original programmer just included the low level for clarity. Or, maybe he screwed up. Who knows.

 

Similar Topics

i am new to simatic manager and i am trying to figure what this part do in the code : A I 5.6 = DB50.DBX 4.6...
Replies
3
Views
132
Hello everyone, can anyone help me with covert the STL code to ladder. Iam using plc s71200. A %DB1.DBX33.7 // angel of vaccum...
Replies
2
Views
208
Hello nice to meet you, im new in here, I'm currently trying to convert code written in STL for a S7-400 to SCL for an S7-1500, because when i run...
Replies
5
Views
317
First off thank you in advance. Second I am very new to STL. I am trying to build a counter that has one count up and 23 count down options. Am...
Replies
6
Views
375
Hi Siemens Experts, I am hoping someone can shed some light on my issue. I have uploaded the code from a S7-300 (317-2PN/DP) using Step 7...
Replies
9
Views
673
Back
Top Bottom