News:

  • October 13, 2025, 01:33:16 AM

Login with username, password and session length

Author Topic: Teeth Counting  (Read 5605 times)

Raatdin1

  • Newbie
  • *
  • Posts: 3
Teeth Counting
« on: October 01, 2009, 10:42:43 AM »
I need to count upto 60 teeth that are equally spaced by 6ยบ. The shaft may rotate any number of times but counting shall be limited to 60. After 60 counts I guess I need to put a '>' logic to reset it to zero. This should be ORed with any external reset input.

Being a newbie, I am not familiar with all instructions to complete the logic in DL05 PLC enviro. Is there any sample counting logic available to check out?

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: Teeth Counting
« Reply #1 on: October 01, 2009, 10:46:18 AM »
The DC input versions of the DL05 contain a built in high speed counter. Get the CPU manual (PDF) from the AD website and follow the information in section 3.
An output is a PLC's way of getting its inputs to change.

Raatdin1

  • Newbie
  • *
  • Posts: 3
Re: Teeth Counting
« Reply #2 on: October 01, 2009, 11:13:36 AM »
i got a DirectSOFT5 manual with the software purchase. Chapter 3 talks about how to create a project. Chapter 5 has some counter instructions.

I need to have only '>' instruction. But it has 'greater than or equal to'. I don't want '=' because if it is 60 I need the PLC to retain theat value not resetting it to zero. But if it is 61 (above 60) it should be reset to 0

Do they have only '>' instruction?

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: Teeth Counting
« Reply #3 on: October 01, 2009, 11:41:09 AM »
I'm referring to the CPU manual for the DL05 available for free at AutomationDirect's website.  http://www.automationdirect.com/static/manuals/d0user/d0user.html

It looks like they have moved the discussion of the High Speed Counting to Appendix E.
« Last Edit: October 01, 2009, 01:12:02 PM by b_carlton »
An output is a PLC's way of getting its inputs to change.

PLCGuy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 677
Re: Teeth Counting
« Reply #4 on: October 02, 2009, 06:24:38 AM »
How fast is the shaft rotating? Can you give more detail. I have done some applications looking at shaft rotation. Maybe I have done something already that might work for you.

Raatdin1

  • Newbie
  • *
  • Posts: 3
Re: Teeth Counting
« Reply #5 on: October 02, 2009, 11:41:22 AM »
It's rotating at a very slow speed, 3 RPM - 1 rev per 20 secs.
I did some programming. But as I put PLC to RUN MODE, the counter displays the value 9999. There must be something wrong in the programming.

I could not insert the screenshot here.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3601
  • Darth Ladder
Re: Teeth Counting
« Reply #6 on: October 02, 2009, 11:52:04 AM »
I need to have only '>' instruction. But it has 'greater than or equal to'. I don't want '=' because if it is 60 I need the PLC to retain that value not resetting it to zero. But if it is 61 (above 60) it should be reset to 0

Actually, you don't need that.  There are two approaches.  First, change the reset threshold to 61, and reset if count => 61.  OR, reverse the order because there is a < operator, so reset if 60 < count.

The first two things I thought of with your application are if there is any possibility of shaft rotation reversing, even slightly?  If so, you may need to allow for how to figure it out and not count a tooth detection (or you may even need to subtract it).

Second, as a prox starts to come into range of the tooth, it might bounce slightly or flash on an off, so you may want to filter the input so there's no risk of getting multiple counts on one tooth.  Some AD plc allow control of filtering by configuration, or you can do it in ladder with a timer or scan counter.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.