Sign in to follow this  
Followers 0
Jpalas

Schneider PLC Counter+Timer

6 posts in this topic

Hi there

So I’ve been trying to complete a program to a Schneider PLC in Ladder but having some doubts.
I’m trying to add a timer, this needs to add a block of time every time a contact is cloded (coin validator). Tried so use a counter and a pulse timer, but doens’t add time to it.
Could someone give me any idea?
Using a Schneider Modicom M221 24 I/O and Ecostruture Machine Expert Basic

Thank you so much

Share this post


Link to post
Share on other sites

Posted (edited)

Thank you cHud, that's a giant step in the right direction. 

However what is happening is the timer stops at it's inicial present value even if I add to it.

Idea would be by pressing (inserting coin) present rises from 1250 to 250 and timer stops at 1500.

Also after timer stops, the Present value needs to go back to it's original value, so I'm going to try to add a reset number to it.

Will work on it all tonight but if anyone can help out, would be great ;-)

The purpose of this is a self service car wash, when you insert the first coin it gives a x time, when you insert a second and third coin I need to add the timer (Y+(X-Z)

X - Time given by first Coin

Y - Time Given by second coin

Z - Whatever time has passed beetween First and second coin

 

Thank you

Edited by Jpalas

Share this post


Link to post
Share on other sites

With the IEC TON instruction, the timer preset is provided before it starts to run.  Changes to that variable will not take effect until the timer resets, it cannot be modified after it starts. 

You may need to consider a different approach, like incrementing a value in a register instead of a timer...  Same is true for IEC style counters.

Share this post


Link to post
Share on other sites

So, I found this solution using retentive timer and it seems to work. When contact I0.1 is closed, however, the timer does stop. But in the pratical operation I'm hoping we only give some milsec extra.

I Can't however reset the timer to it's original present value. 

Any help?

Thank you  

Sol.jpg

Share this post


Link to post
Share on other sites

Don't know that software, but the timer will need to be reset.  Not sure if there's an address like %TM0.R or you use a Reset instruction.  There should be help on the function blocks built into the software.

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
Sign in to follow this  
Followers 0