ONE ARDUINO MODELS THE FEED CYCLE AND TIMING
This monitors the request to start the motor or read another card, setting a 15 second timer that keeps the 'motor' running. As long as the motor is running, this emits three timing pulses at specified times during a 60 millisecond cycle of the machine.
SECOND ARDUINO MODELS READING A CARD
The second Arduino watches the timing pulses from the first as well as inputs from the 1130 controller. Initially the machine appears to have no cards in the pre-read station, but the hopper remains full.
This produces the output of a photocell that detects the left edge of a card in the pre-read station. As a card sits in the station, the photocell output is low, but when a feed cycle is requested (Feed Solenoid line activated), synchronized with the timing pulses, the light shows as the card starts moving and goes out as the next card is fed in from the hopper.
When the controller activates the Record Emitter signal, we begin a read cycle. The twelve photocells in the read station that look for holes in the card are set up just before each card column would come under the photocells. As we reach each column we generate a 55 microsecond pulse on Read Emitter.
I set up a sample card image so that the photocells will be lit for each card column where a hole would be punched. It is a single fixed value, but if this works I can add in support for sending card images over the serial USB link, as well as the ability to turn on Hopper Empty to test out the behavior of the controller in that case.
When Hopper Empty is raised after having read cards, the controller makes the reader Not Ready. Adding cards (so that the Hopper Empty goes away), then pushing the Start button will resume reading. If instead of turning off Hopper Empty, one simply pushes the Start button, it sets up the Last Card condition and makes the reader ready again. The next read will complete and the Last Card bit will be set in the Device Status when read by an XIO Sense Device.
No comments:
Post a Comment