Counter, Timer, One Shots

cooka

Member
Join Date
Jan 2014
Location
MN
Posts
6
Hello All,

I recently posted inquiring about a Real Time Clock, instead I have been asked to create a PLC program that uses Timer, Counter, and One Shots to count the day of the week and time in the day (hh:mm:ss) format and display and display it in as a string file. So I understand how to use TON and CTU - somewhat, still VERY new to PLC programing - in my program I have 3 timers that count up to equal 1 second, 1 minute, 1 hour. I know I need to reset the timers and have the counters count up when each timer gets to the ACC (before it resets). So I am confused about how/why to use a OSR and I don't have a clue as to how to display the Day and Time in a string file.

I am using an emulator for RSLogix 500. I am running this on a vert XP machine that is on a 7 64bit.

I have been searching for day on how to do this but I am just getting more and more lost and confused. If any one could help I would appreciate it greatly. Thank You in advance.
 
Here is a LogixPro (RSLogix simulator) program that I wrote for a Simulated Clock using 1 timer and 4 counters, with alarm, time set, and conversion to HH:MM format. Maybe it will give you some ideas.

You will need to add several rungs to convert the Counter C5:2.ACC, C5:1.ACC, and C5:0.ACC (hours, minutes, and seconds) to a string. Use the ASCII instructions ACI to convert each time value to a string, then use ACN twice to link or concatanate two strings into one. If I have time tomorrow I can help you with that.
 
Last edited:
I suppose accuracy is not so important if a timer must be used to trigger cascading counters. Here is an example that might head you in the right direction.

You will have to figure out your own methods for displaying the String Outputs (ST9 words) for Day-of-Week and HH:MM:SS on your display, and also how to update the current time to the Timer and Counter ACC words. Another thing you will need to do before running the program is to type the colon ":" into memory file location ST9:15, and the names for days of the week (SUNDAY to SATURDAY, each expanded to 9 characters with spaces if need) into ST9:0 to St9:6.
 
Last edited:

Similar Topics

Hello All, I recently posted inquiring about a Real Time Clock, instead I have been asked to create a PLC program that uses Timer, Counter, and...
Replies
3
Views
1,732
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,313
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,285
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,470
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,467
Back
Top Bottom