Posts from — June 2007
Time to get practicing my CANOpen skills.
June 30, 2007 No Comments
Here is my quick overview of modern software development trends. It’s somewhat quirky, but software development is a big area, all the way from programming $0.50 PIC micros in toaster ovens to massive web services and supercomputers.
Where do I pick up these trends? From trade magazines (after applying my hype discount factor), web blogs, discussions with other programmers, and what works for me.
- Version Control and Bug Tracking that work. These are essential for good development, but I suspect that most automation developers, at least at small companies, still do not use them.
- Design Patterns – a good way of talking about software architecture.
- Unit testing and Test Driven Development – somewhat hard to apply to automation software, but definitely making waves right now in desktop and web development.
- Refactoring – restructuring and improving existing software, instead of doing a ground-up re-write.
- Agile Development – iterative, customer focused development instead of BDUF (Big Design Up Front).
- Dynamic languages – allow rapid development, better re-use of existing components, run time customizations.
- Mixed language development – use appropriate tool for the job. A desktop example is Adobe Lightroom, written in Lua and C. I do a lot of this (especially when including IEC 61131 as a language)
- Web technologies – interesting stuff, but I think factory software developers should not get caught up in the hype.
- Open Source – some very good products to add to your toolkit.
I plan on discussing many of these techniques in the future, using concrete examples of the tools I use and like. For example, I will use Subversion when discussing version control.
Comments 4/5/2011: still good stuff, but unfortunately I haven’t followed up (limited by lack of time and my fun excursions into PCB and MCAD land).Â I need to write more about these topics.
June 21, 2007 No Comments
Open source software is a great resource. If you’re going to use and modify open source code in your machine, then you have to look at licensing issues very carefully. But there is another way to take advantage of open source software – by using open source projects such as Subversion to enhance your development process with no licensing worries.
Even if the majority of open source software can safely be ignored, there are many rock solid, high quality, well documented, Windows-friendly projects. Examples include:
- Subversion for version control with TortoiseSVN client for Windows
- Trac for project management and bug tracking
- Apache web server
- xUnit for unit testing
- Wix for MSI installers (OK, its documentation is a little weak, but it’s still what I use to create Windows installers)
- Programming languages such as Python, IronPython on .NET, and Lua.
What are some of the advantages of these top notch projects?
- High quality. For example, Subversion has a better reputation than Microsoft’s SourceSafe.
- Low cost, both in money (nothing) and time (due to good documentation).
- Ease of deployment – with Subversion, I don’t have to worry about how many users there are. Adding another user costs exactly $0.00, unlike adding a user on a commercial version control system
- No licensing hassles; there are no hardware keys, no software keys, and no chance of any software license audits.
- More stable path – no forced upgrades (upgrade when you’re ready), no worries about the vendor going out of business, no vendor agendas to worry about.
- Often commercial help is available if desired – so far I’ve done fine with the documentation and Google.
June 14, 2007 No Comments
In the past, Printed Circuit Boards were not a good choice for small volume machines because you had to pay significant Non-Recurring Expenses (say $500), and then buy 100 boards or so. If your design changed, well, all the boards in stock are now useless. If you make a mistake (somehow very easy to do with connectors), well, you either have to fix it (if possible) on all those 100 boards or throw them out. I’ve seen both problems first hand.
I still use break out boards and DIN-rail mounted terminal blocks for prototypes. Now with all the PCB prototype houses available, you can buy PCB’s in very small volumes with no NRE, so it makes sense to look at making PCBs even for very low volume designs. For example, with a credit card, for $96 plus shipping I can get, in four days, from Sierra Proto Express three double layer boards of the same design up to 60 sq in each (update 9/27/07 – well, Sierra’s changed their No Touch a bit; they claim the new pricing is even less expensive).
The idea is to design custom circuit boards to interface between my components (sensors, pneumatics, etc) and my I/O to reduce assembly time, improve reliability, and reduce troubleshooting. The PCB’s are mounted in DIN Rail holders.
Designing a simple 2 layer interface PCB is not that hard. For the first time through, you will need some help learning how to set everything up for the board house.
DIN-rail mount PCB holders are available from a number of sources. Two companies with a good selection of products are Phoenix Contact (especially UMK and UM series) and Weidmuller. I’ve used Phoenix Contact’s UMK series.
Phoenix, Weidmuller, Wago, and others make a wide variety of PCB mount terminal blocks including screw, clamp, and IDC. IDC terminals are very nice if the wire size is in the right range. Good sources for small volume electronics parts include Digikey, Mouser, and Jameco.Â Mouser typically has Phoenix products available in smaller quantities than Digikey.
June 10, 2007 No Comments
I was looking at automation blogs and come across this comment about Beckhoff:
“Europe’s most successful PC pioneer, Hans Beckhoff, has a simple two-part formula for success: 1. Put everything in software, on one platform, and 2. Give the customer everything he needs so he doesn’t have to buy anything else. “
Interesting, since Beckhoff makes its money selling hardware. But, its hardware is all PC connected.
A lot of people view copying the PC industry as the inevitable way forward for the automation industry. This means using PC industry standards, such as OPC (originally based on MS’s OLE technology), Windows XP and CE, Ethernet, PXI, and embedded PC’s.
The big advantage is the lower cost, and theoretically more standardization, but there are many disadvantages, such as:
- The short lifespan of PC technology. A personal example – I have a PC at home with a good Quadro AGP video card. How many new AMD AM2 motherboards support AGP? 1, and it’s not very good. So building equipment designed to last 5 years or more with generic PC technology will have problems with spares down the road.
- PC technology isn’t always so cheap. Sure, generic PC’s, even in a 4U rack mount case, are cheap. But if you need IP67, or fanless, or a PanelPC, or guaranteed spares – well, your performance goes down and your price goes up.
- Innovation is shifting away from PC’s. If an automation company continues to be PC-centric, they will miss innovation based on the new innovation drivers, such as web standards (now much sexier than MS’s COM technology), cell phones, and automotive electronics.
- Commodity OS’s aren’t real time. I know, I’ve tried to do very soft real time with Windows, and it wasn’t pretty. Linux looks like it’s slowly getting there for soft real time, but it’s not mainstream yet in the factory. Yes, there are add-ons, but they cost extra in money (e.g. Venturecom) or time (learning hard RT extensions for Linux)
- PC standards often do not support industrial needs well, and thus need tweaking; for example, the PCI bus morphing into CompactPCI and PXI, and Ethernet being extended with EtherCAT. But the volume goes down, prices go up, and you lose some of what made PC technology compelling.
- Too many standards – think of all the industrial Ethernet protocols.
- Old technology does not go away, so PC automation control needs to be able to communicate with the rest of the world, including PLC’s.
A company can’t be everything to everybody, and Beckhoff is right to focus on PC-centric automation. But if I were running an automation component company, my formula would be “1. Give your customer products that help him build better machines and 2. Understand you cannot meet all of your customer’s needs – integrate easily with the rest of the world.”
June 8, 2007 No Comments
Simple – because I couldn’t find any decent factory automation blogs. I can find plenty of software development blogs, but the few automation blogs seem to be all about company strategies and new products, not about the realities of trying to integrate various components together into a working system.
There is a lot to discuss about factory automation. My background primarily in building custom or semi-custom, relatively small machines. So I’m not very interested in hydraulics. But it’s still much more enjoyable to work on physical systems made of precision metal that move, than to work on the next overhyped and unreal Web 2.0 website (and don’t get me started on marketing abominations like “Instrumentation 2.0”)
But I also enjoy learning and applying better software development methods. Most of the factory world, however, is happy to make it into the 1970’s structured programming with IEC 61131. Unfortunately, IEC 61131 (especially structured text) looks good compared to many devices I’ve programmed, such as
- Galil’s motion controllers with “intuitive” two letter commands. They finally added structured IF…THEN…ELSE blocks, but it’s still pretty primitive.
- IMS’s MDrive Motion Control products.
- Animatic’s Smart Motors.
- And too many similar products I’ve looked at but fortunately haven’t had to program.
OK, to be fair, outside of the programming those aren’t bad products. In fact, I like the IMS MDrives with just the stepper motor and driver integrated – they work very well with Panasonic PLC’s, for example.
I’ll also be taking side trips into other areas such as desktop development, embedded development, and photography.
June 4, 2007 No Comments