counter/timer for LED display (convert up counter to normal time format)

mattbdb

Member
Join Date
Feb 2003
Posts
16
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

Please send an email to [email protected] or post a reply.THANKS FOR YOU ADVICE.

Matt
 
Please state the type of PLC, the type of display and the code which is currently being executed to produce the display you show.

If your counter is in seconds then divide it by 60 for minutes (assuming it isn't rounded like AB) and keep the remainder as the seconds.
 
The display is a Vorne industries M1000 serial message display. The PlC is a SLC 500.


THe code is a CTU function then an AIC function to convert the C5:0.acc to a string. If I have a command to divide the .acc value by 60, won't I get just a number without a time format? For example if the CTU reaches 60 I want the LED to say 1:00. If I have it divide by 60 then won't it just say "1". Do I need to make all the digits seperate strings and use an ACN (string concatenate) function to combine everything to make a time? Please advise. Thank you.
 
OK, for the SLC500, do this: Divide (DIV) the C5:0.ACC by 60 and have a dummy register for the destination (you don't want it anyway, it's a rounded division). IMMEDIATELY move the contents of S:14 to a register as the minutes. Also move the contents of S:13 to a register as the remaining seconds. Then use ACN commands as necessary to build the time string.

Note: if you envision the time going into hours then you'll have to do this twice, first dividing C5:0.ACC by 3600, preserving S:14 as the hours and S:13 as the seconds. Then do the procedure above on the remaining seconds to break out the minutes.
 

Similar Topics

I don't have much experience in programming. I can do simple configuration. it is like this. i want to add something to the existing ladder...
Replies
39
Views
6,196
Hello everyone‚ Fairly new to PLC prog I seek your advise concerning what is said in my thread title; I program using workbench components; I...
Replies
1
Views
1,255
Hello all Logiix designer 5K Been looking around ( not in the right places ) haven't been able to locate an AOI or other instruction for a...
Replies
24
Views
5,429
can you help me with this one guys using fluid sim. This is for my bring home exam. providing a problem description, schematic...
Replies
5
Views
2,456
hi all, i have compact logic plz RS studio & factory talkview and a Universal frequency counter/Timer from Agilient (keysight). how can i...
Replies
0
Views
1,792
Back
Top Bottom