I created a set of pre-configured form components that make it easy and fast to create database-backed user input forms in Ignition. The components are free and available for anyone to use.
The ability to create custom component palettes in Ignition is a capability that is not often talked about but is a powerful feature and can be very useful. In this case I used this capability to create a set of components that anyone can use to quickly and easily create forms in Ignition. The forms are used to capture user input and insert and update data in databases. See the Form Components in the image on the right.
To use the Form Components Palette download this file: FormComponentsPalette.proj. Then import the file into an Ignition project. The project file includes the Form Components Palette and a Python module at project.pa.forms. This project file only works in Ignition 7.7 and above.
How it Works in a Nutshell
A Form Container is placed in a window and other form components are placed inside the Form Container. A Form Container specifies what database table to insert data into and update.
Form input components receive user input for specific columns of a database table.
A Form Table shows what data exists in a database table and enables users to select rows in the table to update or delete.
A Form Submit Button is clicked on to insert or update data in a database table.
The form components are very flexible and can be modified easily to support various functionality.
Here is a video that shows how to create forms using the new form components: Ignition: How to Create a Form Using New Form Components.
Here's another video where I create a form from scratch in less than 5 minutes, including adding validation and testing the form: Ignition: How to Create a Database User Input Form in 5 Minutes.
Form Components in Detail
The Form Example provides a working example of a form using the form components. The Form Example expects a simple "people" database table to exist using the default datasource of a project. Look at the SQL query used by the Form Table to understand the schema for the "people" database table.
The Form Example is a skeleton form. Use it to get started creating a new form. Here is an image showing an Example Form:
The Form Container is a regular container with two custom properties. The "TableName" property specifies what database table to insert data into and update. The "Datasource" property specifies what datasource to use. If the "Datasource" property is blank then the default datatsource for the project will be used.
Form Input Components
These are the form input components: "Form Text Field", "Form Numeric Text Field", "Form Text Area", "Form Dropdown List", "Form Radio Buttons".
Each form input component has a "Column" custom property that specifies which column in the database table to insert into or update. Each form input component has an "IsValid" custom property that indicates if user input is valid or not.
Each form input component has a "validateInput" custom method that is used for validating user input and setting the "IsValid" property to True or False. This method can easily be modified to perform custom validation. This method is called when user input changes.
Each form input component has within it a "Label" component for describing the input component purpose, and a hidden "InvalidMessage" label component for displaying validation errors.
Form Submit Button
The Form Submit Button is used to submit a form, which inserts or updates data in a database table. The Form Submit Button contains within it a "Status" label that shows the success or failure of an attempt to submit a form.
project.pa.forms Python Module
The form components call functions provided by the project.pa.forms Python module to tie together form components and execute functionality of forms.
No Ignition Templates
It is notable that the Form Component Palette does not use any Ignition component templates. While component templates are a powerful and useful feature I found it was best not to use them in this instance. Like templates, component palettes have the ability to combine and capture pre-configured functionlity on regular components and reuse them. While templates have benefits that captured components on palettes don't have, individual instances of non-template palette components can be more easily modified individually.
If you want me to add more functionality to this then let me know.
I am also interested in finding sponsors who would be interested in funding improvements and new functionality for this work.
For the last couple months I have been blogging at www.perfectabstractions.com/blog. For a variety of reasons I have decided to continue blogging at nickmudge.info.
Future Perfect Abstraction newsletters will contain blog posts from nickmudge.info.
Here are the blog posts I have written in the last few months at www.perfectabstractions.com/blog:
I recently created a new website for my company Perfect Abstractions. Check it out! www.perfectabstractions.com
It has been a month and a half since I went out into the world and started my own company, Perfect Abstractions.
I feel strangely obligated to give the world an update. Things are going fine. Of course company founders are unlikely to say that things are going poorly when things are going poorly. I am telling you the truth that things are going fine.
In the last month and a half I found a company that was brand new to Ignition. I educated them about Ignition, sold an Ignition license to them and have been working with them on their first Ignition project. They are a great client and I am really happy to be working with them. This is a great milestone for my sprouting new company because this is what I envisioned doing and I am doing it.
So why are things just going fine? Because I have high expectations. Because I am incredibly optimistic. Because I want to expand now, and expand a lot.
Ignition is a great software platform and there are many opportunities to use it. Inductive Automation, the company that develops Ignition, is solid. With these things I believe there is a lot of opportunity and I want it.
Great Ignition consulting and development is the heart of my young company. My plan for expansion is continuing to be great at Ignition consulting and development and finding ways to be better and better at it - what that really means is doing a good job helping my clients. And my plan includes making my company's consulting and development services and quality more broadly known and informing more people about Ignition.
This blog post is a lot about myself and my company. I actually don't really like to write about myself. Many of my future blog posts will be about Ignition software and other software things. Ignition 7.7 Beta was recently released. I can't wait to download it and explore many of its new features and blog about it.
Right now it is just me but I want to hire people and grow. Below are people I am interested in talking to or things I am interested in talking to people about. Feel free to contact me if you have ideas or suggestions or are interested in talking to me about any of these things.
- People who want to know more about Ignition
- Ignition projects
- Developers who want a job using Ignition
- Marketing ideas
- Marketing partnerships
- Business partnerships
- People interested in selling Ignition
To My Potential Client
My first duty is to understand what you hope to achieve. Your hoped for projects and success are unique. I will tailor my services to your projects and to your success.
What is Ignition?
Ignition is a set of software tools that make it easy and fast to build applications. Ignition applications often monitor and control devices, processes and activities. Data is collected, analyzed and formatted to produce valuable information that is presented to people that need it or can use it. With such applications people gain insight and much better control over the things they care about.
I will help you
- Understand Ignition better,
- Evaluate Ignition to determine if it is the right software for you,
- Understand how to use Ignition to achieve what you want to achieve.
Communication is usually done over the phone or through email. Using screen sharing technology I can demo different aspects of Ignition that you are interested in. This is a free service for people finding out about Ignition and my services.
I train people on how to use Ignition to create applications. This can be done at your place of business or done remotely using screen sharing technology such as WebEx.
Ignition Project Development
I design and implement new applications using Ignition. My level of participation can vary according to your needs and wants. I can help you get started on a project or help you through to completion. I can design or implement projects alone or along with a team of people. My help can include project design, project implementation, project management, quality control, tech support, debugging or any combination of these.
Ignition Module Development
I create new Ignition modules to extend or add new tools to Ignition. This includes writing new drivers that communicate with more kinds of devices. I also provide training on how to use the IgnitionSDK to create Ignition modules.
I started an Ignition project and module development company on the 28th of April 2014 called Perfect Abstractions.
I provide a range of Ignition and software related services including teaching Ignition, Ignition project development and Ignition module development.
For the last 5 years I have been using Inductive Automation's Ignition software and related software products to help companies solve business problems.
I am particularly good at customizing Ignition to shape solutions to fit needs of clients. If Ignition can do 100 things out of the box I can make it do 1000 things. This customization is done largely through scripting in the Python programming language or creating new Ignition modules to extend the functionality of Ignition.
I am a GOLD certified Inductive Automation integrator. I received GOLD certification from Inductive Automation because of my experience and skill with Ignition.
I help people with Ignition on Inductive Automation's forum. My forum ID is nmudge.
I implemented an Ignition module called the SECS/GEM module. The SECS/GEM Module enables Ignition projects and third-party applications to communicate with semiconductor manufacturing equipment. The SECS/GEM module is for sale on Inductive Automation's module marketplace.
Here are some of the projects I have worked on. I used Ignition to implement all of them:
- I was the lead implementer for a large process control system.
- I was the lead implementer of a recipe management system.
- I implemented an HMI system for operators on a factor floor. This system also included logging data from PLCs and storing various data in a database. The information was used for graphing and generating reports.
- I implemented a tank inventory system which worked with a PLC program to transfer and track various substances between tanks.
- I did various work on a Customer Relationship Management (CRM) system implemented in Ignition.
- I implemented an Ignition Module that integrated Ignition with Quickbooks.
- I implemented an Ignition Module that allowed bulk operations on components, such as adding custom properties and scripts to multiple components at the same time.
- I added new functionality to the Click to Graph project that exists for download here: http://inductiveautomation.com/downloads/extras. I also added Click to Graph functionality to a customer's project.
- I helped customize a particular MES system through scripting and database work.
I have also been a web developer. My most notable work was programming most of www.gamasutra.com.
I am also a hobbyist programmer, interested in learning things covering all aspects of software development, learning different programming languages, operating systems etc.
If you have any questions email me: email@example.com
I recently attended the first Ignition Community Conference. It was pretty great.
Here's a couple posts about it from the IA forum:
I recently had a problem with a web page created using the Wicket 6 web framework. A button that uploads a file didn't work. When pressed the button didn't do anything.
I investigated the problem and found that the button was using an AJAX function from wicket-ajax-jquery.js. But it wasn't actually AJAX. The call used a hidden iframe to send the multipart form data of the file being uploaded.
Apparently regular AJAX calls cannot be used with HTML 4 to send multipart form data which is required when uploading files. So wicket-ajax-jquery.js simulates AJAX by using a hidden iframe to submit a form.
The problem is that the src attribute on the hidden iframe is set to "about:blank". This right here causes the before mentioned button to not work when IE8's Internet zone security level is set to High. Internet Explorer may give a popup explaining that "about:blank" needs to be added to the list of Trusted sites, or it might not. The indication of what the problem is isn't necessarily clear. In testing on two computers the popup occurs the first time it happens but not after that. On another computer the popup doesn't occur at all.
I don't know if this is a problem with other versions of IE or not.
The solutions I have for this are for users to change their Internet zone security setting to lower than High, or add "about:blank" to their list of Trusted sites, or for the developer making the webpage to use a regular form submission instead of using a simulated AJAX call that uses an iframe.
I wrote this blog post as an experiment because I was surprised that I could not find this problem at all by searching for it with google. Either other people don't have this problem or people do have this problem but it hasn't been written about. I'm curious if much people will find this blog post now that I've written about it.
Ignition is a set of tools written in Java that makes it easy and fast to build applications. What kind of applications? The Inductive Automation website says it is software for creating Supervisory Control and Data Acquisition (SCADA) systems. However I think it is more general purpose. It is certainly great for and geared for SCADA systems, but all kinds of applications can be built using Ignition.
If you are not familiar with SCADA, here's a definition from Wikipedia:
Computer systems that monitor and control industrial, infrastructure, or facility-based processes.
I have used Ignition to implement or improve inventory systems, plant data logging systems, process tracking systems, plant monitoring systems, Customer Relationship Management (CRM) systems and Human Machine Interface (HMI) systems. HMIs are GUIs that are used to control machinery on the plant floor.
I think a lot of web applications could instead be Ignition applications. Project management, time tracking, email, CRMs, ERP -- data rich applications that you want users to log in to.
A huge benefit to web applications is that they employ a client-server model. There's one server that deploys an application to many clients, the web browsers. This allows changes to the software to be very easy. Just change the code on the server and the clients are automatically updated. And since a web server deploys its application over a network the users can access the application from many physical locations. Of course the Internet enables users to access applications from many places in the world.
Ignition employs this same model. But instead of deploying a client over the network to a web browser Ignition deploys a client over the network to a Java Runtime Environment (JRE) using Java Web Start.
Here's a great description of Java Web Start from www.java.com:
The Java Web Start software allows you to download and run Java applications from the web. The Java Web Start software:
- Provides an easy, one-click activation of applications
- Guarantees that you are always running the latest version of the application
- Eliminates complicated installation or upgrade procedures
So a user goes to an Ignition webpage and clicks on a launch button which causes Java Web Start to download a Java application from the Ignition server. When the application is downloaded the application starts automatically and the user is in business. The Java application running on the user's desktop will communicate to the Ignition server on the network as needed to get data from databases, to update itself when changes are made on the server, etc. After developing applications with Ignition for the last three years I can tell you that this works very well.
The control and interactivity in web applications is getting better and better but it still isn't as good as the control and interactivity in desktop applications. When developing with Ignition you are making a desktop application but you get network benefits of web applications.
Another big benefit that web applications have is that web browsers are ubiquitous on computers and devices and different operating systems. I don't think Java is as ubiquitous but it is still pretty common. Ignition includes support for running Ignition applications on cell phones and tablets. The Ignition server and applications run on Windows and Linux well. For the last couple of years I did all of my Ignition development on Linux, using Ubuntu. That made me happy.
For a long time a problem in web development has been browser consistency, and it still is a problem particularly with Internet Explorer 8 and below not supporting much of CSS3 and HTML5. When developing Ignition applications I didn't have to worry about what might be supported or not. I just focused on developing my applications. If users are using Sun/Oracle's Java 6 or 7, which the large majority of people are, then everything is supported. I have used OpenJDK before with Ignition and it has worked but the Sun/Oracle JRE worked better.
The Designer: the Ignition development environment
Ignition includes in it a web-launchable application called the Designer. This is the development environment used to create Ignition applications. It is launched just like a client Ignition application, from the built-in website that comes with Ignition.
In Ignition applications are called projects. Once a user creates a project in the Designer a user can easily create new windows and access pallets of available GUI components that can be dragged and dropped into windows. Database queries can be written for components and components can easily be connected together so data flows through them.
The drag and drop nature of Ignition, the array of built-in components and functionality and the configuration windows for these things take a lot of programming out of building Java applications. If that disappoints you or makes you think Ignition is limited, then read on. If that excites you, read on.
Many, if not all of Ignition's GUI built-in components were built using Swing, Java's primary GUI widget toolkit.
Ignition provides the usual standard components needed to make GUIs like windows and labels and buttons. It also includes many kinds of components that are used to display data from a database like tables and charts and the dropdown component. It also includes components that are used to display real-time data from Programmable Logic Controllers (PLCs) or a database or other source, such as the Thermometer, the LED Display, the Level Indicator, the Cylindrical Tank and others. It includes components for controlling equipment on the plant floor. It includes other interesting components like the IP Camera Viewer, Barcode component, Paintable Canvas, PDF Viewer and others. Ignition also includes an image component that allows users to add images to their application. Ignition also includes a library of graphics that users can use. A list of components can be found in the Ignition Manual in Appendix A.
Once a user has components on a window they need to be made to do something. They can be made to do a lot of things. A user can use a configuration window to directly connect a property of one component to the property of another component. Ignition has a simple expression language that can be used to connect the properties of components together but also manipulate the data at the same time through a set of available functions. But the real power and flexibility of the system comes from what can be done through scripting with Jython.
One of my favorite things about Ignition is that it provides its users with Jython 2.5 for event handling and server-side scripting. Jython is an implementation of Python that runs on the JVM.
Ignition provides many built-in tools and windows to configure things. Many users could probably get away with little scripting because Ignition is setup to help users build applications without much programming if they don't want to program. But the configuration windows and built-in functionality limit what can be done and how they can be done. In my opinion Jython scripting (and Ignition's module system) are really what makes Ignition flexible and powerful. When you need more than what is built in, Jython is there to give you flexibility.
So Swing events like mouseClicked, actionPerformed, propertyChange and others are handled by Jython scripting in the Designer. Ignition provides some simple configuration windows for implementing events. These generate equivalent Jython scripts which are then used by Ignition. These configuration windows are useful to learn how scripting is done in Ignition. You can skip the configuration windows and write your event handlers in Jython directly, which is what I do.
Ignition includes a Script Module Editor which allows users to write their own libraries of Jython functions which can be used in event handlers. This is where to put reusable code.
Jython in Ignition is good for people just learning to program, it is good for intermediate programmers, it is good for advanced programmers. It is simple but it doesn't constrain or limit. You can dig into the Ignition software and grab the Swing objects and change them or add new functionality to them. You can do anything that you can do in Jython, Swing and Java. It might not be recommended to mess with the underlying software too much, but you can do it. I once had a customer that needed some functionality on a table component that it didn't have. There was no way to add the functionality other than writing Jython code that dug into the Ignition objects, pulled out the underlying Swing object and added a new event listener that I wrote. Then it worked like a charm. I enjoyed that and it was awesome.
I wrote a lot of Jython code for all kinds of things: manipulating bits of data, processing lots of data, input form handling, database queries, security, safety, coordination of components on windows, navigation, etc. etc.
Ignition includes a built-in library of Jython functions for doing common things like database queries, reading files, navigation, GUI popups, exporting data to CSV or Excel, email, printing etc.
Ignition also provides Jython for server-side programming which runs on the Ignition server instead of in client applications. This is very useful.
Ignition has a lot of built-in functionality and support for using SQL databases such as MySQL, PostgreSQL, SQL Server and Oracle. Database queries can be connected to components like tables and graphs to display data. Databases can be accesses and manipulated in Jython scripting easily. Ignition has functionality to easily log data to databases. Ignition has a built-in database browser which is pretty useful. It does a lot of other things with databases.
Probably my two favorite things about Ignition are Jython and being able to write new modules for Ignition.
Ignition is made up of a number of separate modules that work together. For example the Vision Module is what provides Ignition with its GUI capabilities. The SQL Bridge Module provides data logging capabilities. The Reporting Module provides the ability to create reports.
The cool thing is that you can write your own modules in Java, adding your own capabilities, GUI components, configuration, whole systems, and whatever to the Ignition platform.
Inductive Automation provides a ModuleSDK for developing Ignition modules.
I wrote an Ignition module that integrates an Ignition application with QuickBooks. The module includes a SOAP server that is used to communicate with the QuickBooks Web Connector.
I wrote another Ignition module that allows users to select many components in a window and change the values of their properties in bulk. I also added the capability to add event scripts to many components at the same time. This way users could make large changes to their applications very quickly. However this module is less useful now because Inductive Automation added new functionality which allows users to base their components off of templates. Changing a template changes all components based on that template. Ignition is in continual development with new features and improvements.
There's lots of ways to get help and learn about Ignition. Here's resources I used when implementing Ignition applications:
- Inductive Automation Forum - When I needed help with something or I didn't know how to do something the Inductive Automation forum was often the first place I went. I would search the forum to see if my question had been asked before or if the answer already exists. I found a lot of useful information this way. The forum is a great place to ask questions. The technical support staff, other users, and the developers of Ignition answer a lot of questions here. This is also a good place to discuss various things about Igniton and share ideas, make feature requests, etc.
- Inductive Automation phone technical support - For questions and help, particularly when I wanted to know or solve something very quickly.
- The Ignition User Manual. This is obviously useful for learning about Ignition. I used Appendix C. Scripting Functions as a reference for scripting in Ignition. It shows how to use the built-in Ignition functions in Jython.
- Google - For when I had a Java or Jython/Python related issue.
- Java documentation - For when I wanted to understand Java objects or classes in my Jython scripting or Ignition module programming.
The Inductive Automation website includes lots of resources for learning about Ignition. Videos, quick start guides, manuals, articles, example projects, free tools, etc.
I have only given brief descriptions of some of the architecture and functionality in Ignition. It has much more than what I have written about in this post. I didn't write about transaction groups, which is a system for logging data to databases, I didn't write about SQLTags which is a great abstraction for handling data in Ignition. I didn't write about the Jython code editing support, I didn't write about how to develop mobile applications in Ignition and I didn't write about many other things that exist in Ignition modules.
If you want to learn more about Ignition then I recommend reading Steve Hechtman's blog and checking out the Inductive Automation website. You can also download and install the free trial of Ignition.
Edit on 13 July 2014
I recently started a new business providing Ignition consulting and project development. Contact me to find out more. Here is my business website: www.perfectabstractions.com.