Matsuo

How to set pump turn on/off use real time clock[CP1E-N]

13 posts in this topic

Hello         I'm new for PLC, I need to set pump turn ON/OFF  in 4 time/day every day => [8:00-8:10]a.m, [11:00-11:20]a.m, [2:00-2:10-14:10[p.m, [5:00-5:20]p.m ** I have Omron PLC CP1E-N30 , Could you advise me, please ?  

Share this post


Link to post
Share on other sites
Hello go look for the =DT instruction. You can use it to compare the internal real-time clock memory (A352) with the set time required that you put in other memory
1 person likes this

Share this post


Link to post
Share on other sites

My very pleasure :D

Share this post


Link to post
Share on other sites

Posted (edited)

Dears

How to compare the hours & minutes which were in different clock memories (A351 & A352) and how it can appears in one data memory.

A351 - displays Minutes & Seconds

A352 - displays Hours & Day of month 

A353 - displays Month & Year

A354 - Displays Day of a week

Most of the time the specific applications were depends on Hours & minutes only instead of seconds. How we can combine Hours & minutes to compare in one data memory ?

I came to know in the link below the situation is different for other PLC models for which hrs & min were in single clock memory AR17

@innoaloe

Edited by Abdul Wajid

Share this post


Link to post
Share on other sites

Here is how to extract minutes and hours to separate channels with a mask.

TC.PNG

1 person likes this

Share this post


Link to post
Share on other sites

@Abdul Wajid Hi again! Got the business moving now?

You've got the answer from the boss up above. If I may add though, you can also use MOVD instruction to take hour digits from A352, put it in MSBs of D1000 for example, then use another MOVD to take minute digits from A351, put it in LSB of D1000. So D1000 will contain "HHMM" values which later you can compare with another Word.

1 person likes this

Share this post


Link to post
Share on other sites

Posted (edited)

Hi... thanks a lot for both BOB & Inno....

It get worked in the way that first i have to extract the hours & minutes as Bob mentioned in different data memories (say D10 & D12), then have to shuffle the hours & minutes from particular data memories D10 & D12 as inno mentioned to result memories (say D14 & D16) with control word as #32 in MOVD....Also another option, D10 & D12 can divide & multiply by 100 as mentioned by michael in the link attached above.... For combining Hours & minutes i have to add  D14 & D16 with Add instruction and the result would appear as required in another data memory with Hex format.

ANDW & MOVD seems like tricky instructions....

@innoaloe preparations going on for business... would poke whenever required....:-D.... Now former for Omron ? hope may be busy with another research.....! 

Edited by Abdul Wajid

Share this post


Link to post
Share on other sites

Here is a bit more - this is to turn pumps to night speed and day speed.

The hour and minute values are written to D2020, 21, 22 and 23 from a touch screen.

the SWAP function is used to swap the minute bytes to make the comparison easy.

ANDW is really very easy to use and I use it here as a mask to block hours and let through minutes and to block minutes and let through hours.

While the settings are in HEX they are actually read in binary - HEX is a leftover from older Omron PLCs to allow those programs to be easily converted to newer PLCs I believe.

The settings in D2020, 21, 22 and 23 are actually HEX values.

Time Clock.cxp

Share this post


Link to post
Share on other sites

Thanks BOB for further more help...For continuously working this real time application Whether we need to insert battery in PLC ? Will this application will work if PLC had been stopped for few days without battery? Kindly clarify.... In my point of view batteries had been used to hold the particular values in the data register (D2020,21,22,23 in attached program for Start/Stop), Is it correct ?

Thanks

Share this post


Link to post
Share on other sites

Yes - but if not powered down not a problem. Can be re-written from the screen anyway.

Share this post


Link to post
Share on other sites

Batteries will still be needed if you want the PLC clock to keep on synchronized though... otherwise when main power is powered off, the clock data in the A Register can go awry...

@Abdul Wajid Yep, leaving by this year from the main company but still got to play with Omron here and there. Who knows though, maybe back in there in a few years. Hhh...

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