![]() |
||
|
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
| ||
New Here? Please read this important info!!!
|
|
#1 |
|
Member
![]() Join Date: Dec 2002
Location: Nebraska
Posts: 77
|
koyo (automation direct) help
Here is the problem that I have
The program relies on x4 toggling back and forth from on/off to create the timing and thus the location of the machine. Basically each on is one index or vial movement of the machine and so is the off. What is happening is the source for the x4 input sucks. Sometimes it makes a double on because of electric noise. The Koyo goes well that's weird and throws **** away. Could someone help me write something that would make it so the on impulse would have some sort of millisecond timer that would be able to discount any further impulses until it should see the off impulse. The catch is you can not hold the on impulse on because it will not toggle the bit correctly. Any help that any one could give me will be appreceated |
|
|
|
#2 |
|
Lifetime Supporting Member + Moderator
|
Try this:
Use C1 in place of X4 as your "impulse" When X4 turns ON, C1 turns ON for one scan C0 simply latches until the timer expires, so input X4 is "ignored" for the time dictated by T1 beerchug -Eric |
|
|
|
#3 |
|
Lifetime Supporting Member + Moderator
|
Eric's logic is sometimes called a "pulse stretcher". It will work fine if you can be sure that every time the contact bounces, it is associated with a bona fide transition from Off to On.
However, it doesn't address the potential for contact bounce on the On-to-Off transition. Nor does it filter out a miscellaneous spike such as might be generated if the switch was tripped for just a few milliseconds. It will work correctly if the switch signal looks like this:
* But not if it looks like this:
* Here's a more generic solution:
* |
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Topics
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Automation Direct PLC's and Pocket PC | GregKeys | LIVE PLC Questions And Answers | 10 | April 12th, 2005 09:32 AM |
| Automation Direct DL06 | Steve Etter | LIVE PLC Questions And Answers | 28 | January 21st, 2005 07:48 AM |
| Direct Logic Plc's (automation direct) | Johnny Rotten | LIVE PLC Questions And Answers | 28 | January 11th, 2005 06:58 PM |
| Using Lookout and Automation Direct plc's | Rmiller | LIVE PLC Questions And Answers | 6 | March 25th, 2003 08:13 AM |
| Koyo/ Automation Direct I/o | alanc5 | LIVE PLC Questions And Answers | 6 | December 12th, 2002 03:14 PM |