PackML or Packaging Machine Language defines a standard for programming automated machines, maintained by OMAC (Organization for Machine Automation and Control). PackML is part of the OMAC Packaging Workgroup.
When developing PackML compliant state machines, engineers usually have to check compliance with the standard periodically during the design process. While standard solutions for PackML support include only a template for developing IEC 61131-3 code, MathWorks expands support for PackML compliance with an integrated way to design, simulate, and test PackML compliant machine control software that:
- Accelerates the creation by leveraging modeling templates
- Ensures compliance through static checks
- Targets different PLC platforms by using automatic code generation for IEC 61131-3 ST and ANSI/ISO C/C++
Templates for modeling PackML compliant state machines in Simulink and Stateflow
An additional user interface ensures that the model remains
- PackML compliant, meaning the state and transitions comply with the definitions in the standard
- Enabled for Simulation in Simulink, providing the developers the ability to perform early and incremental validation
- Testable – Simulink Design Verifier is used to generate coverage-based test cases for the model, Simulink Test is used to execute and manage the test cases
- Configured for automatic code generation, using Simulink Coder (C/C++) or Simulink PLC Coder (IEC 61131-3). The generated code conforms to PackTag and thus can be integrated seamlessly to other PackML compliant software.
Automated static checks ensuring PackML compliance
Static checks are executed using Model Advisor and check the structural conformance of the modeled PackML state machine model. This includes propriety of states, transitions, state functions and interfaces. Thus manual reviews to ensure PackML compliance become obsolete.
Simulink PLC Coder is capable of generating a test bench from test cases used to verify the model to ensure the equivalent behavior of model and code.