aLL

SIEMENS S7 200

10 posts in this topic

Hello all. I m new with PLCs , just started learning them and I'm trying to create a small program in Lad Micro WIN. For some of you guys might be very easy. Below I'll try to explain 

Button connected to I0.0

Buzzer connected to Q0.0

 

When button is pressed buzzer beeps for 3 seconds. So far so good ... but what I'm struggling is : If I press the button again before the buzzer stops beeping I want the buzzer to continue beeping for 3 seconds again starting with the time I pressed the button 2nd time.

I could do this in any other programing language in less than 10 seconds but because I don't have experience with all MICRO win components there I feel like I'm missing something always .. or there must be another easy way of doing it (after me loading 10 networks to blink a led :)))   ). 

 

CPU 224

 

Thanks a lot ! 

Share this post


Link to post
Share on other sites

Hi,

You must pay attention to number of the timer.

I suggest you to read help for timers where is explained relationship between number of timer and function.

Then you will solve very easy whatever you want.

Share this post


Link to post
Share on other sites

Oh I went through all that ... is not only timers ... it must be something with Set and Reset aswell ... but I just can't find the logic for it .... 

Share this post


Link to post
Share on other sites

Posted (edited)

I can't find any timer to work until reset even if input is not ON anymore... this is what i'm missing .... I think

Edited by aLL

Share this post


Link to post
Share on other sites

so many gurus around?

Share this post


Link to post
Share on other sites

SORTED! 

untitled.JPG

Share this post


Link to post
Share on other sites

IF  there is any other way I would like to see it . makes me learn ! thanks !!!

Share this post


Link to post
Share on other sites

I don't know that platform, but I would see if they have an off-delay timer instruction.

Share this post


Link to post
Share on other sites

Posted (edited)

I think I understand what you are trying to accomplish:

1. Turn on a buzzer output for 3 seconds when a PB is pressed; buzzer must continue to sound for the full 3 second period even if the PB is released before the timeout period (3s).

2. Re-trigger the buzzer timer for another 3 seconds if the PB is released and pressed before the initial 3 second period has timed out.

The solution is not readily seen because normally one would think that the trigger/re-trigger logic would apply only to the timer. This is not possible because an extended pulse timer cannot be re-triggered until it has timed out. A standard TON will not work because releasing the input PB before the timer has timed out will cause an immediate reset of the timer and the buzzer will turn off. However, a solution is possible: use a re-triggerable timer (TON) but latch the buzzer output directly from the PB press.

Test the logic below. I think it will do what you wish. I don't have a 224 CPU to test. Let me know if this is what you are trying to do.

EDIT 5 JULY 2019: I just tested this in the simulator. It works. Change the timer preset (PT) value to  300.

MrPLC Buzzer2.png

Edited by pop29684
Change timer value; comment on simulation.

Share this post


Link to post
Share on other sites
On 7/1/2019 at 4:29 PM, Joe E. said:

I don't know that platform, but I would see if they have an off-delay timer instruction.

that's a 3rd party s7-200 simulator for micro win. it will not work all the time.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now