Motion programming gets easier

The software that runs motion systems must execute processes ever faster and more reliably, be flexible enough to change as processes change, and be easy enough to use that operators and trouble-shooters need minimal training. One of the newest solutions for these requirements is flow chart programming.

Article Tools

Popular Articles

Until recently, programming and the integration of controls and motion components usually required several programming languages. Ladder logic was used for the control logic of a PLC and for the code to communicate to the motion controller and the operator interface. Motion commands were typically RS-274D (G codes), programmed in C or in a language defined by the control manufacturer. And the language used for the operator interface was vendor proprietary.

Now, though, engineers no longer have to use three languages. The motion and control industries are moving to a single, common language referred to as flow chart programming. Available from a handful of vendors, this software is intuitive to use, self-documenting, and it lets engineers add diagnostic routines as needed without rewriting a program.

Several companies would like it to become a sixth language in the IEC-1131 standard for industrial control programming languages. This possibility will be discussed in future meetings of the PLCopen association, which supports and promotes this standard.

Cooperative relationships

As PC-based motion control gained acceptance over the last few years, motion and software vendors saw an opportunity to cooperate and develop the next step — integrated motion and control. Companies such as Motion Engineering Inc. have engineering teams creating motion profiles using the C language. Engineers embed these profiles into digital signal processors (DSPs), then put the DSPs onto multi-axis motion controller cards. The flow chart programs access these profiles using motion calls, such as Move X to 6, or Move to advance position, and so on. The C code for the motion side is hidden from the end users, who have only to fill in appropriate parameters when prompted.

Motion functions handled by flow chart programs include single and multiaxis motion; independent or coordinated moves such as linear, arc, and circular; master-slave motion; position-triggered motion; jogging; blending; and several profiles including S-curve, trapezoidal, and parabolic.

Motions not suitable, depending on the application, are those that require special functions, such as tool wear, tool offsets, and other compensation functions. In addition, highly precise multiaxis metal cutting applications are better programmed with a dedicated CNC or a motion card with CNC capabilities. In some cases, you can integrate such a motion card with a flowchart program as long as memory information is mapped between the program and the card. Parameters, start and stop signals, and status messages can transmit through a dual-port RAM interface. Remote CNCs can use an input-output (IO) interface that allows the same functions.

Flow chart elements

Like another graphic-based language, Sequential Function Chart (SFC) or Grafcet, flow charts use graphic elements to describe a sequence of actions. However, SFC as defined in the IEC-1131 standard is not intended to be a complete programming language. Rather, it is a way of organizing the sequential activity of ladder logic programs. It consists of steps and transitions, Figure 1. Each step is a reference to an underlying program written in a different language. Transitions move the execution from one step to another.

Flow charts use action blocks and decision diamonds, elements that engineers, programmers, operators, and electricians are familiar with. In most such programs, engineers drag and drop these elements into place, according to the needed sequence of events. Arrows link the elements. Programming statements, such as Advance pushbutton, Move to advance position, Axis motion complete?, are placed in the blocks and diamonds. In place of plain English statements, some flow charts let engineers use fill-inthe blank calls, which can make motion commands as easy as A to B. Others have engineers enter parameters for axis, position, acceleration and deceleration rates, and velocity.

When the flow chart encounters a motion action block during execution, the block generates a call to the motion card and passes any associated parameters, Figure 2. Special instructions known as software drivers and the motion profile software translate the parameters into executable code. The motion card receives this code and parameters and executes the motion. When finished, it may pass parameters back to the flow chart program.

The flow chart requires no additional logic outside of the motion call block and no need to create diagrams that show memory addresses or memory allocations (mapping) as in a PLC system.

The method of interface between the flow chart and the motion card differs among vendors. Some use Windows or one of the new real-time versions of Windows NT. Others use separate software, sometimes called a real-time engine, that functions independently of other operating systems in the controller. As Windowsbased operating systems can experience unexpected downtime, which interface you choose depends on your application’s tolerance for such a possibility.

Because the motion card usually plugs into the backplane of the PC, communication is done over the backplane bus. This eliminates the delays often encountered when initiating motion commands over an IO network. DSP-based motion cards still close servo loops.

Continue on page 2


Acceptable Use Policy
blog comments powered by Disqus

Marketplace

eNewsletter

EngineeringTV


The Latest Videos from EngineeringTV.com

Back to Top