tunnysting Posted April 26, 2012 Report Posted April 26, 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
Groo Posted April 27, 2012 Report Posted April 27, 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.
tunnysting Posted April 28, 2012 Author Report Posted April 28, 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.
tunnysting Posted April 30, 2012 Author Report Posted April 30, 2012 Thanks again Groo, After several hours changing/testing/breaking I understand a lot more, I just have to improve on my German now!
speakerman Posted May 15, 2012 Report Posted May 15, 2012 Wow, nice explanation! Who says Groo is slow of mind...?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now