Timer TON convertion from ms to min

Persephone

Member
Join Date
Aug 2021
Location
there
Posts
13
Hi there i was wondering if we can change in the TON the ms to min.....

or how can i make a transformation... that shows up in c-more.

cuz I am grabbing the data of the timer to show up in the hmi but the values are over 2000, and i want them to be 2 cifres


please help,
 
No, you cannot change how the timer increments. But you can use math to solve your problem.

If your timer is timing in milliseconds, then simply use a DIV to divide the accumulated value (by 1,000 to see seconds or 60,000 to see minutes). Store the result in a tag and then you configure the C-more application to look at that tag to display your timer value.


EDIT: I said MUL before instead of the correct DIV

OG
 
Last edited:
Assuming that the TON's accumulated milliseconds is a 32-bit integer, create a 32-bit integer tag in the C-More linked to it and scale the value in the numeric display. With that you can easily display the value in increments of tenths of a minute (six seconds). If you want the display to be in minutes and seconds you have to do a little more work which is probably easier done in the PLC than in the C-More.
 
For HMI's I never have the timer or counter directly read or written to,


I always MOV T.ACC to a DINT, to change it as you want simply DIV the.ACC but 60000 to a DINT or REAL - the REAL would show decimal places and can be truncated to 1 or 2 decimal places
 
Last edited:
Hi there i was wondering if we can change in the TON the ms to min.....

or how can i make a transformation... that shows up in c-more.

cuz I am grabbing the data of the timer to show up in the hmi but the values are over 2000, and i want them to be 2 cifres


please help,

Hi, remember as I_Automation stated, don't write directly to the timer. Also one can reverse the process and have a numerical keypad on the HMI that and an operator can enter a value say in minutes and the timer logic will get the preset in msec. Hope this helps.
 
Are you looking for minutes and seconds? Make new tags for the C-More to read in PLC for minute and second.

Seconds = (TON.acc DIV 1000) MOD 60
Minutes = ( (TON.acc DIV 1000) - Seconds) DIV 60
 

Similar Topics

Hello everybody, Since my experience is mainly with AB ladder I am having little bit of a problem with EasySoft.. Does anyone knows is there a...
Replies
4
Views
837
Does anyone know of a library that already has a implemented RTO? I was going to write my own but I'd rather not take the time.
Replies
35
Views
11,337
All, I've got a TON that keeps resetting itself even though the rung remains true, I've slammed my head over this for some time now and cant...
Replies
16
Views
4,655
Ok guys I have a strange one. I just added a timer to to ML 1400 program, and it is not accumulating anything. But the OTE after the XIC TT...
Replies
6
Views
2,005
Hi folks, As an enthusiast beginner in PLC programming (Click PLC), I'm already for days struggling to find a solution for this: I want a...
Replies
18
Views
4,241
Back
Top Bottom