Technical Forum

SIMATIC S5 / STEP 5

one shot input

Thread Starter: igor62il   Started: 1/12/2013 8:08 PM   Replies: 7

« Previous thread Next thread »
Page 1 of 1 (8 items)
  1/12/2013, 8:08 PM
Joined 5/27/2012
Last visit: 5/30/2014
Posts: 78
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi
How can I make a one-shot input in S5 like another PLC?or have different way?
Thanks
Top
  1/12/2013, 8:38 PM
Joined 9/27/2006
Last visit: 10/30/2014
Posts: 4843
Rating:
Rated: Excellent [4.22 out of 5 / rated 825 time(s)]. (825) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello igor:
You can use Fritz' code in the following thread to impement a one shot rising pulse:
https://www.automation.siemens.com/WW/forum/guests/PostShow.aspx?HTTPS=REDIR&PostID=248240&language=en


Hope this helps,
Daniel Chartier
Top
Thank you for this post from:
  1/12/2013, 8:57 PM
Joined 5/27/2012
Last visit: 5/30/2014
Posts: 78
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello Daniel .
Thanks,but I need one shot in siemens S5 PLC.It's different them S7.
Top
  1/12/2013, 9:20 PM
Joined 9/27/2006
Last visit: 10/30/2014
Posts: 4843
Rating:
Rated: Excellent [4.22 out of 5 / rated 825 time(s)]. (825) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello igor:
As Fritz wrote in the thread I pointed you to earlier:

"In the old S5 days there was no --(P)-- (or --(N)--) instruction and rising edge detection was commonly done as shown below (example for the addresses that saddlepoint used):
  1. A I 0.0
  2. AN M 0.0
  3. S M 0.0 // rising edge memory bit
  4. = M 0.1 // one shot bit
  5. AN I 0.0
  6. R M 0.0

All that the --(P)-- (or --(N)--) instruction do is to simplify the logic, the principle behind it remains the same though."

I cannot put it more clearly, i think.
For every instance you need in your program use a new input bit and a new flad bit to setup a new one shot instruction.
Hope this helps,
Daniel Chartier



=== Edited by dchartier @ 1/12/2013 9:21 PM [GMT ] ===


Top
  1/12/2013, 9:56 PM
Joined 5/27/2012
Last visit: 5/30/2014
Posts: 78
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Dear Daniel
It's  my mistake,I not see this explain.But I not strong in STL.Can you write it in LD code
Best regards.
Top
  1/12/2013, 10:53 PM
Joined 9/27/2006
Last visit: 10/30/2014
Posts: 4843
Rating:
Rated: Excellent [4.22 out of 5 / rated 825 time(s)]. (825) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello igor;
I strongly recommend you study AWL instructions if you plan to work with S5 PLCs, although you can do much with ladder you will find that you can save a lot of memory (and the S5 CPUs are not as powerful as their S7 descendants.
In any case, here is a quick implementation of Fritz' code, as an attachment.
Hope this helps,
Daniel Chartier

Attachment: S5 one shot.jpg  (37 Downloads)



=== Edited by dchartier @ 1/12/2013 10:57 PM [GMT ] ===



Top
  1/12/2013, 11:31 PM
Joined 9/27/2006
Last visit: 10/30/2014
Posts: 4843
Rating:
Rated: Excellent [4.22 out of 5 / rated 825 time(s)]. (825) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
And here is an implementation taken from the S5-115U manual.
Hope this helps,
Daniel Chartier

Attachment: S5 edge detection.jpg  (28 Downloads)

Top
  1/13/2013, 6:51 PM
Joined 5/27/2012
Last visit: 5/30/2014
Posts: 78
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi Daniel
I sure to get your advice about AWL.You've been very helpful.Thanks to match.
Igor
Top
Page 1 of 1 (8 items)
Actions