Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
AUTOMATED PACKAGING SYSTEM
Document Type and Number:
WIPO Patent Application WO/1998/021100
Kind Code:
A1
Abstract:
An automated packaging system receives a serial stream of bag stock. Positions of the bag stock within the packager are sensed automatically via an optical sensor. When in position, each bag is sequentially opened and filled with a preselected amount of product. The bag is then sealed and the next bag used. The system is adapted for use in processing or storing foods by providing for a flush of each bag with a selected gas, such as nitrogen. The system is also combinable with a custom labeler or bag printer which provides indicia on the bag associated with the product disposed therein.

Inventors:
YISHA RICHARD W
LATHEM JOHN L
LEONARD DENNIS F
LATHAM LAURA K
Application Number:
PCT/US1997/020897
Publication Date:
May 22, 1998
Filing Date:
November 14, 1997
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
I D IMAGES INC (US)
International Classes:
B41J11/00; B65B5/04; B65B25/00; (IPC1-7): B65B43/26
Foreign References:
US4689937A1987-09-01
US5048266A1991-09-17
USRE32963E1989-06-27
US4798042A1989-01-17
Attorney, Agent or Firm:
Jaffe, Michael A. (Friedlander Coplan & Aronoff LLP, 2300 BP Tower, 200 Public Squar, Cleveland OH, US)
Download PDF:
Claims:
Having thus described the invention, it is now claim
1. ed: An automated packaging system comprising: means adapted for receiving a serial stream ofassociated bag stock compnsing a plurality of associated bags; means adapted for receiving associated articles for packaging; a bag registration sensor means adapted for optically sensing a position of each associated bag as it approaches a selected position; means adapted for generating a bag position signal in accordance with an output of the optical sensor means bagopening means for adapted for selectively opening bags in accordance with the bag position signal; a bagopen sensor means adapted for sensing successful opening of a series of associated bags by the bagopening means; means adapted for placing a selected quantity of associated articles into each of a plurality of associated bags; and sealing means for sealing each associated bag after placement of associated articles therein.
2. The automated packaging system of claim 1 wherein the sealing means is comprised of a heated element, and wherein the system further comprising a temperature sensor operatively connected to the heat element for generating a signal representative of a temperature thereof.
3. The automated packaging system of claim 2 further comprising means adapted for sensing a selected amount of product corresponding to a content of a single associated bag.
4. The automated packaging system of claim I further comprising means for generating a printed label associated with each associated bag.
5. The automated packaging system of claim 1 further comprising means for applying printing to a surface of each associated bag.
6. A method of automated packaging system comprising the steps of: receiving a serial stream of associated bag stock comprising a plurality of associated bags; receiving associated articles for packaging; optically sensing a position of each associated bag as it approaches a selected position; generating a bag position signal in accordance with an output of the optical sensor means selectively opening bags in accordance with the bag position signal; sensing successful opening of a series of associated bags by the bagopening means; placing a selected quantity of associated articles into each of a plurality of associated bags; and sealing, via a heater element, each associated bag after placement of associated articles therein.
7. The method of automated packaging of claim 6 further comprising the step of generating a signal representative of a temperature of the heater element.
8. The method of automated packaging of claim 7 further comprising the step of sensing a selected amount of product corresponding to a content of a single associated bag.
9. The method of automated packaging of claim 6 further comprising the step of generating a printed label associated with each associated bag.
10. The method automated packaging of claim 6 further comprising the step of applying printing to a surface of each associated bag.
Description:
AUTOMATED PACKAGING SYSTEM Background of the Invention The subject application is a continuation-in-part of co-pending U.S. Patent Application Serial No.08/650,861, filed May 20, 1996, the contents of which are incorporated herein by reference.

This application pertains generally to the art of packaging and more particularly to the art of packaging small quantities of product, and will be described with particular reference thereto. However, it will be appreciated that the invention has broader applications, such as providing an inexpensive means by which either articles or foodstuffs may be packaged in small quantities.

There is a large market for small quantities of packaged goods. Such articles stem from golf tees, fasteners, seeds, and the like. More recently, there is growing need for prepackaged foodstuffs that are prepared on or close to the premises from which they are to be sold.

Conventional, automated baggers would be prohibitably complex to operate, as well as entail an inordinately prohibitive expense and require prohibatively expensive floor spacc. Further, preparation of foodstuffs requires equipment that is capable of providing packaging that is sufficient to maintain the required sanitary and freshness requirements.

The subject application overcomes the above-referred problems, and others, and provides an inexpensive, compact and easy to operate packaging system which is readily customizable for a plurality of runs of goods to be packaged therein.

Summary of the Invention In accordance with the present invention, there is provided a modular packaging system which incorporates a means for receiving a serial stream of bag stock. An optical sensor senses position of bags from the stock as it approaches a selected filling area. The bag is then opened by application of an air pulse, after which time a preselected amount of product is placed inside. A sealing mechanism seals the bag and a cutting mechanism severs it from the stock. A bag- open sensor functions to verify that a bag is in fact open before product is placed therein. A safety sensor minimizes potential injury to extremities in the area approximate to the bagger.

In accordance with another aspect of the present invention, a printer is provided for use with the foregoing to allow for customized printing of labels and/or bags of the bag stock corresponding to the contents disposed therein.

In accordance with yet a further aspect of the present invention, there is provided a means by which specialized gases are introduced into the bag interior prior to sealing which is particularly suited for foodstuffs.

In accordance with yet a further aspect of the present invention, a plurality of bagger ID numbers is correlated with each of several types of bags and/or labels to be implemented in the bagging process. Thus, multiple baggers are facilitated to be run from a single controller.

An advantage of the present invention is the provision of a modular, compact, inexpensive and flexible system for bagging small quantities of product.

Another advantage of the present invention is the provision of a bagger which is acceptable for use in connection with foodstuffs.

Yet another advantage of the present invention is the provision of a bagger that minimizes product waste by incorporating a bag-open sensor prior to attempting to fill a bag with product.

Yet another advantage of the present invention is the provision of a bagger with operator safety features to lessen opportunity for physical injury to human operators.

Still other advantages and benefits of the invention will become apparent to those skilled in the art upon a reading and understanding of the following detailed description.

Brief Description of the Drawings The invention may take physical fon in certain parts and arrangements of parts, a preferred embodiment and method of which will be described in detail in this specification and illustrated in the accompanying drawings which forum a part hereof, and wherein: Figure 1 is a diagram of the novel bagger mechanism, combined with a label or bag printer mechanism, of the subject invention; Figure 2 is a functional block diagram of the bagger unit of the subject invention; Figure 3 is a state diagram for the logic associated with a sealing mechanism of the subject bagger mechanism; Figure 4 is a state diagram ofthe logic associated with the bag incrementing operation of the subject invention; Figure 5 is a state diagram ofthe logic for a complete bagging operation ofthe subject invention; Figure 6 is a state diagram of the logic associated with the bag-open sensor operation of the subject invention; Figure 7 is a state diagram of a safety mechanism for stopping operation of the subject bagger mechanism in the presence of an error signal; Figure 8 is a flow chart detailing the feeder mechanism of the subject invention; Figure 9 is a schematic diagram of the front panel display of the subject bagger mechanism; Figure 10 is a schematic diagram of an operative portion of the main circuitry associated with the subject bagger mechanism; Figure 11 is a schematic diagram of an operative portion of the main circuitry associated with the subject bagger mechanism; Figure 12 is a schematic diagram of a further operative portion of the main circuitry associated with the subject bagger mechanism; Figure 13 is a schematic diagram of a further operative portion of the main circuitry associated with the subject bagger mechanism; and Figure 14 is a schematic diagram of a further operative portion of the main circuitry associated with the subject bagger mechanism.

Detailed Description of the Preferred Embodiment Referring now to the drawings wherein the showings are for the purposes of illustrating the preferred embodiment of the invention only and not for purposes of limiting same, Figure 1 illustrates a complete bagger and labeling system A which includes a bagger portion B and

a labeling portion C. Labels, or prepnnted bag stock 10 are output from the printer base unit 12 from an output slot 14. A control panel 16 provides for setup and control of operation of the labeler systcm C. The system is advantageously interfaced with a personal computer to allow for programming of label type, label content (or bag content for directly printing on the bag stock). The system C is suitably interfaced with a computer, and preferably a hand-held computer unit 20 which incorporates a keyboard 22 and a display 24. The computer 20 is advantageous insofar as it is inexpensive, portable, and relatively secure from environmental contamination. A suitable system for both the printer C, as well as the hand-held unit 20, is available from l.D. Images, Inc. of Strongsville, Ohio, assignee of the subject invention, and sold under the designation VISION T- 000 SYSTEM.

Tuming to the bagger portion B, a base unit 30 is shown with a labeled or printed bag 32 disclosed generally in a bagging area 34. It will be appreciated that the representative bag 32 may either be resultant from a label printed by the labeier C, or a preprinted bag wherein the bag stock itself is used to contain the relevant information. An air cylinder 36 is advantageously provided to secure opening ofthe bag, such as that illustrated with bag 32, for placing of contents therein. The figure also shows a hopper 36 to allow for placement of contents in the bag 32. A cutter 38 is a heated unit which will sever a bag from a row of bag stock being fed to the bagger B. There is also advantageously provided (not shown) an optical sensor for determining a position of a bag in the bagger area 34, and a bag-open sensor to verify that a bag is open prior to placement of the contents therein. Details of these particular items will be provided below. Also illustrated is a gas cylinder 44 which facilitates placement of selected gas in an interior of a bag, either as a flush or as a content preservative, prior to completion of a bagging operation.

Turning now to Figure 2, a block diagram of the bagger system B is provided. A microcontroller 50 forms the heart of the unit. The microcontroller is in data communication with a thermal couple 52 which is functionally inter-connected to the unit 38. The unit 38 also has connected thereto a heater wire 54 for cutting bag stock, which heater wire is in turn controlled by heater wire transformer 56. The heater wire transformer 56 is operatively controlled by the microcontroller 50. A serial port 58 is advantageously provided to facilitate input/output with microcontroller 50. A feeder interface 60 is also operatively connected to the microcontroller 50 and serves to control ingress of product during a bagging operation.

The microcontroller 50 is also advantageously provided with an infrared interface 64 to allow for a cable-free connection for data interchange with exterior devices. In control panel 42 (Figure 1) suitably includes a front panel display 66, front panel switches 68, and front panel light emitting diodes ("LEDs") 70, each of which is in data communication with the microcontroller 50.

A stepper motor 80 combined with a stepper driver 82 is also operatively connected to microcontroller 50 and functions to move bag stock through the base unit 30.

A cylinder position switch 84 is also operatively connected with microcontroller 50.

A seal bar safety switch 86 is functionally connected to the seal bar mechanism 38, which will be detailed below, and which functions to minimize human injury from possible exposure to an operating device.

A bag out sensor 90 is also operatively connected to microcontroller 50 and serves to provide a signal representative of exhaustion of existing bag supplies.

Solenoid drivers 92 works in concert with solenoids and cylinders 94 and operative control of the microcontroller 50. Each provide for a selective control of ingress of product into an

Intcnor of a bag. A bag-open sensor 96 provides a signal to the microcontroller 50 indicating whether a bag is sufficiently open to allow for placement of product therein, thereby minimizing associated waste. A bag bottom sensor 98 functions to determine a relative position of the bag bottom on the bagging unit C.

Figures 3 through 7 provide state diagrams associated with operation of the bagging mechanism as set forth in Figures 1 and 2, above. Particular operation logic will be detailed below in connection with the associated firmware written for the bagger unit.

Figure 8 illustrates a flow chart of the temperature control system associated with the bagger mechanism.

Figures 9-14 provide a detailed listing of the particular hardware used to implement the bagger mechanism of the preferred embodiment.

Further understanding of this hardware, as well as the associated state diagrams, will be best understood with reference to the particular firmware operation of the subject bagger mechanism, detailed as follows.

Bagger Modules and Functional Subsvstems The Bagger is advantageously provided in 3 physical modules for the Bagger plus a separate controller. The Bagger modules are: The Core Module, the Base Module, and the Electronics Module. The Bagger is also divided into functional subsystems for internal use. These functional subsystems are:

Structurai/Feedpath Subsvstem: This subsystem contains the structural side plates, aligning spacers to square the side plates, and the components are required to move the plastic bags through the Bagger.

Seaiine Subsvstem: This subsystem contains the components necessary to achieve a seal across the top of the bag. The major components are the stationary heater or seal bar that contains the resistive heating wire and the air cylinder actuated pressure bar that is brought in against the heater bar to maintain even pressure across the bag during deal.

Pneumatics Subsvstem: Contains the air cylinder for pressure bar motion, solenoids for the cylinder and air tubes that blow the bag open and keep it open, supporting components -- flow control, fittings, etc.

Rear Bag Subsvstem: Holds the roll of plastic bags out back of the machine, includes a danccr and weight for maintaining proper bag tension.

Electronic Subsystem: Includes the stepper motor for feeding the bags through the machine and reversing the bags to break the perforations to separate the bag after sealing, the transformer for powering the heater wire, wiring/cables, position switch for the safety feature on the pressure bar, etc.

Base Subsystem: Includes the plastic base, top and bottom support plates, rubber-tipped feet, accommodations for the electronics box and core, top cover, back cover, rear-hinged doors, and bezels that cover the openings for the front and side user interface areas.

Main Bagger PCB Subsystem: The main PCB that controls the Bagger plus all its components.

Front Panel PCB Subsvstem: Front panel PCB, components, and support structure that comprises the front user interface panel for the Bagger.

The Core Module The core is built around 3/8" thick cast aluminum side plates. The core consists of the Structural/Feedpath Subsystem, the Sealing Subsystem, the Rear Bag Subsystem, some pneumatics -- i.e., the main cylinder, and some electronics -- i.e., the stepper motor and pressure bar position microswitch. The core holds the roll of bags, feeds the plastic through the rollers (one of which is driven by the stepper motor), seals the bag, breaks the perforation on the bag to separate it from the bags remaining on the roll, and advances the plastic to the next bag. The core weighs under 30 pounds and measures approximately 10" high x 14" wide x 9" deep in the preferred embodiment. The core is installed into the base by sliding the core along core guides that are affixed to the Base Module. When the unit is all the way forward, the core is captured on front locating pins and the back end of the core is locked into place by a spring lever.

The Base Module The base is a rotational molded structure that houses the Core and the Electronics Modules. The Base Module includes the low-density high impact plastic base itself, plus support plates to distribute loads, support the feet, and align the Core Module. The Base Module also includes the pneumatics solenoid block and provisions to accept the electronics base. The base is

covered on top by a vacuum-formed accumulator tray that can hold product prior to bagging. The opening in the back of the base for the electronics box and pneumatics is covered by a vacuum- formed plastic back cover. There are hinged plastic doors that cover the opening in the base into which the Core Module is inserted. The Base Module comes equipped with the front panel user interface panel in place. The Base Module consists of the Base Subsystem, the majority of the pneumatics subsystem, and the front panel PCB subsystem. The base weights 20 pounds and is approximately 21" wide x 15" deep x 18" high.

The Electronics Module The Electronics Module consists of a fabricated steel enclosure that houses the Bagger proprietary PCB, a transformer, the stepper motor controller unit purchased with the stepper motor, a cooling fan, a 100-watt, 24-volt power supply, and power and other connectors. The electronics box weighs about 20 pounds and measures 10"x10"4.5" It is installed into the back of the base and is located by tabs attached to the base. Installing and removing the Electronics Module requires only electrical and pneumatic connectors to be mated or un-mated and then is easily installed or removed without tools.

The Controller There are several Bagger controller options: Controller This is the high end controller. The controller is based on the T-1000 product. The controller suitably consists of a T-1000 main PCB with the disclosed firmware plus an additional PCB called the T-1000 Daughtercard, of TIKDC,

available from l.D. Images, Inc. of Strongsville, Ohio, assignee herein. The Additional PCB allows for additional storage memory, and additional serial port, and infrared communications port, a parallel port, and will control a 240x64 pixel graphics LCD. The controller stores an unlimited number ofjobs (limited only by memory constraints-- up to 2MB). Each job consists of setting parameters for the Bagger. The plastic enclosure is suitably that which may be purchased from PacTec, LaFrance Corp. and accommodates a graphics display, a full alphanumeric keypad, and selected I/O ports on the custom back panel.

BT-1000 -- Mid-range controller available from l.D. Images, Inc. Has job storage capabilities.

BT-l6 -- Low-end controller available from l.D. Images, Inc. Use J-16 or T-l6 hardware with detailed herein firmware.

FIRMWARE DESCRIPTION Instruction Timine 11.0592 Mhz crystal utilized to make baud rates work out with minimum error.

Most instructions are 12 oscillator periods, so the nominal instruction time is 1.0851lS I S. (8.5% Error).

Determinin Timing The Periodic Interrupt from the DS 12887 should be used - 3.90625mS is suitable. This gives a slice granularity of 3.9 mS (256 Hz).

The Periodic interrupt increments a 16-bit tick value. If the interrupt is 3.9mS, time delays of up to 256 seconds (4.25 min) can be generated.

"Tasking" Model Based on a Queue structure, Cooperatively multi"tasked" Each "Task" is a state machine, with one state executing per timeslice.

Assumptions: 1. If the stepper is running at 1000 steps/second, the sensor needs to check for the perf only once per millisecond (or, once per timer tick).

2. Assume approx. 10 tasks during stepper movement.

Each Slice can be up to l00S (-1000 instructions). No slice should be longer than l00{tS in the preferred embodiment.

Tasks can be triggered by either a timeout, or an event. Semaphores will be defined to indicate event status.

System Block Each time through the main loop, the system block will run. This contains code that is not specific to any state, such as errors and polling code. The system block will run once per periodic interrupt, and be less than 100,uS if possible.

MODES These are the general states of the Bagger. Each state contains many substates.

IDLE Bag is open, Waiting for fill. Also, after powenip, but before the first cycle. Exited by either auto- timeout, cycle/footpedal, or external trigger. Bags can be jogged forward with the Feed button.

MOTION The Stepper is moving, advancing the bag. Shelf is up. Waiting for perfdetection. Stepper then steps to the load position.

SEAL The Stepper is stopped. Seal jaw moves in. Perf Breaker activiates, then deactivates. Dwell. Jaws open. Shelf Drops.

SYSTEM BLOCK The system block runs once per periodic interrupt, regardless of the State. The System Block takes care of housekeeping tasks that don't depend on a particular state.

STATE/SUBSTATE DISPATCHING Program flow is broken into main States, each with many substates. Each substate is broken into execution slices that execute in less than 1001us. This gives a loop structure, where the state and substate are determined, and the current execution slice is run. When each execution slice terminates, it sets up its next execution by setting a timeout value or an event. Every state is responsible for determining for itself when it is time to run. There is also a system-level block, which runs in every state. The system block runs once per periodic interrupt.

System-Level Global Information Periodic Interrupt The clock Periodic Interrupt ISR maintains a timer tick global value, which is 16 bits. If the Periodic Interrupt is 3.09ms (256 Hz), the 16 bit value gives 256 seconds (4.25 min) total delay that can be generated. The PISR must be as fast as possible to reduce the overhead of the interrupts. The PISR should also check the watchdog counter for a software watchdog function, described below.

Software Watchdog The PISR will also be used in conjunction with the main state loop to implement a software watchdog. Each time through the main state loop, the watchdog counter will be cleared. Each PISR will increment the counter. If the main state loop stops running, the counter will eventually reach the trigger value and the PISR should perform a reset. Since the Periodic Interrupt is 3.9mS, a value of 64 timeouts will give a watchdog period of 250mS.

Error Conditions There are two Error variables. One contains the state of any Critical Errors, and the other contains Non-Critical Errors. If a state exits to the Error state because of a critical error, it sets the Critical Error variable so that the Error State will know how to handle the error. Non-Critical errors are set so that an error monitoring state can keep track of them.

MASTER TASK LIST Task Name IDLE MOTION SEAL SYS BLK Heater Control n LCD Display n LED Updates n Air Pressure n Serial Port Commands n STOP Button n Pause Button n Board Temp n Software Watchdog n Power Down Mode n Heater Safety n Seal Dwell n Seal Timeout n Stepper Complete n Bag Bottom/Present n Bag Out n Bag Open n Load Button n Cycle Button n Footpedal n Pace Timeout n External Triggers n n n n IDLE STATE The idle state runs whenever the bagger is not sealing or moving plastic. While in idle, the bagger checks for the Cycle button, the Footpedal, the Pace Timeout, or an external trigger. The Pace Timeout is the timer used in automatic mode to run the next cycle without operator intervention.

There are two substates, Normal and Jog. The semaphore is (semldle) Normal (O): When the Cycle button, Footpedal, External trigger, or Pace timeout are detected, the idle State exits to the Seal State.

When the Feed button is detected, the Normal substate changes to the Jog substate.

Jov In this substate, the stepper is advancing the plastic. When the advance is complete, this substate returns to the Normal substate.

SEAL STATE The Seal State controls all aspects of sealing the bag. There are several substates in this state: JawStart, DrawerStart, JawWait, PerfStart, PerfWait, PerfStop, JawDwell, TrimStart, JawOpen, DrawerRetract, TnmStop. The Semaphores are (semSeal3 :semSeal2:semSeall :semSealO).

JawStart (0000): This substate starts closing the seal jaws.

DrawerStart (0001) This substate starts extending the Drawer JawWait (0010): This substate waits for the seal jaws to close. There is a timeout value so that if the seal jaws do not close, the bagger can detect an error. In addition, the Seal Bar Safety is monitored.

PerfStart (0011) Once the jaws are closed, the Perf Breaker is activated.

PertWait (0100): This substate waits for the perf breaker to complete.

PerfStop (0101): This substate stops the stepper.

JawDwell (0110): This substate waits for the seal jaw dwell timer to expire.

TrimStart (0111): This substate turns on the Trim Seal Blowoff solenoid.

JawOpen (1000): This substate starts reopening the seal jaws.

DrawerRetract (1001) This substate start retracting the shelf.

TrimStop (1010): This substate stops the Trim Seal Blowoff.

MOTION STATE This state controls the indexing of bags. Once a seal has completed, this state runs to present the next bag for filling. The following are the substates used: StepperStart, PerfWaitl, PerfWait2, Advance. The semaphores are (semMotion :semMotion0).

StepperStart (00): This substate starts moving the stepper.

PerfWaitl (01) This substate waits for the Bag Open sensor to detect the bag. If the bag is not detected before the stepper runout is exceeded, an error is returned.

PerfWait2 (10): This substate waits for the Bag Open sensor to lose detection of the bag (the bag has passed below the sensor). If the signal is not lost before the stepper runout is exceeded, an error is returned.

Advance (11): This substate advances the plastic to the load position by running a specified number of steps. When complete, the stepper is stopped and the Motion State exits to the Idle State.

ERROR STATE In the Error State, the machine is shut down (steppers are stopped, solenoids deactivated, etc), the error LED is flashed, and the error message is displayed on the LCD. In addition, the error number is set for the controller to read. When the error is cleared, the Idle State is entered.

SERIAL COMMUNICATIONS SPEC The communications between the bagger and the controller use an infra-red serial port which is IrDa- compliant. There is also a provision for a hardware serial port, should the need arise. On the bagger, both ports share the same hardware, so there is no difference in commands sent or received. The controller uses a different physical serial port for cable vs. IrDa mode.

Command Overview The command set for the bagger is terse, and the commands themselves are short in order to reduce the amount of data that must be sent. Since there may be several baggers controlled by the same controller, each bagger has a unique serial number that is present in every command to and from the controller. It is assumed that there is only one controller that can receive commands from any one bagger or group of baggers.

In order to reduce the chance that two baggers may attempt to transmit at the same time, all commands from the bagger to the controller are responses to a controller query. The controller is therefore responsible for polling the baggers periodically to see if a bagger has something to transmit. Note that errors are retrieved by a different poll than nominal status information.

Serial numbers are 16 bit, with 0xffff reserved for broadcast, giving 65535 possible serial numbers.

All commands are preceded by a barker byte, which is 0xAA.

All commands are three bit, with the other 5 bits indicating subcommands

Checksums are XOR checksums determined by XORing all data bytes (including the barker) with 0xFF.

Command Summary Commands From the Controller to the Banger Command Description Response Poll Check Bagger for Data Any Who Who's Online? Online Query RAM Ask for status information Query RAM Response Set RAM Set a parameter Ack Query NVRAM Ask for status information Query NVRAM Response Set NVRAM Set a parameter Ack Query SEM Ask for status information Query SEM Response Set SEM Set a parameter Ack Commands From the Bagger to the Controller Command Description In Response To ACK Acknowledge Poll or Command Poll or command NACK Negative Acknowledge Poll or command Query Response Response to a Controller Query Query Error Error Status Notification Error Request Online ~ Online Response Who

Command Detail Controller - > Bagger POLL Format Barker Poll Serial Lo Serial Hi Data | Checksum 10101010 OO0xxxxx ssssssss ssssssss xxxxxxxx | cccccccc Description This command is the poll from the controller to the bagger whose serial number is specified by 's' The bagger should respond either with an ACK or a command. The bagger should respond within 100 mS. Receipt of ACK or command by the controller resets the timeout counter for that bagger. Ifno response is received from a bagger for 30 seconds, the bagger is considered offline. The data parameter is unused.

WHO Format Barker Who Serial Lo Serial Hi Data Checksum 10101010 O0lxxxxx 11111111 11111111 xxxxxxxx cccccccc Description This command is the request from the controller to new baggers which are not online. Any baggers which are not online should respond with the ONLINE response

after a random time interval. This will help reduce collisions. The data parameter is unused.

QUERY Format Barker Query Serial Lo Serial Hi Data Checksum 10101010 010qqqqq ssssssss ssssssss xxxxxxxx cccccccc Description This command is a request from the controller for data from the bagger specified by the serial number 's' The bagger should respond to the request immediately.

The query value 'q' is the index into the baggers internal RAM. This query retrieves a raw value from memory. The data parameter is unused SET Format Barker Set Serial Lo Serial Hi Data Checksum 10101010 011 bbbbb ssssssss ssssssss dddddddd cccccccc Description This command is a request from the controller to set data on the bagger specified by the serial number 's' The bagger should respond to the request with an ACK immediately.

The set value 'b' is the index into the baggers internal RAM. The data parameter specifies the value to set. The command sets a raw value directly into the baggers memory. Use with caution! RTCOUERY Format Barker Query Serial Lo Serial Hi Data Checksum 10101010 100qqqqq ssssssss ssssssss xxxxxxxx cccccccc Description This command is a request from the controller for data from the bagger specified by the serial number 's' The bagger should respond to the request immediately.

The query value 'q' is the index into the baggers Real-Time-Clock NVRAM.

The indexes are offset by 0xE, so that a 'q' value of zero requests byte 0xE. This query retrieves a raw value from memory. The data parameter is unused.

RTCSET Format Barker Set Serial Lo Serial Hi Data Checksum 10101010 101bbbbb ssssssss ssssssss dddddddd cccccccc Description This command is a request from the controller to set data on the bagger specified by the serial number 's' The bagger should respond to the request with an ACK immediately.

The set value 'b' is the index into the baggers Real-Time-Clock NVRAM.

The indexes are offset by OxE, so that a 'b' value of zero sets byte OxE. The data parameter specifies the value to set. The command sets a raw value directly into the baggers memory. Use with caution! SEMOUERY Format Barker Query Serial Lo Serial Hi Data Checksum 10101010 I I Oxxxxx ssssssss ssssssss qqqqqqqq cccccccc Description This command is a request from the controller for data from the bagger specified by the serial number 's' The bagger should respond to the request immediately.

The data value 'q' is the index into the baggers Semaphore List in RAM.

This query retneves a raw value from memory. The query parameter is unused.

SEMSET Format Barker Set Serial Lo Serial Hi # Data | Checksum 10101010 111xxxxb ssssssss ssssssss dddddddd cccccccc Description This command is a request from the controller to set data on the bagger specified by the serial number 's'. The bagger should respond to the request with an ACK immediately.

The data value d' is the index into the baggers Semaphore List in RAM. The bit 'b' specifies whether to set or clear the semaphore. The command sets a raw value directly into the baggers memory. Use with caution!

Bagger ->Controtler ACK Format Barker ACK Serial Lo Serial Hi | Data I Checksum 101 0101 0 O00xxxxx ssssssss ssssssss | 00000000 cccccccc Description This command is an acknowledge from the bagger specified by the serial number 's' to the controller.

NACK Format Barker NACK Serial Lo Serial Hi Data Checksum 10101010 001xxxxx ssssssss ssssssss 00000000 cccccccc Description This command is an negative acknowledge from the bagger specified by the serial number 's' to the controller.

OUERY Response Format Barker Query Serial Lo Serial Hi Data Checksum 10101010 010qqqqq ssssssss ssssssss dddddddd cccccccc Description This command is the response from the bagger specified by the serial number 's' The requested data is the byte(s) specified by parameter 'd' The valid query request types are the same as those for the QUERY command.

Error Response Format Barker Error Serial Lo Serial Hi Data Checksum 10101010 011qqqqq ssssssss ssssssss dddddddd cccccccc Description This command is an error condition report from the bagger specified by the serial number 's' The Critical Error number is specified by 'q', and the Minor Error Is specified by 'd'

ONLINE Format Barker Online Serial Lo | Serial Hi | Data | Checksum 10101010 100xxxxx ssssssss ssssssss 00000000 cccccccc Description This command is a the response to the WHO command. If the controller receives this response, it will poll the bagger for an ACK. This puts the bagger online. The Data field is unused, but included to keep all messages the same size.

RTCOUERY Response Format Barker | Query Serial Lo Serial Hi I Data Checksum 10101010 101qqqqq ssssssss ssssssss dddddddd cccccccc Description This command is the response from the bagger specified by the serial number 's' The requested data is the the byte(s) specified by parameter 'd' The valid query request types are the same as those for the RTCQUERY command.

SEMOUERY Response Format Barker Query Serial Lo Serial Hi Data Checksum 10101010 110xxxxb ssssssss ssssssss dddddddd cccccccc Description This command is the response from the bagger specified by the serial number 's' The requested data 'b' is the the semaphore specified by parameter 'd' The valid query request types are the same as those for the SEMQUERY command.

APPLICATIONS Start Sequencine Each bagger is responsible for maintaining its own online state. Online is defined as the controller and bagger maintaining communications. Ifeither the bagger or controller fails to respond to the other for more than 30 seconds, the status changes to offline. To reestablish online status, or to establish the initial online status on power-up, the following sequence is used: Once every few seconds, the Controller sends (as part of the polling sequence) the WHO command, which asks for new units to identify themselves. Any units which know themselves to be offline should perform a random delay, then respond with the ONLINE command. If the controller successfully receives the ONLINE command, it will immediately send a POLL to the unit to verify the serial number. Once the bagger ACKs the poll, the unit is considered online.

SYSTEM BLOCK The System Block contains subtasks that are not specific to any task. This code checks a semaphore once every main loop, so it runs once per periodic interrupt. The subtasks contained in the system block are: Heater Control LCD Display LED Updates Air Pressure Serial Port Commands Bag Out STOP Button Pause Button Board Temp Software Watchdog Power Down Mode Feeder Interface A brief description of each follows: Heater Control

The heater is PWM controlled, and has a thermocouple via A/D for feedback. The Heater Control subtask should convert the temperature, check it against the temperature set point. If necessary, the PWM pulse widths are adJusted.

LCD Display The LCD Display has a dedicated memory block of 16 bytes set aside to contain the information that should be displayed. When a task wants to display something, it should put the data into the display buffer, and set the LCD semaphore. The LCD display subtask checks for the semaphore, and if set, displays the data.

LED Updates The LEDs are controlled by semaphores that indicate whether the LED is off or on, and whether it should be steady on or blinking. Ifblinking, a timeout value is used to determine timing.

Air Pressure The two air pressure sensors are checked periodically lo make sure enough air pressure is present. The pressure sensor values are read via the A/D converter. The value is checked against the threshold when the motion state starts up.

Serial Port Commands Serial port commands are received and pre-processed by an ISR. Once a complete command is received, a semaphore is set. This task checks the semaphore, and if set, processes the command.

STOP Button Pause Button These sensors are all digital inputs. The state of each should be read, and if active, stored in a semaphore. Note: The semaphore should not be cleared if the sensor/button is not active. The task that handles the event should do that. This prevents having events too short to detect.

Board Temp The Board Temperature sensor is a digital sensor used to monitor the ambient temperature inside the electronics enclosure. The value is read, stored, and compared to the alarm threshold. If above the alarm, the alarm semaphore is set.

Software Watchdog The periodic interrupt increments the watchdog once per interrupt. The software watchdog clears the watch dog counter once per cycle. If the value gets too large, it indicates that the System Block is not executing, and the system is reset.

Power Down Mode The periodic interrupt increments the Power Down timer. Every time a cycle is completed, it clears the value. This task checks the value, and if too large, sets the power down semaphore.

Feeder Interface This subtask intcrprets the vanous status semaphores, and runs the feeder interface code.

This code is not yet defined.

BAGGER I/O MAP ID Description Address (A0-A3) /BIO0 LED Latch O (0000) /BIO1 Switches 1 (0001) /BIO2 Solenoids 2 (0010) /BIO3 Solenoid Status 3 (0011) BIO4 A/D Converter 4 (0100) /BIO5 Real Time Clock 5 (0101) /B106 Digital Inputs 6 (0110) /BIO7 AC Control 7 (0111) /BI08 Feeders In 8 (1000) /BIO9 Feeders Out 9 (1001) Reserved F (1111)

BAGGER MEMORY MAP This is the memory map for the built-in Flash ROM area Origin Description Vector 0x00 Powerup Vector main 0x03 External INTO vector RTCIsr OxOB Timer 0 vector TOISR 0x23 Serial port vector SerialISR 0x40 Main Code -- OxEFC Major Version Number -- OxEFD Minor Version Number -- OxEFE LCD Error Display Table Error Messages OxF9E Seal State Jump Table Seal Substates OxFDE Serial port Jump Table Serial Commands OxFFE Unit Serial Number --

This is the memory map for the built-in RAM area<BR> Add 0 1 2 3 4 5 6 7 Descr r<BR> 78<BR> 70<BR> 68<BR> 60<BR> 58<BR> 50<BR> 48<BR> 40<BR> 38<BR> 30<BR> 28<BR> 20<BR> 18<BR> 10<BR> 08<BR> 00 Stack Stack Stack Stack Stack Stack Stack Stack User Ram Stack Stack Stack Stack Stack Stack Stack Stack User Ram Stack Stack Stack Stack Stack Stack Stack Stack User Ram LCDBuff LCDBuff LCDBuff LCDBuff Stack Stack Stack Stack User Ram LCDBuff LCDBuff LCDBuff LCDBuff LCDBuff LCDBuff LCDBuff LCDBuff User Ram RampSteps LCDBuff LCDBuff LCDBuff LCDBuff User Ram to@aw Wait ToDwell0 toDwell1 toAD toDigTemp DigTemp TempSet BotSteps User Ram AirVal0 AirVal1 NitrVal0 NitrVal1 TmpSteps1 TmpSteps2 toPace0 toPace1 User Ram latFeedOut latFeedIn DigPotHi DigPotLo errCrit errMinor Blnk Val Temp Val User Ram Reload0 Reload1 latLED latSW latSol latSolStat latDig latAC User Ram Bit Addressable Sem0-7 LEDSem LEDBlink Sem18-1F Sem20-27 Sem28-2F Sem30-37 Sem38-3F Bit Addressable serRXBuff0 serRXBuff0 serRXBuff0 serRXBuff0 serRXBuff1 serRXBuff1 serRXBuff1 serRXBuff Register Bank 3 1 serTXBuff serTXBuff serTXBuff serTXBuff serTXBuff serTXLen serRXLen Register Bank 2 Register Bank 1 R0 R1 R2 R3 R4 R5 R6=TICK0 R7=TICK1 Register Bank 0

MEMORY MAP DESCRIPTION Variable Name Description ReLoadO Stepper Motor timer reload value lo byte ReLoad I Stepper Motor timer reload value hi byte latLED LED Latch write-thru byte latSW Switch Latch read-thru byte latSol Solenoid Latch write-thru byte latSolStat Solenoid status read-thru byte latDig Digital input latch read-thru byte latAC AC control latch write-thru byte latFeedOut I Feeder Latch write-thru byte latFeedln Feeder Latch read-thru byte DigPotHi PWM Frequency control value for the digital pot (pot 1) DigPotLo PWM Pulse Width control value for the digital pot (pot O) errCrit Value of the last Critical Error errMinor Value of the last Minor Error BlnkVal Blink counter for LEDs TempVal Temperature value AirValO Air Pressure Value Lo AirVall Air Pressure Value High NitrValO Nitrogen Pressure Value Lo NitrVall Nitrogen Pressure Value High TmpSteps l Stepper Motor countdown value Lo byte TmpSteps2 Stepper Motor countdown value Hi byte toPace0 Auto Pace rate timeout value Lo byte toPacel Auto Pace rate timeout value Hi byte toJawWait one byte timeout value for Seal Jaw toDwellO Seal Jaw dwell timeout value Lo byte toDwelll ~ Seal Jaw dwell timeout value Hi byte toAD A/D Conversion sample rate control toDigTemp Digital Thermometer timeout value - runs once per second DigTemp Raw value read from digital thermometer

TempSet Heater Temperature set point 0-15 BotSteps Number of steps that the Bag Bottom sensor must see the bag RampSteps Ramp Length R6=TICKO Low byte of the timer tick value. Incremented by each periodic interrupt R7=TICKI Hi byte of the timer tick value. serTXBuff Transmit buffer for the serial port serRXBuffO Receiver buffer used by the ISR to receive messages serRXBuffl Messages are copied into this buffer once complete serTXLen Number of chars already transmitted serRXLen Number of chars already received

SEMAPHORE MAP This is the map of RAM semaphores Name Value Descr semRTCBat 00 1 Set if RTC Battery is OK. Set by RTCInit semDigTemp 01 Set if Digital Thermometer is present. Set by DigTempInit semAD 02 Set if Switch 1 (Cycle) is pressed semCycleSW 03 Set if Switch 1 (Cycle) is pressed semStopSW 04 Set if Switch 2 (Stop) is pressed semPauseSW 05 Set if Switch 3 (Pause) is pressed semFeedSW 06 Set if Switch 4 (Feed) is pressed semFootSW 07 Set if Switch 5 (Footpedal) is pressed semHeatLED 08 Set to turn on Heat LED semErrorLED 09 Set to turn on Error LED semStopLED OA Set to turn on Stop LED semPauseLED OB Set to turn on Pause LED semCycleLED OC Set to turn on Cycle LED OD OE OF semHeatBLNK 10 Set to blink Heat LED semErrorBLNK 11 Set to blink Error LED semStopBLNK 12 Set to blink Stop LED semPauseBLNK 13 Set to blink Pause LED semCycleBLNK 14 Set to blink Cycle LED 15 16 17 semLCDDisplay 18 Set to cause LCD to display buffer semSerCMDIn 19 Set when a serial command has been received semSerCmdOut 1A Set to send a serial command semBagOutl IB Set when Bag Out 1 activates (Bags out) semBagOut2 1C Set when Bag Out 2 activates (Bags out)

semBagOpenl 1D Set when Bag Open I activates (Bag open) semBagOpen2 1E Set when Bag Open 2 activates (Bag open) semBagBottom I IF Set when Bag Bottom 1 activates (Bag Present) semBagBottom2 20 Set when Bag Bottom 2 activates (Bag Present) semOverTemp 21 Set if PCB temperature exceeds alarm threshold semStateO 22 Value of currently executing state, along with semStatel semStatel 23 Idle SO=O Sl=0; Motion S0=1 S1=0; Seal SO=O S1=1; semSysBlk 24 Set by RTC when System Block should run semADReady 25 A/D Conversion complete semADAdrO 26 Which A/D to perform semADAdrl 27 Which AID to perform sem MotionO 28 Determines Motion substate semMotionl 29 Determines Motion substate semidle 2A Determines Idle substate semAutoPace 2B Set by motion state if running in Auto Pace mode. Do not set directly! semSealO 2C Determines Seal State semSeal 1 2D Determines Seal State semSeal2 2E Determines Seal State semSeal3 2F Determines Seal State semTrim 30 Whether to use the Trim Seal Blow Off semError 31 Whether the error state is initializing or running semCheckAir 32 ~ Whether to check the Air Pressure Sensor semCheckNit 33 Whether to check the Nitrogen Pressure Sensor semDigTempO 34 Digital Thermometer substate semDigTempl 35 OO=SKIP ROM O1=CONVERT 10=READ 1 1=RESET semDigTemp2 36 semDigOverTemp 37 Set to enable PCB temp sensor semSetAutoPace 38 Set to enable Auto Pace on the next cycle semBagSensor 39 I=Bag Bottom sensor, O=Bag Open sensor semLastBottom 3A Set if a bag is in front of the sensor when motion starts

RTC MEMORY MAP Addr Name Default Description OO-OD Internal --- Real-Time-Clock interna! registers OE RTC~PACEO 00 Pace Rate timer reload value low byte (1/256 sec) OF RTC~PACE I 02 high byte (sec) 10 RTC~JOGO 00 Number of steps to jog - lo 11 RTC~JOG1 04 (hi) 12 RTC~SPEEDO 00 Timer o reload value - controls stepper speed (lo) 13 RTC~SPEED1 10 (hi) 14 RTC~PERFO 00 ~ Number of steps to break perf lo 15 RTC~PERFI 04 (hi) 16 RTC~DWELLO 00 Seal jaw Dwell time lo byte (1/256 sec) 17 RTC~DWELL1 01 high byte (sec) 18 RTC~MAXADVO 00 Max number of steps to advance if no perf detect lo 19 RTC~MAXADV I 08 (hi) IA RTC~RUNOUTO 80 Steps to advance from perf to load position lo IB RTC~RUNOUT1 00 (hi) IC RTC~RAMP 80 Number of steps to ramp at low speed ID RTC~STRIP 1 Number of bags to seal before breaking perf I E RTC~TEMP 00 Temperature set point IF RTC~LIFEO Life counter 4 byte 20 RTC~LIFE1 21 RTC LIFE2 22 RTC~LIFE3 23 RTC~JOBCTO Job counter 3 byte 24 RTC~JOBCT1 25 RTC~JOBCT2 BUS SEQUENCING A/D Convertor Uses B104 (Active High) = Address + /RD Put A/D Multiplexed Port Address on Data Bus Assert Start and ALE Deassert Start and ALE Conversion Runs Poll EOC for completion Put A/D I/O Address (Address 4) on Address Bus.

Assert /RD - B104 goes high Read Data Bus Deassert /RD to take B104 low Remove address from Address bus Real Time Clock Uses /BIO5 (Active Low)=Address Put RTC Multiplexed address on Data Bus Assert ALE Deassert ALE Put RTC I/O Address (5) on Address Bus

For Reads: Assert /RD Read Data Bus Deassert /RD For Writes Put Data on Data Bus Assert /WR Deassert /WR For Either: Remove Address from Address Bus Latch Writes /BIO0, /BIO2, /BIO7, /BIO9 (Active Low) = Address + /WR Put data on Data Bus Put I/O Address on Address Bus.

Assert /WR - BIOx goes low Deassert /WR to take BIOx high Remove address from Address bus For Latch Reads /BIO1, /BIO3, /BIO6, /BIO8 (Active Low) = Address + /RD Put I/O Address on Address Bus.

Assert /RD - BIOx goes low Deassert /RD to take BIOx high (it takes two reads to read a latch) Assert /RD - BIOx goes low Read Data Bus Deassert /RD to take BIOx high Remove address from Address bus

IRDA/SERIAL PORT Port Selection The Serial port can be selected to either the IrDA port, or the DB9 Connector. There are two serial port selection inputs: SERO, with is the jumper, and SERI, which is the microcontroller input. The Truth Table for the senal port is: for SERO, Jumper off 1 1 = IrDA for SERI, 1 = IrDA SERO SERI Selected Port 0 O Hardware (On) O 1 Hardware (On) l O Hardware (Off) I l IrDA (Off) IrDA Pin Definitions Front Panel Connector SER 0. This is the Power Down (/PDN) pin on the CS8130. A low on SERO disables the IrDA port.

. /RESET. This is driven by the Main Board Reset

/DTR. This is the D/*C (Data/*Command) pin. It is active from the Processor's DTR pin when IrDA is selected. It is high other vlse.

/CTS. This is the Form/Bsy output from the CS8130. It is an input to the processor.

RX. This is the Receive output from the CS8130.

TX. This is the Transmit to the CS8130.

IrDA Initialization parameters Value Port Parameters OB Control #1 Echo, enable TX and RX xx Control #2 defaults 22 TX Mode #1 IrDA, 3/16 bit pulses 36 TX Mode #2 Timed from start, 8 bits 43 Output Power Both LEDI and LED2 enabled xx Receive mode defaults xx Receive Sen ftl default sensitivity xx Receive Sen #2 default sensitivity xx Baud #1 default 9600 baud xx Baud #2 default 9600 baud xx @ Mod Div 111 default Modulator Divisor xx Mod Div #2 default Modulator Divisor xx Out Pin Ctrl default pin control xx Shadow Reg shadow off

POWERUP INITIALIZATION The following Is a list of the powerup initializ tion steps required.

Processor Internal Initialization: Setup Stack. Typically a 28 byte stack will suffice - set the stack pointer to 100. Stacks grow upward on the 8051. This will give enough stack space for 14 calls deep.

Setup Interrupts. Three interrupts are used: The serial port interrupt, the timer 0 interrupt, and /INTO. All interrupts can be at the same priority.

Setup Power Control. For 9600 baud, SMOD must be set. Neither power down mode is used.

Setup Timer 0. This timer is used to generate stepper motor timing. Mode 1(16 bit timcr) is used.

Setup Timer 1. This timer is used for Baud rate generation.

Setup Serial Port. The Serial port uses mode 1(8 bit UART).

External Initialization: Initialize On-Board Temperature Sensor Set Serial Port to IrDA Mode Initialize IrDA Encoder Set initial LED state - all LEDs off Initialize LCD display Turn Off all solenoids Turn Off stepper and stepper windings Turn On 24VDC Supply.

Turn On fan.

Turn On blower, if necessary.

Initialize A/D Converter Initialize RTC Turn Off heater Initialize Heater PWM control Turn off all feeder outputs Powerup Diagnostics Turn all LEDs on for a short period oftime to test.

Display some test pattern on the LCD display.

Hitch the stepper forward and backwards.

Read sensors and check for in-range data.

Check for solenoids connected, if possible.

Check for running clock and live battery.

PRESSURE SENSOR ALGORITHMS There are two types of control used in conjunction with the AiD converters. The Heat Control keeps the heater with a specified temperature range, and the Pressure filters are low-pass filters used to smooth the input and reduce the effect of surges in the air lines.

Pressure Filters: The pressure filters use an exponential filter to smooth the inputs to reduce false triggers due to pressure surges as solenoids trigger. The exponential filter is based on the May '96 Embedded System Programming article by Jack Crenshaw. The basic filter equation is X = Xo + K * (U - Xo) where X is the new filter output, Xo is the previous filter value, K is the gain, and U is the current input value. The C version is X += lfthe gain is a power of 2, for example 1/8, we can use X += (U-X)>>3 or, more clearly, X = Xo + ((U - Xo) > 3); To reduce the effect of lost precision when U and Xo are very close, we scale U and Xo by shifting up 8 bits. In our implementation, that means performing a 16 bit subtraction, Xo as a 16 bit value, and U as the high order bytes with a zero low byte. Here is a series on steps to use: I. Subtract (with borrow) the low byte of Xo from zero (the low byte of U).

2. Subtract (including the borrow) the high byte of Xo from U.

3. Shifl the two byte result three bits to the right.

4. Add this result to the original Xo.

5. The output value is the high byte of Xo.

This value can now be compared to the threshold to determine if low air pressure exists.

Note: This frequency response of this filter depends heavily on the sampling frequency. Our initial sampling frequency will be about 10 Hz. This means that frequencies below about 1.59 Hz. It also means that the Nyquist frequency is only 5 Hz. Thus, if the air pressure surges have frequency components above 5 Hz, They will be reflected in the output through aliasing. We may need to increase the sampling rate if this is the case.

HEATER CONTROL Test #1 07/11/96 3:06 PM With Gain Pot R29 at 50% PotHi PotLo Real Temp MD Value OxO0 OxDA 76 0x01 0x08 OxDA 76 0x01 0x10 OxDA 93 0x02 0x18 OxDA 93 0x02 0x20 OxDA 108 OxOE Ox30 0xDA 135 0x20 0x40 0xDA 150 0x2D 0x50 0xDA 170 0x30 0x60 OxDA 180 0x3B 0x70 OxDA 200 0x46 0x80 0xDA 210 Ox4E 0x90 0xDA @ 217 0x54 OxA0 0xDA 230 0x5A 0xB0 OxDA 234 0x60 0xCO OxDA 240 0x64 This shows the temperature and the temperature reading to be fairly linear. The slope of the A/D values is approx. 7. By adjusting the gain to get a slope of 8, a simple calculation can be used to translate the A/D reading into a set point from 0-15. The difference between the desired set point and the actual temperature is used to determine a new set point.

if S = Desired Set Point, X = Actual Temp, and Y = New Set Point, then Y = (S-X) + S, or Y = 2S - X

ERROR CODES Critical Errors These errors are considered critical or fatal. In some cases the machine will automatically restart when they occur. These instances are noted.

Critical Error # Minor Error # Description Restart 0 O No Error 1 O Bad State - Unused state was called u 2 0 Heat Safety 3 0 Seal Jaws didn't Close 4 O Bag didn't open on advanve 5 0 Low/No Air Pressure 6 0 Low/No Nitrogen Pressure 7 O Bag Out Minor Errors These errors are considered minor, and do not stop the machine. In all cases, the Critical Error number will be zero.

Minor Error # Description O No Error

ERROR DESCRIPTIONS Ready x Bagger is ready to cycle.

Seal Bar Safety x Something got in the way of the seal bar as it was closing.

Seal Bar Open x The seal bar did not close when it should have. This could be due to low air pressure, or a mechanical problem.

Bag Did Not Open x In Bag Bottom Sensor mode, this error means that the sensor never detected a bag. This could be due to the previous perf not breaking, or a bag jam.

x In Bag Open Sensor mode, this error means that the sensor never saw a bag open. This could be due to bags that weren't zung enough, or a bag jam.

No Air Pressure x The Air Pressure Sensor detected a low pressure condition.

No Nitrogen x If the optional Nitrogren Flush is enabled, this indicates that the Nitrogen pressure is low.

Out Of Bags x The Bag Out sensor detected that the machine is out of bags, either because the roll is empty, or because the bags broke behind the bagger.

PCB Overheated x This indicates that the electronics box temperature has exceeded the maximum safe limit.

Power Down Mode After 4 minutes of inactivity, the bagger powers down, which means that the Heater, Air Solenoids, and Stepper motor turn off.

STEPPER SPEED TABLES The stepper runs offofthe timer interrupt. The Interrupt rate is controlled by the timer reload value.

The reload value is a 16 bit value, and counts up. The interrupt occurs when the timer overflows.

The counter rate is 1/12 the oscillator frequency: f= 1/12 11.059 MHz= 0.9216 Mhz = 1.0851lS so the time between interrupts is t = (65536 - count) * 1.085,uS The gearing from the stepper to the roller is 1:2, and the roller diameter is 1 inch, circumference 3.1415 inches. The stepper has 200 steps/inch (1.90/step). One rotation of the stepper is one half rotation of the roller, or 1.57075 inches. So, 200 steps is 1.57075 inches, or one step is 0.00785 inches. Multiplying by the step rate gives the linear speed in inches per second. For example, an interrupt rate of IkHz yields a linear speed of 7.85ips.

Combining the above gives a formula for determining the reload value needed to achieve any linear speed. The formula is CT = 65536 - (7257.16/ IPS) where IPS is the speed in inches per second, and CT is the reload value.

T1000 DAUGHTER CARD I/O MAP Address XIO Description Number 2000 XIO0 IrDA - Serial port A on the UART 2100 XIOI AUX2 - Serial port B on the UART 2200 XI02 LPT - Parallel port on the UART 2300 XI03 ~ FPGI - Flash Page Select 1 2400 XI04 FPG2 - Flash Page Select 2 2500 XIO5 | FMA1 - Flash Control for Flash A 2600 XIO6 FMA2 - Flash Control for Flash A 2700 XI07 FMB1 - Flash Control for Flash B 2800 XI08 FMB2 - Flash Control for Flash B 2900 XIO9 FMCI - Control for the NVRAM 2A00 XIOA FMC2 - Control for the NVRAM 2B00 XIOB TSOUT - Touch Screen latch output 2C00 XIOC TSIN - Touch Screen latch input 2D00 LCDE0 LCDE0 - LCD enable pulse

FEEDER INTERFACE Outputs: <BR> <BR> <BR> RLYI <BR> <BR> <BR> Opt 1 Activates for 200 ms when the bagger transitions from MOTION to IDLE state RLY2 Opto2 Deactivates when IDLE, active otherwise RLY3 Opto3 Active during ERROR. Deactivates when READY RLY4 Opto4 Active when the bagger is READY. Deactivates when an ERROR occurs The foregoing firmware will be appreciated to allow for full realization of the functionality of the preferred embodiment.

The invention has been described with reference to the preferred embodiment.

Obviously, modifications and alterations will occur to others upon a reading and understanding of this specification. It is intended to include all such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.