adccommunitymod (AutomationDirect) asked a question.

hour meter

Created Date: February 08,2006

Created By: md1523

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

I need to have hour meters on 6 differant machine's to keep track of operating time. I have a DL260 CPU and C-MORE HMI with touch screen how can I make the hour meters and reset them after log sheets are filled out at end of each shift.


  • adccommunitymod (AutomationDirect)

    Created Date: February 08,2006

    Created by: marksji

    Timers and coutners... Depending on the accuracy you need you could have a self resetting 60s timer increment a counter. That counter could increment another counter and rest to 0 each time it reaches 60. This would give you Hours:Minutes.

  • adccommunitymod (AutomationDirect)

    Created Date: February 13,2006

    Created by: md1523

    I used a TMRA for counting seconds in the accummulator stack I then DIV by 10 then DIV by 60 OUT VMEM for minutes then DIV by 60 OUT VMEM for hours.

    Problems

    1. T0-T100 will not work they show 80008000 all the time.

    2. T101-T375 time has two sets of four digits twins of each other as it times.

    3. T376 has five digits and works perfectly with the accummulator stack. But cannot get the VMEM location to show the left over minutes only gives whole numbers.

    Am I doing something wrong with these timers?

    Is it possible to show the left over minutes?

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: February 13,2006

    Created by: marksji

    I think what you 're doing should work. Can you post your code so we can see what exactly you 're doing?

  • adccommunitymod (AutomationDirect)

    Created Date: February 13,2006

    Created by: md1523

    Y1 running

    --- -------

    C1 reset

    --- -------

    SP1

    --- ------ -T375

    K10

    K60

    K60

    Sorry I do not know yet how to type code in this window so I did the best I could.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: February 13,2006

    Created by: bcarlton

    Originally posted by md1523:

    Y1 running

    --- -------

    C1 reset

    --- -------

    SP1

    --- ------ -T375

    K10

    K60

    K60

    Sorry I do not know yet how to type code in this window so I did the best I could.

    SP1

    --- ------ -TA375 - note extra 'd '

    K10 - note extra 'd '

    K60 - note extra 'd '

    - holds hours

    - just 'POP '

    - holds remain min

    An accumulating timer holds its value in 2 registers. It can easily be over 9999 (and will after 16.66 minutes). We load BOTH registers using the LDD. We then must use the 32 bit forms of the math for proper operation. After the 3rd DIVD the accumulator holds the total number of hours which we send to V4000. At this point the remainder (the left over minutes) is on the 'stack '. We get that by using the POP instruction. Then its available to be sent out to V4001.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: February 13,2006

    Created by: md1523

    I must be doing something wrong with the DIVD instruction I can not put a K10 in this box like the DIV instruction only a nickname so where would the K10 and K60 go in the accumulator

  • adccommunitymod (AutomationDirect)

    Created Date: February 13,2006

    Created by: bcarlton

    Ahh - you 're absolutely right. Go ahead and set up a rung with the form

    SP1

    --| |-------------

    |

    |-

    |

    |-

    |

    |-

    Replace the V10000 and V10002 with any two registers. Just make sure that the second of each pair (V10001, V10003 in this case) are not being used. then reference those for the DIVD instructions.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: February 14,2006

    Created by: md1523

    I figured it out. Here is how I did it:

    Y1

    --- --------------

    C1 RESET

    --- --------------

    --- --------------

    SECONDS

    MINUTES

    10THS HOUR

    Then use your HMI to display this vmem location in BCD int 16 and add one decimal point place. Example 186 minutes would show in vmemory as 31 tenths the HMI with the decimal point would be displayed as 3.1 hours.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: February 14,2006

    Created by: md1523

    Sorry forgot to show the contact to the LDD box is SP1

  • adccommunitymod (AutomationDirect)

    Created Date: February 15,2006

    Created by: clasentech

    If all the accuracy you need is tenths of an hour, then you can just have a counter that is fed by a K36000 TMRA.

10 of 11