Midnight Reset

SatanJnr73

Member
Join Date
Aug 2014
Location
Bristol
Posts
5
Hi, just moved over from commissioning to a role doing some basic level PLC code stuff.

Looking to reset a counter at midnight in an moron C200 using cx programmer. did a little digging and looks like the =DT(341) function is the one to use but wondered if anyone out there can break its operation down for me into novice speak??

Appreciate any advice thats out there.
 
That is a really old PLC and no longer supported - ready for replacement with a CS1 processor, power supply and rack - I/O can remain.
 
Tell me about it, as a company there is a plan going forward to replace them with CJ1's but right now and until early next year we're stuck with them.

Any thoughts on the best way to reset this counter??
 
well spotted BCS, thats what happens you you start trying to type on a weekend after a night out!!

I think our offices must run on the same platform.
 
I needed the laugh anyway, so thanks for that.

I personally have never used Omron PLC's although the new winch system we are getting will be using Omron, so I had better start looking into it.

Generally speaking though you will need to write a line of code (Ladder) that when it sees the Real Time Clock of your PLC at midnight, a reset output for your counter will become true. I would use a one shot feature for this also so that this will only take place for one scan once a day at midnight.

(I am speaking on Allen Bradley experience and am not 100% sure your PLC has an RTC feature.)

I did a couple of Google searches and it looks like there is a lot of material on the subject and even some youtube vid's showing you how.
I googled "how to reset a counter in C200 omron plc using cx programer."

Also there should be someone strolling by the forum before long that is knowlagable with your platform and can give you better details.

Best of luck.
BCS
 
Last edited:
Which model CPU - there were many and some did not have a real time clock? C200h-CPU? or HE or what?
 
By the way - you put CQM1H on another forum - what is it? They are quite different. Get it right for assistance.
 
We have a mixture of both across numerous sites, hence the other post with a different PLC type, I was hoping there's one fix for both??
 
Need all CPU types to determine whether they have a time clock or not - some do - some don't.
Also probably different ways of handling the info as they may be in different registers in different PLCs.
 
Many timer switches are available in the market which is used to control appliances like lights/fans etc. You could use one of this to trigger a relay at midnight, say for one minute. Of course the, relay then tie to a PLC input to do your reset. Timer switches are cheap now, so it may be a temporary solution until you upgrade your PLC

Regards
 
Here is how I do it in the latest PLCs (CJ, CP, CS series). For other PLCs the time clock hours may be in a different memory location. Note ANDW is used as a mask and the hours have to be preceeded by # in the compare function. You can use a DIFU (rising edge one shot) instead of a straight internal bit if you wish.

Time Clock Hours.jpg
 

Similar Topics

Hello, I'm trying to program a machine to reset a counter at midnight. I can do this no problem but I have a question about what will happen...
Replies
15
Views
4,155
I have CLX v17 code attached (L5K file) that converts the WallClockTime into various Strings and Integers. 23 hours a day it works OK. But the...
Replies
4
Views
2,326
Hi, Is there a midnight pulse integrated in a Schneider M340 or do I have to make one myself ? I've already looked through the help without any...
Replies
2
Views
1,790
I'm new to the Unity pro enviroment and I'm editing a piece of code and I would like to generator a midnight pulse to move the current days time...
Replies
0
Views
3,651
Hi All, I have a nicely running process :) (knock on wood...) I have a FTStudio SE HMI and I figured out how to do many things on it including...
Replies
2
Views
2,337
Back
Top Bottom