In this article, we are going to talk about one of the advance abilities of the Logix 5000 platforms of PAC or Programmable Automatic Controller. In particular, how to use, configure and create using the Add-On Instructions of Studio 5000.
Most programmers use the term “advance” because building simple Add-on Instructions of Studio 5000 is not a strenuous job. Understanding what Instructions is all about, how to use it, and when you can use them, is the problematic part.
If you have been wondering what this compelling and essential feature is, we encourage you to keep reading this article. We assure you that once you finished reading, you will be using the Studio 5000 Add-On in your next project with ease and efficiency.
What is Studio 5000 and Add-On Instructions?
The Add-on Instructions for Studio 5000 will provide the mechanism to encapsulate and optimize logic or reusable codes. Once you have created the instruction, you can add it to your logic, just like how you add other pre-determined instruction in the programmable automated controller.
The key here in making an excellent Add-On Instructions using Studio 5000 is to think of any scenarios where you duplicate your rung of logic over and over in your automatic controller. What most programmers do, is to abstract away from the specific application of any device and how they make it as inclusive as possible.
For example, a lot of automation system will use a lot of valves to control district cylinders. Valves come in different types, single, double-solenoid, spring return, detent, two or three-position, etc., etc. Also, cylinders come in different sizes and shapes with varying applications and mounting in any automation project.
That being said, there are some common elements to valve-cylinder combo that you might deploy in the field. It is an excellent opportunity to make use of Add-On of Studio 5000.
Add-on Instructions for Studio 5000
One way to use Add-On Instructions to generate reusable and generic AOI is to do something like what is listed below:
Before we explain everything, let us make some assumption to keep everything simple. The cylinders we are controlling or will be used is the double-solenoid that has two discrete coils. Each cylinder that is deployed to the field will both have a Returned and Advanced proximity sensor (at least two proximity switches).
You need to remember that the final goal here is to make the Add-On Instruction with Studio 5000 as familiar as possible. It means that a non-exclusive logic or algorithm will be enclosed inside the Automatic Optical Inspection or AOI. If you carefully designed the Automatic Optical Inspection with the general quality, you will be able to recycle the instructions over and over again with every cylinder you deploy in your automation projects.
What is AOI or Automatic Optical Inspection? Visit https://en.wikipedia.org/wiki/Automated_optical_inspection to know more.
Step 1 – Make new AOI
To make a new AOI, all you need to do is right click the Add-On Instruction folder and then click the New Add-On Instruction folder and click New Add-ON. Once you click the New Add-On, a dialogue box will appear. You need to fill all the appropriate fields to make a new Automatic Optical Inspection.
When you are making a new AOI, notice that the checkbox for Open Definition is still checked, It will open the Add-On Definition dialogue box where you can start making a definition for your cylinder AOI.
Step 2 – Add local tags and required parameter
Once you are in the Open Definition dialogue, you need to navigate to the Parameters tab. Here you need to define the parameters that will be required to control all your cylinders. Make sure that all your metrics don’t have any errors. Once the parameter tags are created, you have to navigate to the Local Tags tabs and make the necessary tags.
Step 3 – Add the Automatic Optical Inspection Logic
You want to navigate back to Controller Organizer Window and double click Logic routine that appears under the newly created AOI.
Step 3a – Add the command logic
The next parts are subject to a full disclaimer and debate; the routines are only for educational purposes. Programmers don’t warrant the use of the AOI or any logic in the production environment. If you notice, that the Cmd_Adv, as well as the Cmd_Ret bits, are sealed with their respective output bits.
The Cmd_Adv and Cmd_Ret bits should be toggled once to start the motion. If you also notice that the Cmd_Adv, as well as the Cmd_Ret bits, are interlocked so that they can’t be enabled at the same time. It is extra protection in case the logic encountered an error and mistakenly energize the output.
And lastly, you will notice that the Fault_Present bit are in-line with all the outputs to make sure that if any errors are detected, the outputs will be de-energized or else the outputs will stay energized until the inputs are made. For example, when the Out_Adv is energized, it remains energized until the In_Adv, Cmd_Ret and the Fault_Present bit shows “true.”
Step 3b – Add the status logic
The logic is intended to give user-program an excellent visual output to determine where the cylinder is in respect to its position or if the cylinder is already in motion. The outputs can be referenced in user-defined codes when building the logic.
Step 3c – Add the fault logic
After adding the command and status logic, it is time to add the fault logic to your Automatic Optical Inspection or AOI. It will ensure that if you command your cylinders to move, it should get to where you want them to go or their final destination in a preset amount of time.
You need to remember that you added a parameter that allows the user-programs to enter Time msec which would interpolate with the maximum time the cylinder has to reach its fully returned position or fully advanced.
Click here to know more about logic error in PAC.
Step 4 – Populate the user-defined Automatic Optical Inspection parameters.
Now it is time to populate your instructions. The part is going to depend on certain control requirements and application. For the tutorial, you need to simulate everything using an emulator. To make everything simple, you need to populate your AOI using simulated Input/Output directly.