Jump to content

Recommended Posts

Posted

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 ! 

Posted

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.

Posted

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 .... 

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
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.
Posted
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...