InTouch 10.0 - Hours and minutes couter

Missy5

Member
Join Date
Jul 2008
Location
NG
Posts
24
Hi I don't know how to make counter which will count how many hours and minutes a motor is running!?

I have one tag which represent motor status of running (td1), 0=not running and 1=running. I have many motor where I have to do this couter.

I only managed to get start and end date and time and that's it.

In Data Change Script I placed this code:

Tagname[.field]:td1
IF td1 == 1 THEN
day1 =$Day;
month1 =$Month;
hour1 = $Hour;
minutes1 = $Minute;

ELSE IF td1==0 THEN

day2 =$Day;
month2 =$Month;
hour2 = $Hour;
minutes2 = $Minute;
ENDIF;
ENDIF;

Can someone please help me.
Thanks,M
 
Last edited:
why are you looking at the dates and times? are you trying to log when the motors start and stop?

if you only want a run timer you need to use a condition script that runs every 60 seconds. if the motor status is on add 1 to the minutes1 tag. then you can use math to determine how many hours the motor has run by dividing it by 60 on the screen.

give us a clear and concise explanation of how you want it to work and we can help.
 
This is best done in the PLC, & use WW to read the PLC value.

As far as I am aware, this is normal practice for most systems I have seen anyways.
Our standard code has current running minutes (accurate to +/- 1sec), no of starts, total run hours, & how long the device has been off for.
 
This is best done in the PLC, & use WW to read the PLC value.

As far as I am aware, this is normal practice for most systems I have seen anyways.
Our standard code has current running minutes (accurate to +/- 1sec), no of starts, total run hours, & how long the device has been off for.

I have asked if this is possible to do in PLC but they said that they can't do this.

This is the answer that I got:
The criteria for the hour counter is that when fan is running the hours accumulate, it should also be possible to reset the hour counter. The logic has to be made by you as there is no logic in the plc for this. I guess the only option you have to do the logic is to use the fan running tag.
 
if they cant do it in the plc then you need to find someone that can. thats a very simple task and is the best way to do it reliably.

if you want to do it in the wonderware explain exactly how you want it to work and I can help you write the script. it wont be accurate to the second like a plc would but if you can live with it being off a little then it will work fine.
 
The logic has to be made by you as there is no logic in the plc for this.


Doesn't mean they can't. Just that it's not there & they don't want to mess with the plc. IE. the program is done, the programmer is gone, they don't want to pay him more.

What PLC ?

BTW, be sure to make your 'timer' retentive or you will loose the value if WW is shutdown.
 
i agree with the folks above, the most common practice is to do it in the PLC. What kind of PLC do you use?

if you are trying to get a timestamp of the Start/ Stop times of the fan you can use a string tag. but if you want to know how long the fan has been turned ON/ OFF you do the logic that was presented by diat150.
 

Similar Topics

I don't have a tag that lets me view how long my pumps have ran. Just wondering if was any way to make a scrpit to see this information. Im...
Replies
2
Views
1,666
Hi all. Customer wants analog faceplates really bad, even if we explained that it doesn't make much sense in his process. What he wants to see...
Replies
5
Views
51
Trying to export a Modern application for an upgrade to Intouch 2020 but I cannot export the application from the 2014 version because the export...
Replies
2
Views
103
Hi guys, I have experience with PLC to Excel etc...just starting on using intouch scada screens. I have an Excel sheet that uses mainly...
Replies
1
Views
134
Currently we have a fat( I think that is what it is called) Intouch application. An application resolution of 3840x1080, and inside that 2x...
Replies
0
Views
86
Back
Top Bottom