Host Engineering Forum
General Category => DirectSOFT => Topic started by: Raatdin1 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?
-
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.
-
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?
-
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 (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.
-
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.
-
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.
-
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.