rafaytemuri

DT function for month and year comparison

4 posts in this topic

Hi,

"CJ2M-CPU32 PLC"

CX Programmer V: 9.63

I'm working on one of the projects where I'm using DT function for comparing the daily, monthly and yearly water flow.

I'm able to get daily totalizer but having difficulty while having totalizer for monthly and yearly basis via using DT function.

Can anyone guide how can I link the calendar with DT function subjected that every month is with different numbers i.e. 30,31 and 28/29 days.

How can I add exact flow rate into monthly totalizer?

note: 1 pulse = 1m3 (I'm not having problem for pulse count etc- its just with monthly & yearly totalizer while using DT function).

 

Thanks

Share this post


Link to post
Share on other sites

I don't know about DT function but I think you should try to use day 1st at 00:00:00 to calculate monthly toatalizer it just easier than use last day in month.

Edited by Wasan

Share this post


Link to post
Share on other sites

Thanks Wasan,

but each month is different, I need to make totalizer in reference to calendar i.e. each month have different days like 30,31 and then 28,29. 

So i need to make the program at once and all should work in auto.

Share this post


Link to post
Share on other sites

That is why the suggestion to do it on 1st at 00:00:00 - does not matter how many days then.

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