Merging modern software development with electrons and metal
Random header image... Refresh for more!

Category — Series

Cool Stuff: Fieldbus Finder by Sick Sensors

Sick sensors has a really cool web page showing their products sorted by supported fieldbus.  It’s simple:

  1. Find the fieldbus you’re interested in; choices include CANOpen, DeviceNet, EtherCAT, EtherNet/IP, HIPERFACE, IO-Link, Modbus TCP, Profibus DP, Profinet, PROFIsafe, and SSI.
  2. Find the component type you’re interested in.  What’s available varies with the fieldbus; for example, only measurement and feedback sensors are available for the SSI and HIPERFACE encoder buses.
    1. However, the major fieldbuses have a lot of available types, typically including absolute encoders, bar code scanners, 2D code readers (for Datamatrix and such), laser measurement, linear measurement, light curtains, network gateways, RFID, safety controllers, safety laser scanners, and hand-held scanners.
    2. Sometimes, adding fieldbus functionality requires a gateway module, or an external communications module.  From a glance, it appears most safety communications (e.g. to safety controller) and most EtherCAT communications require a gateway — and those gateways can be pricey.
    3. Still, Sick’s level of fieldbus support is impressive.
  3. Then a new tab appears with search results for the component type, already filtered by fieldbus type.

September 3, 2013   No Comments

Robot Primer 7: Robot System Overview

The typical industrial robot is an integrated system consisting of:

  • The robot arm. Common types include articulated, SCARA, cartesian, and delta.
  • The robot controller, which typically includes the servo amplifiers, controllers, interfaces, and I/O.
  • Teach pendent – for maintenance, teaching points, debugging, and limited development.
  • Development software. OK, you can develop on the teach pendent, but for anything serious you need to use PC-based software.

The end effector is the equipment mounted to the end of the robot arm. Typically the system integrator develops a custom end effector for the specific application with devices such as suction cups, grippers, welder equipment, or cameras.

The robot needs to be supplied with electrical power and often compressed air. Very small robots can use 1 phase 120VAC or 240VAC power; however, most robots require 3 phase 240VAC or higher electrical power. Compressed air isn’t always required; some robots need it to balance their Z axis (to counteract gravity), and it’s often used by end effectors such as pneumatic grippers and pneumatic vacuum generators for suction cups.

Some small robots can be mounted upside down. The advantage is that the robot has a larger clear area, however, the mounting will be more difficult.

Another way to add flexibility is to mount the robot on rails so it can move from station to station.

August 26, 2013   No Comments

Robot Primer 6: Why Use A Robot?

A solution using an industrial robot is often a much easier to develop and more flexible solution than traditional approaches such as using a motion controller.

The major reasons why the robotic is quicker to get running and more flexible include:

  • The robot is an integrated system so you can plug everything together, turn on the controller and start moving using the teach pendent within hours.
  • The robot controller uses inverse kinematics. Kinematics is the physics of motion. Inverse kinematics is the use of kinematic equations to determine how to move the robot’s various mechanisms to where the controller wants.
    • In other words, the robot knows what axis or joints it has, their dimensions, and how they are connected. So you can tell the robot to move to an arbitrary position (including roll, pitch, and yaw for articulated robots) in space and it figures out how to get there.
  • Many of the robot advantages follow from the inverse kinematics. Normally, you teach positions to the robot. Those positions can then be used to rapidly program moves and paths, to calculate intermediate positions for palletizing, and such. The robot can transform positions in various ways that make using machine vision and multiple end effectors easier.
  • Other productive robot features include single step mode, single cycle mode, automatic recovery from interruption, and variable synchronized speed.

August 5, 2013   No Comments

Robot Primer 5: Motion Controllers

In this post, I take a quick look at how some common automation controllers handle motion.  All of the controllers easily control pneumatics using digital I/O.

Traditional Ladder Logic (PLC and many PACs).

I’m grouping PLCs and PAC’s together because they are often quite similar (the definition of a PAC is nebulous; many PAC’s are simply PLC’s based on x86 CPUs, but are still running ladder logic).

PLCs can easily handle pneumatics, although handling event sequences in ladder logic isn’t as straightforward as it is in programming languages such as BASIC, C, or C#.

Even many low end PLCs such as the Panasonic FP0R and Siemens S7-1200 support motion control via step and direction outputs, which can control stepper drivers or servo drives that accept step and direction. More capable motion control is available through dedicated modules, such as Panasonic’s FPG-PP11 module.

The PLCOpen TC2 Standard makes PLC motion control much better by adding a large number of standard motion control function blocks.

PLC motion programming varies.  For example:

  • The Panasonic FPG-PP approach requires setting up a block of memory with all the desired values, then copying it to a special memory location to start the operation.
  • The PLCOpen approach is simpler: just set the values of the function block.
PLCOpen Absolute Move FB

PLCOpen Absolute Move Function Block

Simple Serial Controller

Simple serial or USB controllers are quite common; examples include Schneider (IMS) MDrive integrated stepper motors, Moog Animatics SmartMotors,  AllMotion stepper and servo drives, and many others. These controllers are OK for simple tasks, but are quite limited in their capabilities (the best you’ll find is simple coordinated motion, gearing, and camming). Although the hardware is often cute, they are almost always a pain to program.

Here is an example AllMotion program that homes or steps through a sequence of 4 positions, based on the state of two inputs:


By the way, this protocol is common is certain industries and is used by many companies besides Allmotion.

Fieldbus Drives

A fieldbus drive is a servo amplifier or stepper drive integrated with a motion controller and a fieldbus interface.  Sometimes the fieldbus drive is integrated onto the motor.  There are way too many vendors to list; a short list would include AMC, Copley Controls, and Elmo Motion Controls.

Standard real time fieldbuses such as CANOpen, EtherCAT, and Ethernet PowerLink support standard motion profiles including torque control, velocity control, homing, profile moves, and PVT (position-velocity-time) moves.

Using the raw motion profile is a bit tedious; moves are set up by writing to the appropriate object’s object dictionary, and you have to deal directly with the protocol (CANOpen, etc).  Copley Controls provides an easier to use interface for C/C++ (CML) or COM (older versions) or .NET (current version) with their CMO library.  I’m surprised that very few other vendors provide comparable software.

Just sending commands to drives works fine if you’re doing basic motion.  For more complex motions, you can either buy a hardware motion controller that uses fieldbus drives (from Parker, ACS, and others), buy a soft controller (from ACS or others) or write your own motion control software.

Here is a sample Python script that performs an absolute move using Copley CMO V2.18:

from win32com.client import Dispatch
cmo = Dispatch('CMLCOM.CANOpenObj')
cmo.BitRate = 500000
cmo.PortName = 'kvaser0'
drive = Dispatch('CMLCOM.AmpObj')
drive.Initialize(cmo, 9)
profile = drive.ProfileSettings
profile.ProfileVel = 20000
profile.ProfileAccel = 100000
profile.ProfileDecel = 100000
drive.ProfileSettings = profile

Motion Controller

The motion controller world is very wide and varied, so this is my summary, not a detailed survey.  Popular brands include Galil, Parker, Delta Tau, ACS, Baldor, Aerotech, Delta, PMD, and MEI.

Motion controllers can be software only, plug-in cards (ISA, PCI, PCIe, VME, etc), or stand-alone (serial, Ethernet, USB, Firewire, etc).

Typical motion control capabilities include coordinated motion, interpolated motion, camming, gearing, and triggers.  Motion inputs include dedicated axis inputs such as limit sensors and encoder inputs (one or two per axis; two allows for separate position (e.g. linear encoder) and velocity (e.g. rotary encoder) feedback).  Motion outputs include servo command (normally +/- 10V analog) and/or stepper command (step and direction) and/or digital fieldbus.  Most controllers also have some general purpose I/O.

Programming methods vary; the four main approaches are the simple command approach (used by Galil and many others; they call it “simple and intuitive”, which might be true if you’re only doing motion), using a BASIC variant (Aerotech, Baldor, and many others), ladder logic (especially IEC-61131 and PLCOpen) or use a PC programming language (so the controller provides a library; this approach was popularized by MEI).  Also, many controllers will can use either the PC library approach or their proprietary language.

The boundaries can blur a bit; when is a controller running ladder logic a PLC or a motion controller?  I’d say when it’s intended for general use (for example a Panasonic FP0R), it’s a PLC, and when it’s intended for motion control with special motion control features (such as a Schneider Lexium Motion Controller), it’s a motion controller.  If it’s intended for both, maybe it’s a PAC (such as the Omron NJ series).

Here’s some sample Galil code showing setting up and moving 3-axes:

SP 20000,20000,50000
AC 100000,200000,500000
DC 100000,200000,500000
PA 50000,100000,-25000

Kinematics Controller

The typical motion controller fails when it comes to dealing with the motion on linked axes.  I know a company that had a prototype SCARA robot, using a MEI controller, that was never sold because programming it would have been too difficult — if you wanted to move the end effector to point XYZT you had to figure out the correct positions for each of the axes.

What you need for robots and other machines with mechanically linked mechanisms is inverse kinematics, which means determining how to move the mechanically connected mechanisms to get the end of the mechanisms where you want it to go.

In the past, pretty much only the dedicated robot controllers supported kinematics and inverse kinematics.  Now, I’m happy to say, it’s a lot more common (my Robot Resources page has some links), especially in controllers targeted for packaging automation.

The PLCOpen standard has optional blocks for coordinated motion that includes standard blocks for kinematic transformations.  These transformations have to be supplied by the vendor, so if a PLCOpen motion controller doesn’t support it, you can’t add it.  Still, this is a big step forward.

I took a quick glance at the PLCOpen standard and a couple of kinematic controllers; my impression is that they still do not yet replicate the capabilities of a dedicated robot controller.

Robot Controller

From what I’ve seen, robot controllers still have the best motion capabilities but they may not be best in terms of communications, integration, or programming power.

Many robot controllers use languages based on either BASIC or VAL; for example, Denso uses a BASIC variant and Adept’s V+ is a VAL variant.  The robot vendors have been adding more options, too, such as:

Robots almost always use brushless servo motors.  Often, the controllers can also control a few extra servo motors, but not stepper motors.  The controllers normally have some built-in digital I/O.

Final Comments

To kind of tie everything together, here’s a summary by motion technology:

  • Pneumatics are easily controlled by all controllers.
  • Stepper motors can be controlled by some PLCs, all simple serial stepper controllers, all fieldbus stepper drives,  and most motion controllers.
  • Servo motors can be controlled by some PLCs, all simple serial servo controllers, all fieldbus servo drives, most motion controllers, and most robot controllers.
  • Robots can be easily controlled by kinematic-capable motion controllers and dedicated robot controllers.

July 31, 2013   2 Comments

Robot Primer 4: Motion Technologies

Before digging into robotics, I am going to take a short detour to look at typical ways to move (motion technologies) and common ways to control (automation controllers).  This sidetrack will help place robots into the wider automation world.

I am going to be pretty brief; for more information, start with wikipedia, internet searches, or books such as Industrial Automation: Hands On.


Pneumatic motion systems use compressed air to extend and retract cylinders. Pneumatic motion systems are easy to control (just turn the valve off or on), and are inexpensive to build. Providing a desired force is easy too: just use a regulator to control the pressure and use F=PA (force = pressure x area). On the downside, pneumatic cylinders are normally limited to two fixed positions (extend or retract), and compressed air can be expensive.

Stepper Motors

Stepper motors are brushless DC motors with rotors and stators designed so that a full rotation is divided into a number of equal steps. Since the stepper motor can move a step at a time or hold a position (assuming the motor has enough torque for the application), they can be run open loop (without feedback).

Since no feedback such as an encoder or resolver is required, stepper motors can be significantly cheaper than servo motors, they do not have servo dither (when the servo motor keep moving back and forth and never settles into position) and they are easy to control. You can buy a single IC stepper driver (from Allegro Microsystems, ST, TI, etc), connect it to power and the step motor, and get moving by giving the driver step and direction commands.

On the other hand, with standard drive technology, stepper motors quickly loose torque at higher speeds, waste energy (because the same amount of power is always used; it does not depend on the load), cannot dynamically respond to the load, and can lose position without warning.

Servo Motors

Servo motors are brushed or brushless DC motors with feedback, typically encoder or resolver. They can be rotary or linear motors. They require a complex closed loop control algorithm (such as the classic PID method). Normally the control loop has to be tuned, and servo dither can be a problem.. Due to the added control and feedback, typically servo systems are more expensive than stepper systems.

Servo motors typically have a peak torque of 3-10x the continuous torque, their torque curve is much flatter than the stepper curve, and the maximum speeds are much higher. Peak torque is a great thing; often, a system just needs extra power for a short time to accelerate, overcome friction, or such.

Other Options

Of course, there are other options such as hydraulics, proportional pneumatics, piezo motors, solenoids, and voice coils.

July 18, 2013   No Comments

Robot Primer 3: Resources

I did extensive searching on Amazon and Google Books, and found many books on industrial robot theory, selection, impact on manufacturing, impact on society, etc, along with books on hobby robots, autonomous robots, and such.

I haven’t bought a robot book yet, but if I were spending my own money, I would buy one of the these two books:

Other good resources include Wikipedia, manufacturer’s web sites, and trade magazines. For more on these, please see the page I’ve created with hyper links to robotic resources including all the robot manufacturers that I know about.

July 13, 2013   No Comments

Robot Primer 2: Table Of Contents

Table Of Contents

  1. Introduction
  2. Table of Contents, Notes, and Outline (this post)
  3. Resources (and link to my Industrial Robot Resources Page)
  4. Motion Technologies (overview of pneumatics, stepper motors, and servo motors)
  5. Motion Controllers
  6. Why Use A Robot?
  7. Robot System Overview
  8. Robot Types (Articulated, SCARA, Cartesian, and Delta robot arms)

Notes and Outline

In this series, I might go back and improve posts to make the entire series more coherent.   Of course, this post will be updated as I post more sections.

Here is my outline for what I plan to cover.  Since I’m writing some of the material as I go, the end result might be a bit different.

  • Why use an industrial robot: the one page version
  • Industrial robot resources
  • Methods of motion
  • Industrial controller overview (PLC, PACs, motion controllers, robot controllers)
  • What’s good about industrial robot controllers
  • Industrial robot alternatives

July 2, 2013   No Comments

Robot Primer 1: Introduction

A Programmer’s Introduction To Industrial Robots

Since many books and articles on industrial robotics have already been written, why I am spending time writing this? Because I am frustrated by the existing material. The books are typically textbooks or academic books, going into the nuances of robot control theory or painting a broad overview. In the magazines and on-line, I’ve seen marketing white papers and application stories, which can be useful, but don’t go into depth.

I’ve sub-titled this series A Programmer’s Introduction To Industrial Robots because I am writing from a software developer’s point of view and my goal is to give some idea of what industrial robots can do, not to write an authoritative text.  (I’m using Robot Primer for the title because that’s its short but still gives the basic idea).

My robotic experience has been using Adept and Denso robots to do precision assembly and test. I don’t claim to be a robot expert, but I did have to do some uncommon operations and thus become familiar with Adept and Denso tech support. I had good experiences with both companies’ robots and technical support, and would use them again, but I’ve also heard good things about other vendors.

I view robots as an alternative to other automation options such ball screw stages, pneumatic cylinders, and such, not a replacement for people. This view probably reflects my Silicon Valley background.

Since I am most familiar with Denso robots I might be a little biased towards them, but most of what I cover should be applicable to other manufacturers.

I am only going to cover tradition robotic arms with controllers (such as SCARA and articulated robots), not autonomous robots, mobile robots, etc.

The goal of this series is to provide a basic understanding of industrial robots, with an emphasis on the controller’s programming and capabilities, so that by the end you should have an idea of when a robot might be a good choice, and then can do more in-depth research on your own.

June 27, 2013   2 Comments

Cool Components: ACS EtherCAT To Analog Drives

One complaint I have about most proprietary motion control field buses is that the I/O choices available are very limited.  Standard field buses such as CANOpen, Ethernet PowerLink, and EtherCAT have a much better selection of I/O modules as well as a wide selection of drives, but there’s one device that’s hard to find on most motion networks, proprietary as well as standard: an interface to analog servo drives.

Analog servo amps are still important because specialized equipment such as piezo motors can require you to use a custom servo amplifier, which typically has a +/- 10V analog input.  So if you want to use these devices on a network, you’re out of luck — unless you can get a network to analog drive.

The Logosol LDCN is the only proprietary motion network I know of that has drives with an analog output (they are the LS-160, LS-170F, and LS-180).

I’ve only found one company making analog output drives for a standard motion network: the ACS Motion EtherCAT intefaces.  ACS has various models.  The SPiiPlusUDI modules can control 2 or 4 analog servo amps.  The SPiiPlusPDM modules can control 2 or 4 step/dir input drives, including step/dir servo drives, stepper drives, or laser generators.

I think the UDI modules are more useful, but I’m sure the PDM modules can be handy.  For example, if you want to use a proprietary Asian servo motor that has to be used with a proprietary drive that takes step/dir input.

Important note: after I wrote this, I had a discussion with a local ACS distributor, and he said he was pretty sure that the ACS EtherCAT drives and modules will only work with ACS motion controllers (hardware or software).  So, if you’re interested in these modules but don’t want to go 100% ACS, please check first.

May 30, 2013   No Comments

Cool Components VIII: Make Your Own Metal Buttons

At the Design West 2012 / Embedded Systems Conference I had the opportunity to try out a unique technology: Microchip Technology’s mTouch metal over cap buttons.  This technology provides the capability to fairly easily create affordable custom non-contact metal buttons.

Since this technology uses capacitive sensing, the buttons are non-contact and should have a long life.  However, they’re still very short stroke and thus provide very little mechanical feedback.  Microchip’s demo used LED point lights to provide feedback.  Microchip’s demo kit currently isn’t available for sale, but they said it was coming sometime, probably for less than $100.

You could use this technology to make ESD-safe buttons.  However, since the metal needs to bend a bit, it won’t be as rugged as the more expensive anti-vandal buttons.

I’ll probably buy the demo kit when it comes out, because it’s a cool gadget…

May 1, 2012   No Comments