Counting cycles

Mtech

Member
Join Date
Mar 2010
Location
Indiana
Posts
132
Hello,
I'm getting ready to write some programming to count a cycle up to one million. I'm doing this to test a life cycle of a part. Does anyone have any ideas on a decent way to do this? Thanks for any input.
 
Is the problem counting to 1 million in increments of 1, or is the problem the general sequencing of the test program ?

What controller platform are you using ?
 
Thanks for the replies. Ron's post answered my question. I just didn't give the use a floating integer enough thought. Thank you much.
 
depending on which platform you're using, you might have access to either "long integers" or "double integers" ...

this approach would allow you to make use of 32-bit math - and let you easily count all the way up to 2,147,483,647 (over two billion) with no loss of resolution ...
 
1 million counts in units of 1 is no problem with a float.

16.7 million counts (or more) in units of 1 is a problem with a float.
 
I will only need to count to 1 million in counts of one. However, I'm willing to learn more about this subject. I am using a 1766 micrologix 1400 series A PLC.
 

Similar Topics

Hello I am looking for tips on how to count the duration of a given function and then how to display it on the hmi panel in the hh:mm:ss format...
Replies
4
Views
1,698
Guys, I know it will be silly but can't get my head around it. I have 3 conveyors, every one on a separate servo drive, and 2...
Replies
25
Views
3,496
The 1734-IB8 has no hardware counting function correct? I am trying to find something to substitute in for a 5069-IB16F (since lead times are...
Replies
3
Views
1,408
Been scratching my head at what I thought should be a relatively simple task. I need to count how many rows a .csv file has, so I can later read...
Replies
6
Views
2,538
Hi All, I need to count my Contactor switching times. There are lots of them so I created a template logic with local variables in FC2000. Now I...
Replies
10
Views
2,115
Back
Top Bottom