Sign in to follow this  
Followers 0
pszczepan

Day of week - do I have to set?

9 posts in this topic

Hi! I have to add possibility to set date in PLC using panel. If I set day, month and year - the day of week will be set correctly along some internal calendar or I have to set it also. Thanks for fast reply.

Share this post


Link to post
Share on other sites
Set them all, most commonly, use the TWR instruction. If you try to update them in the D8012-D8019 addresses, you need to turn on an M bit in the M8000 range somewhere to stop the clock while making changes. TWR is much easier.

Share this post


Link to post
Share on other sites
Hi, If you set up RTC of controller with Developer Software (from PC), then the day of the week will automatically recalculate by PC. PLC itself did not fix the day of the week. However, I have a software procedure that allows to calculate the day of the week in PLC, based on the values of date / month / year.

Share this post


Link to post
Share on other sites
In knowledge base at mitsubishi-automation.com I found: " How can I set the real-time clock of my FX PLC? (General (FX)) - KS00781 To set the real time clock for FX1S, FX1N, or FX2N© PLC you can use the "TWR" (set clock) function. Use this instruction to save the time and date ... read more To set the real time clock for FX1S, FX1N, or FX2N© PLC you can use the "TWR" (set clock) function. Use this instruction to save the time and date information you have entered in the real-time clock. The TWR instruction uses 7 sequential data registers for the information: Year, month, day, hours, minutes, seconds, and day of the week, If you have an older FX PLC then you can set the real-time clock as follows: 1 - Stop the real-time clock by switching on the relay M8015. 2 - Replace real-time information with new information that will be set. Time unit Seconds register D8013 minutes D8014 hours D8015 days D8016 months D8017 years D8018 COMMENT: Day of the week (D8019) is set automatically via the set date of the PLC. 3 - Restart the real-time clock by switching off relay M8015. At the end there is info day of week is set automatically. You guys wrote that it must be set manually or PLC needs a code to set up automatically. So what is the true? Inntele - could you attach code to set day of week in PLC automatically Edited by pszczepan

Share this post


Link to post
Share on other sites
You could try to check on real PLC, the information from Mitsubishi source is true or false What the programming software do you use? Edited by Inntele

Share this post


Link to post
Share on other sites
Yes I'll check - tomorrow I will go there- 4 hours drive and I want to be ready for some surprise. I use IEC developer 7.01

Share this post


Link to post
Share on other sites
ÎÊ. I'll publish FB for this purpose in one hour.

Share this post


Link to post
Share on other sites
Sorry fo delay. The programming procedure is attached: Day_of_Week_Calculation.zip You can unzip this archive and to insert .SUL file into your program by adding of user's library. This library consist of PRG which calculates and corrects the day of week every scan, when PLC work in RUN mode. It may be use for any FX-series, not only for FX3U. The library is closed with password, but is possible to see MELSEC code after uploading from PLC. Now I can not check its work, because I have not real FX3U now. But it must work fine, I checked it several monthes ago. May be you or somebody, who read this topic, can check it on real PLC now.

Share this post


Link to post
Share on other sites
Would like to know finally about the results of trip in part of discussion on topic.

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