Matchu04
Lifetime Supporting Member
hi guys
I have recently completed a basic S7 course and have started creating my own little programs/solutions to small problems using stl. So far I am not having issues with code but more with the best way to lay the code out.
I have read several posts about you guys use FC's and FB's to break the code into sections for different operations. Thats sweet I get that but here's my issue.
I have a process (roller shutter door) and Im writing the code for the alarm condition, which I already have a seperate FC for. Basically im setting bit Q0.2 high, when either the motor over has operatored, or the low limit and high limit switch operate at the same time, or if I dont get an input from the prox within a certain amount of time. etc etc
So with all these conditions and only calling Q0.2 once how should I lay it out. All in one network, different network for each condition or completely different way.
My tutor told me when writing stl code that you could write it anyway you wanted within certain criteria. what I'm after is how should it be done ?
Also final question, is there a time and a place to write in ladder or is it best to write stl if you can?
Cheers guys
I have recently completed a basic S7 course and have started creating my own little programs/solutions to small problems using stl. So far I am not having issues with code but more with the best way to lay the code out.
I have read several posts about you guys use FC's and FB's to break the code into sections for different operations. Thats sweet I get that but here's my issue.
I have a process (roller shutter door) and Im writing the code for the alarm condition, which I already have a seperate FC for. Basically im setting bit Q0.2 high, when either the motor over has operatored, or the low limit and high limit switch operate at the same time, or if I dont get an input from the prox within a certain amount of time. etc etc
So with all these conditions and only calling Q0.2 once how should I lay it out. All in one network, different network for each condition or completely different way.
My tutor told me when writing stl code that you could write it anyway you wanted within certain criteria. what I'm after is how should it be done ?
Also final question, is there a time and a place to write in ladder or is it best to write stl if you can?
Cheers guys