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

Programming CANOpen Motion

How do you make a CANOpen motion control system move?  Your program creates the desired motions by sending the appropriate commands over the CAN bus using the vendor independent CiA 402 profile.

A CANOpen profile is a standard set of objects to interface to a particular device type, such as inputs, outputs, encoders, or motor drives.  A profile that is still being evaluated is called a Draft Standard; eventually it will become a CiA (CAN-in-Automation) standard.  So CiA 402 was originally called DS402, and is still often called DS 402.

Most CiA standards are available from the CAN in Automation web site for free by requesting the desired standards.  However, CiA 402 is not available.  I suspect the reason is that CiA 402 is now part of the IEC 61800-7-201 and IEC 61800-7-301 standards, and thus are only available from the IEC.

I was able to locate and download a copy of the older DS402 standard; there might be a few changes, but it should be good enough for my uses, and I also have the various manufacturers’ guides on how they implemented CiA 402.

Ease of use is one weakness of CANOpen.  I’ve been looking through DS 402 and although it may be well designed, it’s not easy to learn.  I think more vendors should do what Copley Controls does: provide a much easier to use interface that makes it much faster to get started with their drives.

Another approach is to have a motion controller that controls the CANOpen axes, such as the Schneider LMC (Lexium Motion Controller) series, the Elmo Maestro, and (for Ethernet PowerLink) the Balder NextMove E100.  In this case, your program interacts directly with the motion controller instead of the CANOpen drives.

January 21, 2012   5 Comments

XY Table Part 3: Major Components

XY Table Components

XY Table Components

What are the major components and why did I choose them from my stock of automation components?

  • XY Table – a Parker Daedal simply because it’s the only one I own.  I can’t find a part number on it, but it looks similar to a 806006CTE5D1L2C1M1E1.  It’s a beefy cross roller stage with 0.2″ pitch (5 turns per inch) ballscrews and NEMA 23 motor mounts.
  • Joystick – a CH Products HF22S10-U USB hall effect joystick, because it’s an awesome joystick.  Besides, the USB interface is a lot easier to use than analog voltage or resistive interfaces.
  • PC – a Shuttle X50 all-in-one because it’s compact, has a touchscreen, and has plenty of USB ports.
  • CAN Interface – a Kvaser Leaf Light, because it’s really nice, I haven’t featured it before, uses a USB inteface (the X50 has no PCI slots) and it’s well supported by Copley.  My Ixxat USB to CAN compact would also be a good choice.
  • Drives – Copley Accelnet ACP-055-018 and Stepnet STP-075-07.  I also have AMC and Elmo CANOpen servo drives, but Copley was my choice because I only have Copley stepper drives (and I want to show stepper performance versus servo performance) and only Copley includes high level software (CMO, Copley Motion Objects).
  • Servo Motor – currently a MCG IB23000-E1 because this is a typical NEMA23 servo motor and I haven’t used it before, so I can describe getting an unknown servo motor up and running.  Besides, my Emoteq BH02300’s are too fast.  If it doesn’t work (and someone has written “Bad Hall” on it), I’ll substitute another servo motor after describing my troubleshooting.
  • Stepper Motor – a Sanyo Denki Step Syn 103-771-16 because it was the first single shaft NEMA 23 stepper motor that I found.
  • Power Supply – my trusty Logosol LS-1148.  I’ll be using the E-STOP input option.
  • E-STOP – a IDEC AOLD39911DN-R-24V lighted 30mm mushroom switch.  It’s not really an E-STOP, but it should work OK, I like IDEC’s quality, and I was able to pick up a couple for a good price on eBay.
  • Development Tools – SharpDevelop, because it deserves to be highlighted.  Microsoft Visual Studio would also be a good choice, and the Express Editions are free, but SharpDevelop has some unique features that can be useful even if you already have Visual Studio.  Besides, I’m pretty sure the download is a whole lot smaller.

I do have enough equipment that I could use a traditional motion controller (Galil or MEI) and analog servo amplifiers (AMC), but I decided to go the CANOpen distributed route because it’s a heck of a lot less wiring.

October 18, 2011   1 Comment

Best Industrial Equipment For The Garage: 2011 Update

Overall my original post on buying surplus industrial automation equipment is still on the mark.  I won’t repeat it again this year; instead, here are some comments based on 3 years of monitoring eBay and adding to my collection.

In Silicon Valley there are only two decent electronic surplus stores: Excess Solutions and Advanced Component Electronics.  There hasn’t been a good local source for mechanical surplus since Triangle Research closed its doors.

On the web, PLCCenter has a great selection, is great for getting an idea of what stuff costs new, but has premium pricing (except for some on-sale items).

eBay is still the best source, but you need to be patient and know what equipment is worth.  In general, I’m willing to pay 10-20% of the original cost, but many eBay sellers try to get 50%, and a few even ask for more than 100%.  In general, “Buy It Now” means “I think my junk is worth a lot”.  Availability is very spotty; some months there’s a lot of interesting stuff, some months there is nothing.

Also, be sure to check condition and return policies.  Many eBay sellers do not have the ability, equipment, or inclination to test industrial equipment, so if it says “as-is”, don’t pay a lot.  Most of the industrial equipment I’ve bought has worked, but I’ve bought a number of AMC and Elmo drives that don’t want to communicate (since the lights blink, I haven’t given up yet; I haven’t had time for extensive troubleshooting).

Don’t forget new equipment; many vendors (including Siemens and Panasonic) have offered somewhat-affordable starter packages including equipment and software (e.g. PLC and programming software).  Some new PLCs are so inexpensive you don’t even need a starter kit: for example, Automation Direct’s Click PLC starts at $69 and the software is free.

Comments on specific equipment:

  • Last time I checked, it appears the Cognex Insight smart camera software is now a free download (after registration).  But I recommend verifying this before buying an Insight camera (which will probably cost >$100).
  • DVT smart cameras are still often available on eBay, with pricing ranging from $50 (Legend 510 bought at the right time) to $500 or more (color model such as the 542C).
  • Galil motion controllers availability is good, with a wide range of pricing (there are many unrealistic sellers).  USB and Ethernet models are more expensive, although if you’re lucky you can buy one for under $250.
  • CANOpen interfaces from Kvaser and Ixxat are frequently available for $50-$150.  I’d recommend getting a used Kvaser or Ixxat instead of a new interface from someone else (which will be at least $100 anyway) because they have the best software support.
  • Copley CANOpen servo drives are available fairly often; a reasonable price for an Accelnet is $50-$120; the Xenus is more expensive (>$150).  The Accelnets are my favorite servo drive.  I avoid the older models (800-xxxx)  because I can’t find any documentation for them.
  • Elmo CANOpen servo drives are frequently available.
  • Ethernet Powerlink drives and EtherCAT drives are occasionally available , but the prices typically aren’t reasonable.
  • MEI controllers are often available, at a wide price range, but I’ve never seen the software included.  If you don’t have MEI software, don’t buy the board.
  • Panasonic PLC’s are frequently available, but in general I think the asking prices are too high.  At least Panasonic now provides a code-sized limited (but still quite useful) free version of FPWin Pro 6.
  • Opto 22 I/O controllers, such as the B3000 and LCSX, are frequently available, often at reasonable prices ($50 and up).  Opto 22 PACs are rare and expensive, especially the current models.  Opto 22 I/O module availability is good.
  • Wago 750 and Beckhoff K-bus availability is good, and, if you’re patient, you can get them at a reasonable price.
    • The most popular couplers are for DeviceNet, CANOpen ($25-$75), Profibus, and Ethernet (>$100 for 750-842); I’ve also seen Interbus, serial, and EtherCAT.
    • Digital input and output modules are the most common, and cheapest.
    • Analog modules are less common, and more expensive, but if you’re patient, you can get one for <$50.
    • Specialty modules, such as encoder interfaces and stepper drivers, are the least common and most expensive.

June 20, 2011   5 Comments

Connecting Emoteq and PacSci Motors to Copley Drives

Copley Stepnet Connected to Pacific Scientific Stepper Motor

Stepnet with PacSci Stepper Motor

I’ve decided to document all the motor/drive connections that I make using my CANOpen drives.  I hope that others will find this information useful.  The first two are up on my trac site:

It was a lot easier to connect the stepper motor, but the servo motor is more fun.  It maxes out at 7,500 RPM using my Logosol power supply.

November 17, 2008   No Comments

Making Copley Serial Cables

Copley RJ11 to DB9F serial cables

Copley RJ11 to DB9F serial cables

I have a new page here on my trac site describing how to make a RJ11 to DB9F serial cable for Copley Accelnet and Stepnet CANOpen drives.

November 7, 2008   No Comments

Copley CMO and Ixxat VCI Drivers

As I’ve mentioned before, Copley’s CMO is a set of COM objects that provide a higher level interface (than the raw DS402 profile) to Copley’s CANOpen drives.  Right now, I am starting to use CMO since I need to get my Copley drives up and running quickly.

So I installed the latest Ixxat VCI drivers (V3) and then verified my Ixxat USB-to-CAN compact was working by sending and received CAN messages.  I installed CMO 2.5, fired up MS Visual Studio, ran the Copley example, and got this exception:  Access is denied.  (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED).  Hmmm.  I started VB6, ran the VB6 example, and received this error: Permission denied, which looks like another way of saying E_ACCESSDENIED.

I contacted Copley.  The answer: CMO V2.5 only supports Ixxat using the older (VCI V2) drivers.  In the future, CMO will support VCI V3, but not yet.

So then I try installing VCI V2 – and had problems communicating with the Ixxat (error 0x1F hardware error).  I contacted Ixxat, and went through their recommended procedure:

  1. Uninstall VCI V2 drivers, then reboot.
  2. Uninstall VCI V3 drivers, then reboot.
  3. Run Ixxat’s VCI Clean program to clean up any stuff left in the registry and on the computer, then reboot.
  4. Re-install VCI V2 drivers.

Even after that procedure, I still couldn’t get the VCI 2 drivers to work.  I suspect it might be a problem with Windows and my particular USB controllers, but it’s not worth troubleshooting since the Ixxat is working fine with the VCI V2 drivers on a nearby computer.

In the future, I’ll install the VCI V2 drivers first, then VCI V3 (normally you can switch between them).

November 7, 2008   No Comments

Best Industrial Equipment For The Garage

Let’s say you want to learnplay with real industrial automation equipment in your garage (or living room, if you’re single), not toys like the Lego Mindstorm. After all, learning is fun, and it’s cheaper than taking college classes (that’s what I tell my wife). Unless you’re rich, buying surplus is the way to go.

In the past, if you lived in the right area you could visit the local surplus store. Silicon Valley used to have a lot, but most of them disappeared during or after the dot-bomb bubble and subsequent crash. Still, there are a few places left, such as Triangle Machinery (the best place for mechanical stuff) and Excess Solutions. DeAnza College hosts the monthly Electronics Flea Market.

Now the overall situation is better because of on-line sites such as eBay (still the best overall), craigslist (worth checking, but probably best for test equipment), DoveBid (typically best for test equipment or large industrial equipment), and PlcCenter.

Mechanical items such as stages and motors are pretty easy to use. But when looking for equipment such as motion controllers or PLC’s, you need to consider:

  1. What software does the equipment require? The best case is when the equipment comes with software or you can download the software from the manufacturer’s web site. Next best is when the necessary software is at least somewhat reasonably priced (so you can afford to buy it (e.g. some PLC software)). The worse case is copy protected software (Allen-Bradley, Cognex, and many others).
  2. Does it come with documentation or can you download it?
  3. Are the necessary accessories readily available? If it’s a rack, backplane, or snap-together system (many PLCs, Opto 22, Beckhoff, Wago, etc), you have to be able to get all the required pieces (backplane, power supply, CPU, I/O modules, etc). For a motion controller, are the break out boards and cables readily available?
  4. What are the power requirements? Many servo drives are 3 phase 240V or 480V.
  5. Is it readily available surplus? Important if you want to expand later.
  6. Have you used it before? Familiarity obviously helps.

My recommended list:

  • Galil motion controllers. Yeah, the two letter commands are stone age. But Galil controllers are readily available on eBay, you can download all the essential software and documentation, the connectors and breakout boards are readily available (but if you buy them new they might cost more than the controller cost on eBay!), and it’s easy to get started.
  • Opto 22 PACs. I haven’t used them, but software for the SNAP controllers is free, and they’re often available on eBay.
  • DVT smart cameras. Software for the older models is free, and they’re often available on eBay. I’ve heard that software for newer (after Cognex bought DVT) models is protected.
  • CANOpen is a mixed story. CANOpen availability is good (AMC DX15C08 Digiflex drives are readily available at great prices, other drives such as Copley Accelnet, Copley Stepnet, Baldor MintDrive, and Kollmorgen Servo Star are occasionally for sale, and I/O controller such as Wago 751 series are sometimes seen). However, you will need a CANOpen interface (I recommend Acacetus VCCM or Peak USB-CAN because they’re supported by CanFestival). Getting started with CANOpen is still a lot of work; starting from no knowledge, it takes much more effort than getting a Galil system up and running.
  • Plenty of others, including many I haven’t heard of. Other possible examples include Logosol, Animatics SmartMotor (also stone age commands, but…), and JR Kerr’s PIC-Servo boards (quirky, but affordably priced new).

Not recommended:

  • MEI motion controller without software – nice boards (the XMP looks really nice), and occasionally seen on eBay, but IIRC the software is $4900 for the older systems and $19,000 for the XMP.
  • Cognex Insight smart cameras. Nice systems, often available on eBay – but every time you install the software you have to call Cognex to get a key for that particular PC.
  • Most PLC’s, especially any you have not used, unless they come with programming software and the appropriate licensing (dongles, disks, etc). The “big name” vendors like Allen-Bradley tend to like nasty copy protection schemes – software keys that have to transferred via floppy disks are the worst, since they are so easily lost (and who has floppy drives anymore?) . At least hardware dongles are harder to lose.
  • Anything you don’t know about or can’t find out about.

Some good sources for cables and breakout boards:

Sometimes it takes patience and multiple sources to put a working system together. I bought my Wago 751 series CANOpen controller from eBay, but I bought the I/O modules from PlcCenter (they were available at reasonables prices). I bought my Festo CPV-10 CANOpen control module from eBay about a year before I found the CPV-10 pneumatic manifold and valves available at a reasonable price.

Note: go here for my 2011 Update


June 26, 2008   23 Comments

CANOpen Annoyances – I

Updated 12/14/2007 with more vendors

More notes added 4/19/2011

It’s obvious I like CANOpen, but it does have its downside. Areas that could be much improved include:

  • Too many connector types. OK, I can see a need for more than one connector type. But 20 types? Powering isolated CANOpen transceivers is not consistent either – I am going to design and build some interface boards to make it easier (results are here). Just giving examples from my favorite vendors:
    • My CANOpen interfaces both from Ixxat, Kvaser, ESD, Peak, and Grid Connect have DB9M CAN connectors, but do not provide any power. (The PEAK dongle can be easily modified to provide +5VDC on pin 1 and/or pin 9).
    • The DB9M connector seems standard for CAN interfaces – Kvaser, Ixxat, Softing, Peak, and Gridconnect all use it. The Ixxat USB/CAN interface has RJ-45 connectors, with RJ45/DB9 adapter.
    • The AMC DX15 uses a DB9M connector, and requires 7.5-13VDC on pin 9.  Current AMC CANOpen drives use dual RJ45s.
    • The Wago 750-337 has a removable screw terminal connector, and its isolated CAN transceiver is powered internally. (The 750-338 has a DB9 connector).
    • Copley Accelnet Panel drives (ACP-xxx-xx) use RJ-45 CAN connectors, and look like they need +5VDC on pin 8.  Copley ACP and ADP drives have a built-in DC/DC converter.
    • Copley Accelnet Micro Panel drives (ACJ-xxx-xx) use Samtec 10-pin crimp and poke connectors, and need power on pins 1 and 6.
    • IMS CANOpen MDrives (stepper motor + drive) use either DB9 or 5-pin micro (M12F) connectors, and look like they require 7-30VDC on pin 9.
    • Elmo’s Cello and Harmonica drives use a RJ-45 connector, are isolated, but don’t require external power.
    • Kollmorgen S200 Series uses 5-pin removable terminal block.
    • Technosoft IDM680 uses DB9M, and needs +24V.
    • Technosoft IDM240 and IDM640 uses what looks like a RJ-11 connector.
    • Faulhaber MCDC3003C and MCDC3006C drives use DB9M with no power.
    • Maxon EPOS uses a 4-pin Molex Micro-Fit connector, no power, and a Molex to DB9M cable available.
  • Raw CANOpen is pretty primitive – certainly not a good basis for rapid development. This is a bit better than I thought.
    • Copley’s CMO (ActiveX) is free for use with their drives. CML has a license fee which is reasonable. Both are higher level interfaces, and would make working with a Copley and Wago only system easier. However, as far as I can tell, the libraries only work with Copley drives and Wago I/O modules, so if you need to mix and match, it won’t work.
    • Elmo’s Maestro Multi-Axis Supervisor and Composer software look interesting (might make CANOpen development much quicker), but I’m pretty sure they only work with Elmo’s drives.
  • Software needs much more standardization – what works with what is still too restricted. To give some examples:
    • IMS requires Peak CAN interfaces (resold as the MD-CC500) to download firmware updates.
    • Copley’s CMO and CML software only supports interfaces from Copley, Ixxat, Kvaser, NI, and Vector, and only supports Wago I/O.  Setup can be done over serial or over CAN (except for Ixxat).
    • Elmo’s Interlude software supports Ixxat, Softing, and Kvaser.
    • AMC’s Driveware configuration and setup software works with CAN interfaces from Advantech, Ixxat, Kvaser, Vector, Port, Ifak, and ESD.  Newer AMC drives use a serial port for setup.
    • Faulhaber’s Motion Manager software only supports Ixxat.
    • Maxon supports Ixxat, Vector, and NI.
    • Wago appears to supply no software, just the EDS files.
  • Most CAN interfaces do not include CANOpen software – it’s either not available or is yet another cost (Kvaser was the exception IIRC). Softing includes a free CANOpen API (LeanCANOpen).  Go here for my current list of CANOpen software.

So if you need to mix and match (one of CANOpen biggest advantages), you are going to have fun. Think about a system needing a high power AMC drive, some Copley Accelnet Micro Panel drives, and some IMS MDrives. You’d need a Peak CAN interface to update the MDrives, but a Ixxat, Kvaser, or Vector interface to setup the AMC and Copley drives. You’d have to use different GUI software to setup the AMC and Copley drives. And you could drive using Copley’s higher level CMO or CML libraries with AMC and IMS, but there’s no guarantee that they will work (and I’m pretty sure no support). You would have to deal with different connectors (DB-9, RJ45) and different, incompatible voltages to power the CAN bus.


September 12, 2007   5 Comments