Inntele

ON/OFF Timer for Mitsubishi FX

3 posts in this topic

FB_TIMER_ON_OFF The FB is a part of RTC library and implements a timer, based on RTC, for ON and OFF a control bit, e.g. to turn ON/OFF a load in the time interval, and can be easily added into your program in desired quantity. The FB is supplied with E (Enable) input, EO (Output to Control Bit), and can operate in one of two modes: HMS = Hours + Minutes + Seconds (daily timer) MDH = Month + Date + Hours (yearly timer) Each setpoint of ON and OFF time settings should be represented as Array of INT [0...2] type and contain a time data according to the chosen mode. Thus, for example: - in HMS mode: a control bit can be turned on at 02:03:14 am and then turned off at 06:04:17 pm, or turned on at 05:12:27 pm and turned off at 07:06:22 am; - in MDH mode: a control bit can be turned on 3th February at 02:00 pm and then turned off 4th June at 05:00 pm, or turned on 12th November at 03:00 pm and turned off 6th March at 10:00 pm. If the values of both time settings are the same, the FB output will not be activated. Supporting PLC CPUs: All FX Program memory: - 34 steps per each FB instance - 4 steps for entire project (reading from RTC) System variables: M - 3 bits (for entire project) The library is compatible with GX IEC Developer and GX Works2 software . https://plus.google.com/105445006108716761629/posts/Z4v4F11s4Bz Edited by Inntele

Share this post


Link to post
Share on other sites
Besides the FB_TIMER_ON_OFF for on/off control by settings of diurnal or annual timer, RTC library contains the procedures for RTC reading and its automatic correction to DST and back in accordance with national regulation. A feature the DST procedure, written in co-authorship with Sergei Troizky, is that the RTC will always show a correct time, regardless of whether the controller was in RUN mode at passing of DST start/end. This is important in stand-alone, unattended applications, whereas the algorithms must be tied to the correct date/time and the facility can be unpowered due to a failure on power grids. Currently, the library contains DST procedures valid for US and EU rules, however any others rules can be easily added. With certain efforts the RTC library can be converted for Q-serie PLCs.

Share this post


Link to post
Share on other sites
UPD: The DST routine for critical applications, where Q-series is used, has been written and tested successfully. It occupies 61 steps of program memory.

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