message instruction/ timer (from PLC to LED display) NEED HELP!!

I am trying to program a PLC so when an assembly line breaks down, the operator can turn a switch, which will then put a message up to the
LED display that is away in the plant. The message is scrolling across the LED display as follows:
273=line # time=seconds motors=variable of why line is down
DISPLAY SHOWS: 273<space>(amount of time the line has been down)<space>motors.
The program works so whichever line is down, and whatever reason it is down (no motors, no dunnage, changeover etc...) the message will be displayed. I just need the timer to be able to count how long the line has been down i.e. (the switch has been turned on). I use the count up (CTU) function but then I get the time in seconds. Does anyone know the best way to program a counter or timer function to display a time format, i.e. 9:58, instead of just displaying the seconds. Below is what I need:
WHAT I HAVE: 273 458 motors WHAT I NEED: 273 9:58 motors
THANKS FOR YOU ADVICE.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
james wrote:

Use 2 (or three if you need hours) memory locations to store (and display H:M:S). When the seconds counter reaches 60 increment M and reset S to zero. When M = 60, increment H and reset M to zero. ARM
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
MOST micro PLC's and higher will have a function block or group of function block to do this. Will be different for different PLC's and the software your using. Give more info and maybe read the SW manual. Below will work and another method is using system registers like for current or elapsed time. At start of time move current count to "START TIME" register and "ELAPSED TIME" = CURRENT TIME - START TIME. Sometimes this kind of stuff is built into marquee drivers or formatting options.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.