<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=903950426407530&amp;ev=PageView&amp;noscript=1">

Welcome to the PanelShop.com Blog

This blog will bring you the latest industry news in electrical control panels, helpful Engineering tips, and more.

The Basic Tenets of Programming for Custom Control Panels

Basic_Tenets_of_Programming_for_Electrical_Control_Panels.png

When people hear about programming, they typically think of the A+ students who memorize computer languages and write 1s and 0s. While this is somewhat true, It’s important to point out that programming is much more than learning a foreign language. It’s logic. A lot of a programmer's job is not to tell a computer to do something, but to figure out how to get a computer to do it. That’s why a programmer's job starts from the very conception of the program.

This is important to understand because to build a program, a programmer:
  • Figures out exactly what the program will do
  • Draws a flowchart depicting the logic process of the program
  • Translates the flowchart into computer code
  • Double checks the process
  • Conducts ample tests
  • Attempts to break it
  • Breaks it, breaks temper, breaks the desk, etc...
  • Patches it
  • Releases it

This is true for any kind of programming whether it be for a PC game or a PLC. One of the most important parts of the job is testing the program. While testing a program, the tester must input virtually everything possible into it to the program to try and break it. When the program is in use, it will be subject to irresponsible inputs every now and then so it’s important to make sure it can handle bad inputs properly. Here’s a few requirements that a good program must have:

  • Relevant - From the very first step in figuring out the software design and logic, make sure it can do what it should do. A program is worthless if it does something that it’s not supposed to do. This isn’t necessarily a logic error as mentioned below, but it’s a programmer misunderstanding of instructions. Double check the problem the program is meant to solve and be sure you understand it correctly.

  • Dependable - A program is useless if it contains the wrong algorithms and calculations. Be sure that when you enter information into the program, it comes out the way it should.When testing the program, go through the program with test inputs on paper and test it on the actual software. If you get different answers, there may be something wrong with the code.
  • Self-Explanatory - If the program is meant for interaction between human and machine (as most are), it shouldn’t be a puzzle to figure out how to use it. Label all controls. If the program makes use of a GUI (Graphical User Interface), make use of control placement, color, size, etc in order for the user to understand it fully.
  • Sustainable - No matter how much rigorous testing the program endures, there will likely still be bugs. When these glitches are found, the code must be easy to read to find where the error lies. Organize the code using a plethora of comments to make it maintainable.
  • Efficient - There are a million ways to do one thing in programming, but a programmer's job is to find and use the most efficient path. When the program is complete, go back through the code and delete any lines that are unnecessary and unused.
  • Reliable - As mentioned above, when a user accidentally inputs trash into the program, the code has to know how to deal with it. Some examples of this is if the program prompts for an integer and a word is inputted. Instead of letting the program break, it could simply change the input to 0 or tell the user that the input is bad. Or instead of a user error, maybe a corrupted file is used by the program and the file can’t be read. This may require it to alert a user or use a different file.

Keep these rules in mind when programming. If you need any help, talk to the team at PanelShop.com. We design programs for all kinds of control panels and automation processes. Contact us to get a free quote and we'll be happy to discuss your project with you:

Get my Custom Quote »

 

You May Also Be Interested In Reading:

You may also be interested in reading…

by

A well-designed control panel is highlighted by

read more
by

 Panel Meters can be utilized by machine and

read more

Any technology or equipment with the word

read more
Popular Resources

Popular Resources

Outsourcing Control Panels: Free Whitepaper

Read More

Common OEM Outsourcing Mistakes to Avoid

Read More

Custom Control Panel Checklist: The Outsourcing Cheat Sheet

Read More

Five Questions to Ask When Selecting an Outsourcing Partner

Read More