Posted 26 Apr 2012 Hi All, I'm struggling to get to grips with a bit of code written in STL, can anyone give me a quick overview of what is actually being done in network 4 in the following pics. Thanks in advance. plc_2.bmp Share this post Link to post Share on other sites
Posted 27 Apr 2012 If the first 2 values added together is greater than the third value AND the minus flag is set OR If the fifth value is subtracted from the fourth value and the result is less than the sixth value AND the plus flag is set AND Stoerung sofort is off then turn on Ton_Stoerung.IN Ton_Stoerung.IN is the input pin "IN" for the FB that follows that bit of code, doing this saves turning on a flag and placing it at the IN pin. This looks like a timer FB which is part of the STAT area. Turning on Ton_Stoerung.IN starts the timer. The timers set for 20s Ton_Stoerung.Q is the FB output, so would turn on after 20 seconds, unsure why the bool its turning in wasn't simply put at the Q pin. Share this post Link to post Share on other sites
Posted 28 Apr 2012 Thanks Groo. This could be a silly question but what is the relevance of the #? I've searched online but can't seem to get a specific answer. Share this post Link to post Share on other sites
Posted 30 Apr 2012 Thanks again Groo, After several hours changing/testing/breaking I understand a lot more, I just have to improve on my German now! Share this post Link to post Share on other sites
Posted 15 May 2012 Wow, nice explanation! Who says Groo is slow of mind...? Share this post Link to post Share on other sites
Posted 20 May 2012 I'm OK as long as I have my stupaberries. Share this post Link to post Share on other sites