Packaging Machinery Programming Archives | DMC, Inc. https://www.dmcinfo.com/our-work/category/industry/packaging-machinery-programming/ Mon, 08 Sep 2025 19:48:11 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.3 https://cdn.dmcinfo.com/wp-content/uploads/2025/04/17193803/site-icon-150x150.png Packaging Machinery Programming Archives | DMC, Inc. https://www.dmcinfo.com/our-work/category/industry/packaging-machinery-programming/ 32 32 Glue Inspection Vision System For Packaging Industry https://www.dmcinfo.com/our-work/glue-inspection-vision-system-for-packaging-industry/ Mon, 03 Feb 2025 00:00:00 +0000 https://www.dmcinfo.com/our-work/glue-inspection-vision-system-for-packaging-industry/ DMC specified machine vision hardware and programmed a custom real-time application to perform high-speed inspection of complex folding cartons. Folding cartons for products like beverage carriers often require many folds, flaps, and complicated glue patterns. The cost of an improperly folded or glued carton can be high since the cartons are filled with bottles by […]

The post Glue Inspection Vision System For Packaging Industry appeared first on DMC, Inc..

]]>
DMC specified machine vision hardware and programmed a custom real-time application to perform high-speed inspection of complex folding cartons. Folding cartons for products like beverage carriers often require many folds, flaps, and complicated glue patterns. The cost of an improperly folded or glued carton can be high since the cartons are filled with bottles by an automated production line. The packaging company is liable for any downtime or broken bottles caused by a bad carton.

Machine Vision Hardware

Since DMC’s customer wanted to package the inspection system and incorporate it into their existing packaging line, keeping hardware costs low was a priority. DMC and the customer created a custom real-time PC from standard components and installed the LabVIEW Real-Time operating system to run the application. Each GigE camera is connected to a dedicated network adapter. Inputs on the PCIe-8255R FPGA card connect to encoder and trigger signals from the packaging machine. FPGA outputs control the cameras and lights.

Image Acquisition and Results Tracking

The glue is often applied in two or more stages, requiring multiple inspection stations. Due to machine components that block the view from a single camera, each station may comprise two cameras, up to a total of four cameras connected to one vision controller. Since the cartons may vary in size and length, a line scan camera acquires images of variable size. Line scan cameras also simplify lighting, since they require a single line of illumination rather than a large 2D area. A concentrated line light helps keep exposure times low, allowing for high-speed image acquisition.

Each carton passes a photoeye to trigger the camera(s). A program running on the FPGA tracks the trigger signal and encoder position. After the inspection system determines a pass/fail result, the FPGA sends an output signal at a specified position on the line to signal to the packaging system that the carton is good. The packaging equipment rejects any carton that doesn’t have a pass signal. The timing diagram below illustrates the relative timing between the input trigger signal, image acquisition, pass/fail result determination, and output signal to the system.

User Interface

The customer uses an existing Windows application to configure their folding and gluing machines. The customer wanted to seamlessly integrate a user interface developed by DMC without requiring DMC to modify over their existing source code. To accomplish this goal, DMC developed a .NET application that is called by the existing application and covers a portion of the interface while it is active. The .NET application communicates with the LabVIEW Real-Time application via TCP messages to send configuration information down to the controller and to receive images (with result overlays) for display to the user.

Inspection Algorithm

The vision system checks the position of glue lines to verify proper glue application. The ideal glue positions and tolerances for each glue line are configurable per product (see the next section). The software creates a “Region of Interest” for each expected glue line. For each region of interest, the inspection algorithm verifies the following:

  • Glue is present
  • Glue starts within tolerance
  • Glue ends within tolerance
  • Glue width is within tolerance
  • Gaps in glue (for dot patterns) are smaller than the maximum tolerance

The system also checks that there is no glue found outside of an expected region. Usually, unexpected glue is a bad thing. In some cases, glue is tolerable in a certain region but not required. The system allows the user to create a region that is ignored.

The image below shows glue lines detected by the system (in yellow), surrounded by the “Region of Interest” for each glue line (in orange).

Inspection Configuration

The inspection system needs regions of interest defined to perform the inspection described above. To configure the ROIs, the user has two options:

  • Automatically “learn” ROIs based on several cartons
  • Manually configure ROIs and tolerances

Typically, for a new product, the user will use the “automatic learn” feature. The system analyzes several cartons and creates ROIs around the average glue positions. If the glue on the template cartons deviates too much from carton to carton, the learn process must be retried. After the automatic learn is complete, the user may tweak the auto-generated ROIs to fine-tune the inspection.

Users can save the inspection configuration with a user-defined “job-name.” In the future, if the customer runs the same glue pattern, they can reload the same configuration by selecting the job name from a list on the user interface.

Inspection Result Display

The real-time vision system transmits images with results markup to the .NET application to display inspection results to the user. The system stores the last ten pass and fail images for review by the user. The user can choose different image processing and overlay options to help them analyze the images and determine failure modes.

The image below illustrates a failed image with some analysis options enabled. Red highlighting indicates bad glue and failed ROIs. Glue found outside of an ROI is circled because sometimes a speck of glue is hard to see.

Conclusion

DMC combined our expertise in vision systems, LabVIEW development, and .NET development to create a powerful and highly flexible inspection system. DMC’s direct customer sells the glue inspection system as an add-on to their existing folding/gluing machines allowing for a competitive advantage over other companies that create packing machines. End-customer facilities all around the world have the system installed.

Learn more about DMC’s vision systems, LabVIEW development, and application development services.

The post Glue Inspection Vision System For Packaging Industry appeared first on DMC, Inc..

]]>
Automated Material Flow with B&R PLC and HMI https://www.dmcinfo.com/our-work/automated-material-flow-with-br-plc-and-hmi/ Thu, 18 Apr 2024 00:00:00 +0000 https://www.dmcinfo.com/our-work/automated-material-flow-with-br-plc-and-hmi/ The project consisted of three machines: Manual assembly station. Automated storage and retrieval system. Packaging station. DMC programmed each machine using B&R’s PC based PLC platform.  Each machine had its own Industrial PC running both Windows for the HMI and B&R’s Automation Runtime for the PLC. Operator interface was via MappView on a touch-screen panel […]

The post Automated Material Flow with B&R PLC and HMI appeared first on DMC, Inc..

]]>
The project consisted of three machines:
Manual assembly station.

  • Conveyor system with automatic buffering/transfers.
  • Data tracking using RFID readers and custom PLC logic.
  • Vision inspection for pass/fail of parts.
  • Automated reject handling based on pass/fail.
  • Operator interface station to perform manual intervention.

Automated storage and retrieval system.

  • Central buffer for all work in progress parts.
  • Storage and retrieval of radios accomplished via integration with robot arm.
  • Part data determined via RFID, data stored in custom database.
  • Parts delivered to and requested from buffer fully automatically with AMRs – no operator interaction needed.

Packaging station.

  • Robotic packaging system to place parts into boxes, place boxes onto pallets, strap pallets, and deliver to warehouse management system.
  • Automated conveyor infeed of parts, boxes, and other consumables.
  • Flexible assembly sequences based on needs of specific part.
  • Integration with WMS and MES systems for fully automated sequences.


DMC programmed each machine using B&R’s PC based PLC platform.  Each machine had its own Industrial PC running both Windows for the HMI and B&R’s Automation Runtime for the PLC. Operator interface was via MappView on a touch-screen panel PC. All PLC and HMI programming was done in Automation Studio, a text based IDE.

Material Flow on Robotic Pallet

Automation Studio files are text based and human readable. Because of this, DMC was able to use a full git based development workflow during both offline and onsite development. This included automated merging features created in parallel by different developers, as well as the ability to resolve merge conflict on a line-by-line basis. This allowed quicker development and higher quality code due to efficient code reviews.

DMC integrated a large variety of communication protocols and devices for the project. This included OPC UA, PROFINET, POWERLINK, X2X, zebra printers, SQL databases, and various systems for MES, AMR, and WMS communication.
 
The communication backbone for the MES, AMR, and WMS systems was OPC UA. B&R’s OPC UA forward platform allowed DMC to effectively communicate with all three systems via OPC server and client methods. Each of the tools automatically requests both work in progress parts from the buffer when needed as well as additional consumable materials when low. Once a part is completed in one tool, requests are automatically sent for AMR pickup at the tool output. These automatic requests for delivery and pickup increased the plant’s efficiency and don’t require operator intervention.

Robotic Arm Grabbing Material from Assembly line

To allow for efficient commissioning, DMC conducted extensive OPC UA method testing against a simulated MES environment before going onsite. This included simulated conveyor data transfers, part tracking, and failure conditions. Once onsite, DMC implemented extensive logging for OPC interactions to assist in debugging unexpected behavior. This logging was available to plant operators via the HMI, allowing DMC to quickly close the loop without having to manually go online with the system.

Overall, our expertise in B&R programming, OPC UA, and MES Integration led us to successfully provide the client with an automated assembly line system that allows the client to respond to changes easily.

Learn more about our PLC Programming expertise and contact us for your next project. 

The post Automated Material Flow with B&R PLC and HMI appeared first on DMC, Inc..

]]>
Adapting to the Coronavirus Pandemic: Remote Installation of Upgrades to an Automated Mixing Plant https://www.dmcinfo.com/our-work/adapting-to-the-coronavirus-pandemic-remote-installation-of-upgrades-to-an-automated-mixing-plant/ Tue, 28 Apr 2020 00:00:00 +0000 https://www.dmcinfo.com/our-work/adapting-to-the-coronavirus-pandemic-remote-installation-of-upgrades-to-an-automated-mixing-plant/ Why DMC The customer needed experienced Siemens PLC programmers to implement additional features to a pilot program that DMC had previously developed for the client. The customer chose DMC because of our success with the pilot system development, our deep knowledge of Siemens PLC programming, and our previous experience with their plant software infrastructure. The […]

The post Adapting to the Coronavirus Pandemic: Remote Installation of Upgrades to an Automated Mixing Plant appeared first on DMC, Inc..

]]>
Why DMC

Siemens SIMATIC S7-1500 PLCThe customer needed experienced Siemens PLC programmers to implement additional features to a pilot program that DMC had previously developed for the client. The customer chose DMC because of our success with the pilot system development, our deep knowledge of Siemens PLC programming, and our previous experience with their plant software infrastructure.

The customer first contacted DMC regarding the possibility of adding quality of life and “nice to have” features on their recently installed pilot system. The customer had a long wish list of items and a very limited budget, so DMC’s first task was to assess which features could be completed within the budgeted time and provide an accurate estimate to the client.

The client responded with their full list of features in order of priority and asked DMC to complete as much of the list as possible before the budget ran out. 

COVID-19 Impact

During the early stages of development, the Coronavirus pandemic hit the US, and DMC began working remotely, which added a significant obstacle to the planned onsite installation. After discussing options with the client, we decided to try installing software updates remotely on a weekly schedule.

We quickly found that the remote installation was very simple to execute thanks to tools like Microsoft OneDrive, which allowed us to share the updated project files with the client, and Zoom Meetings, which we used to remotely take control of the plant’s computer and download to the PLC.

Additionally, we found that the weekly schedule minimized system downtime by allowing the client to incrementally test the updates as DMC continued development and made tweaks to existing features to install during the next remote session. 

During the current COVID-19 situation, DMC is still open for business and exceeding expectations while working remotely. 

Learn more about DMC’s Remote Industrial Automation solutions and our Siemens expertise. Contact us for any inquiries. 

The post Adapting to the Coronavirus Pandemic: Remote Installation of Upgrades to an Automated Mixing Plant appeared first on DMC, Inc..

]]>
Italian “Industry 4.0 National Plan” Implementation for Packaging Line https://www.dmcinfo.com/our-work/italian-industry-4-0-national-plan-implementation-for-packaging-line/ Thu, 11 Jul 2019 00:00:00 +0000 https://www.dmcinfo.com/our-work/italian-industry-4-0-national-plan-implementation-for-packaging-line/ DMC’s client was adding a packaging line to their facility and requested Siemens Automation hardware. Because the machine builder primarily built their machines with Allen Bradley hardware, DMC was brought in to provide support for the startup process. Under the Italian Industry 4.0 National Plan, companies are encouraged to invest in Industry 4.0 technologies through […]

The post Italian “Industry 4.0 National Plan” Implementation for Packaging Line appeared first on DMC, Inc..

]]>
DMC’s client was adding a packaging line to their facility and requested Siemens Automation hardware. Because the machine builder primarily built their machines with Allen Bradley hardware, DMC was brought in to provide support for the startup process.

Under the Italian Industry 4.0 National Plan, companies are encouraged to invest in Industry 4.0 technologies through tax incentives. Investment costs are increased by 150% of their value through Hyper Amortization, and 40% through Super Amortization. The goals here are to support Italian companies when they make tangible investments in technological and digital transformation.

The scope of work for which DMC was primarily responsible consisted of four machines on the packaging line. Each machine had its own PLC. DMC was tasked with ensuring that the communication with the Wonderware MES system was compliant with the Industry 4.0 National Plan requirement under the Hyper Amortization category.

To achieve this compliance, DMC developed a library to be used across all machines. The functionality of the library was to aggregate all of the relevant machine data, process and format it into the correct data structures, and to send that data on to the Wonderware MES system as well as pass commands from the Wonderware MES system down to the machine. The library developed was flexible enough to be used on the vastly different machines while still ensuring that the proper data was passed between the machines and the higher-level system.

DMC was a natural fit for this role due to our familiarity with this customer’s code, our experience working with and programming in the Siemens and Aveva environments, and our background in using the PackML architecture on packaging lines, as this was the basis for the Industry 4.0 National Plan requirement in this application. Ultimately, the solution provided met all of the customer’s and the Italian government’s requirements for Hyper Amortization.​

Learn more about DMC’s work in the Packaging Machinery industry, Food and Beverage industry, and our partnership with Siemens. Contact us for any assistance regarding PLC Programming and MES Systems.

The post Italian “Industry 4.0 National Plan” Implementation for Packaging Line appeared first on DMC, Inc..

]]>
Function Block Diagram Programming for Plasma Treater https://www.dmcinfo.com/our-work/function-block-diagram-programming-for-plasma-treater/ Wed, 03 Apr 2019 00:00:00 +0000 https://www.dmcinfo.com/our-work/function-block-diagram-programming-for-plasma-treater/ The client reached out to DMC for aid in developing code for a plasma treater used in the creation of cardboard beverage containers. The client’s programming standards documentation specified the need to implement all code in Function Block Diagramming (FBD). As a result, DMC programmed both the standard operational logic and safety logic using FBD.  […]

The post Function Block Diagram Programming for Plasma Treater appeared first on DMC, Inc..

]]>
The client reached out to DMC for aid in developing code for a plasma treater used in the creation of cardboard beverage containers. The client’s programming standards documentation specified the need to implement all code in Function Block Diagramming (FBD). As a result, DMC programmed both the standard operational logic and safety logic using FBD. 

FBD is a method of programming that compartmentalizes and hides code within boxes called function blocks. These function blocks display only the inputs and outputs of the compartmentalized function and can be implemented repeatedly throughout a larger program.

Benefits of using FBD code:

  • Function blocks can be more intuitive for those with electronic/computer science background as FBDs are comparable to logic gates
  • FBDs be much more compact than a ladder for logic with lots of components
  • FBDs allow for compartmentalizing complex code into a simple visual block
  • FBDs enable users to modify repeated code within blocks only once; changes to a function block propagate to all instances of the function block

Drawbacks of using FBD code:

  • FBDs can be unfamiliar, and therefore more confusing, for developers or maintenance staff as ladder is generally a more commonly-used programming language
    • NOT nodes are especially small and can be easy to overlook
  • Compared to ladder, FBD can be less intuitive for those with electrical backgrounds as ladder logic is based on circuit diagramming for relay logic
  • Like Ladder Logic, FBDs don’t support complex math sequences or functions
    • Structured text is more useful for this
    • With that said, structured text is supported when programming in FBD

“AND” and “OR” Operations in Ladder Logic vs. FBD

FBD vs ladderFBS vs. Logic

In addition to programming in FBD, other considerations DMC took into account were:

  • I-Device communication
  • Safety programming

The plasma treater we were programming was only one step in a much larger operation. As a result, the treater’s PLC served as a slave to a master PLC that controlled the overall system process. DMC configured I-Device Communication between the two units utilizing a PNP coupler to allow signals to pass from slave to master and vice-versa.

The plasma treater project marked the first time DMC’s clients had utilized failsafe logic in their products. DMC was able to provide insight on best safety practices and Siemens-specific safety concepts to our clients. Specifically, DMC successfully incorporated logic that allowed for safety bypass modes when the plasma treater needed to undergo maintenance.

Learn more about DMC’s work in the Food and Beverage Industry and our Manufacturing Automation and Intelligence Services.

The post Function Block Diagram Programming for Plasma Treater appeared first on DMC, Inc..

]]>
PackML CPG Template State Machine Implementation for High-Speed Packaging Machine https://www.dmcinfo.com/our-work/packml-cpg-template-state-machine-implementation-for-high-speed-packaging-machine/ Tue, 21 Feb 2017 00:00:00 +0000 https://www.dmcinfo.com/our-work/packml-cpg-template-state-machine-implementation-for-high-speed-packaging-machine/ DMC was asked to rewrite code from an older version of a packaging machine using a CPG Template for the PackML State Machine. In this machine, product was introduced through an infeed system and moved through two wrapping layers to an outfeed system. The new machine incorporated more servos, the variable package size functionality, and […]

The post PackML CPG Template State Machine Implementation for High-Speed Packaging Machine appeared first on DMC, Inc..

]]>
DMC was asked to rewrite code from an older version of a packaging machine using a CPG Template for the PackML State Machine. In this machine, product was introduced through an infeed system and moved through two wrapping layers to an outfeed system. The new machine incorporated more servos, the variable package size functionality, and an updated HMI. Due to these new features and the request to use the PackML CPG template, a direct translation from the old packaging machine would not meet all of the requirements of the customer.

One feature of PackML that makes it useful across many systems is its flexibility. The CPG template allows for the customization of the PackML State Machine in a way that makes sense for this particular application. By using tools and resources such as the Siemens PackML Implementation Guide and Planning Spreadsheets, the user can easily create the structure for a unique state machine project. For example, the PackML structure can accommodate up to eleven modes and seventeen states, however, DMC determined that only three modes containing eleven states each were necessary for this implementation. In addition to using the PackML architecture, DMC took advantage of the CPG template’s built-in features such as event handling and OEE data.

In order to ensure that the state machine was operating as expected, DMC used iDevice to communicate between the PLC and the motion controller. DMC chose iDevice to handshake the necessary data between the two devices because only a few bytes of data needed to be shared and it allowed for fast transfer speeds.

The solution was designed to conform to the ISA TR88 standard and simultaneously maintain some similarity to the old program in order to make the operator transition as seamless as possible. By using the PackML State Machine, DMC was able to create a flexible, easily modifiable, and robust solution that can be incorporated into many different systems and is familiar to individuals working with the old version of the machine.

The post PackML CPG Template State Machine Implementation for High-Speed Packaging Machine appeared first on DMC, Inc..

]]>