Iboxes…The Latest Craze

In our last issue of Automation Notebook we introduced you to DirectSOFT5 (version 5.0), the latest version of programming software available for the DirectLOGIC PLCs. DirectSOFT5 received an overall facelift including selectable themes, configurable toolbars, dockable and floatable views, HTML help files, and a helpful “Tip of the Day” feature. However, the most notable improvement to the software is the new IBox instruction set.

IBoxes (Intelligent Box instructions) are parameterized “fill-in-the-blank” style instructions that allow you to enter various parameters into a control box to configure your code. This easy style of programming eliminates the need for potentially lengthy rungs of ladder code. IBoxescreate the ladder code and execute it in the background so you never have to see it.

IboxesHow can IBoxes benefit you? Let’s look at what the new features offer.

New Programmers – Decreased Learning Curve

The parameter style IBox makes learning to program a specific device easier and faster. Consider an analog module; typical setup consists of rungs of ladder code specifying reserved areas of V-memory in the PLC for analog module type and location. You will need to consult the user manual and identify which V-memory locations to write to in the setup code. In contrast, in configuring an analog module with an IBox, you simply need to know in which slot the module is located within the base.

Experienced Programmers – Reduced Programming Time

Experienced programmers can now complete their projects more quickly by not having to key all those rungs of ladder logic or spending time referencing the manual for special relays and V-Memory locations dedicated to module configuration.

Common everyday tasks, and some not-so-easy tasks, are now simplified into one instruction to make the overall programming experience more efficient. An average rung executing a three step math equation would take more than seven instructions. This can be accomplished in one simple math IBox in a fraction of the time.

Troubleshooting With Less Code

For anyone who has written Relay Ladder Logic (RLL) code, you know that other than a few basic rules and guidelines, there is no right or wrong way to program. Whether it takes you three rungs or thirty to accomplish a single task, if it operates properly, then it is programmed correctly. However, if you didn’t write the code, it can sometimes be very difficult to follow. No two people have the same thought process; therefore, no two people will write code in exactly the same way.

IBoxes simplify the troubleshooting process by shortening the amount of code in a program. It also displays pertinent information within the box itself, such as the physical location of a module within the system, the memory locations feeding the box, and where the result is stored. You can even read a math equation in its native text.

The advantages offered by the IBox instructions are unique to each aspect of the project, in learning, programming and troubleshooting, but they each have one common bond – efficiency. “Efficiency is the ability to do something well or to achieve a desired result without wasted energy or effort.” This is what you gain when you use the new IBox instructions.

Instructions Overview

Now let’s take a closer look at the IBox instructions. The new IBoxes are sub-divided into 6 groups:

• Memory
• Discrete Helper
• Analog Helper
• Math
• Communications

Within the Memory category we have two IBoxes:

• MOVEW, moves single word data
• MOVED, moves double word data

Within the Discrete Helper category there are four:

• OFFDTMR, an off delay timer
• ONDTMR, an on delay timer
• ONESHOT, a one shot execution
• PONOFF, a push on/push off coil

Within the Analog Helper category there are nine instructions which include the following:

• 3- Configuration
• 2- Scaling
• 2- Filtering
• 2- Hi/Lo Alarms

The Analog Helpers are designed to simplify analog module setup and configuration, from initial setup, to scaling raw analog values to your engineering units (i.e. lbs, psi, flow, etc), to filtering and monitoring for Hi/Lo alarm values.

Within the Math category there are 13 instructions which include the following:

• 4- Data type converters
• 3- Straight math blocks
• 3- Square functions
• 3- Sum instructions

The new Math IBoxes may hold the highest value of all the new instructions. The DirectLOGIC PLCs were designed with an accumulator which allowed great flexibility, but could become code-intensive and difficult to troubleshoot without adding more code to view the values within the equations. These new math instructions allow the programmer to enter the equation just as they would write it. For example:
((A*B) / (C-D)) + E.

Within the Communications category there are 25 instructions in the following categories:

• Email (for the 100 MBit ECOM cards)
• Module Setup (for the 100 MBit ECOM cards)
• Networking

The number one advantage offered by the communications IBoxes is the Networking instructions. Many of you are familiar with configuring multiple networking instructions within the DirectLOGIC PLCs and know that if you do not have the scheduling configured just right you will get collisions. If more than one network command should be active at any time, none of your communications will work and you will get an error. The new networking IBoxes have a mechanism built in that automatically handles this situation. It is a “token passing” scheme that allows one instruction to execute and then immediately passes the priority to the next, and so on.

The Email option is also very popular. Having the ability to configure your ECOM100 to send a notification to any email address with imbedded variables can be a valuable feature.

Finally we have the CTRIO category. Within the CTRIO category there are 13 instructions, which include:

• 6- Preset table instructions
• 1- Configuration
• 1- Load Profile
• 1- Read Error
• 1- Write to ROM
• 3- Mode selection

The objective of the CTRIO IBoxes is to simplify the control required within the PLC ladder logic once the High-Speed counter module is set up. It is sometimes difficult to manipulate the data in the preset tables after the configuration is set. The CTRIO has the capability to do many things, but with this capability comes complexity, and the IBoxes are designed to reduce the intricacies of this process.

Remember when we talked about the IBoxes literally creating the ladder logic and executing it in the background? Everything you do with an IBox can be done in the basic RLL editor.IBoxes just make it a little easier for you.

Check the AutomationDirect Web site for more information and future Webinars focusing on specific IBox categories at: http://learn.automationdirect.com

By Jeff Payne,
AutomationDirect Product Manager
PLC, I/O and PC-Controls Group

Originally Published: June 1, 2006