Hi and welcome to another TekTips
video!
Today we're showing you how to
control ClearPath SC integrated servo
motors using a BeagleBone Black single board computer.
ClearPath SC is the
latest addition to the ClearPath family
of integrated servo motors and it
incorporates a C++ class library called, "sFoundation."
This C++ library runs
directly on a wide range of linux hosts
such as this BeagleBone Black as shown
here.
With these components, OEMs can
create motion control applications like
this four axis synchronous demonstration.
Many high-volume OEM machine builders
are taking advantage of a growing wave
of open source single board computers
such as the BeagleBone Black,
the Raspberry Pi
and many others.
These single board computers have some
interesting attributes in terms of cost,
size, flexibility and supply chain
availability over traditional PLC
and PC based solutions.
With these products, OEMs
are able to release cost-effective
versions of their OEM machines.
All of these single board computers are great
value as most are in the $50 price range.
For example this BeagleBone Black has a
fast arm main processor running at over 1 GHz.
It has 512 MB of main memory
and 2 GB of flash
for software kernels, libraries and applications.
There's a couple of USB
ports for peripherals and expansion.
It also has an SD micro interface for extra
storage or can substitute as an
alternative boot device.
And finally, there are a wide range of I/O
peripherals such as I2C, SPI,
multiple UARTS and standard
general-purpose inputs and outputs.
This kind of power, memory and I/O expansion
makes the BeagleBone a good option for
embedded machines and applications.
What about availability?
The BeagleBone Black was introduced over three years
ago with hundreds of thousands shipped
since.
The Raspberry Pi is even more
successful with millions sold.
Here's a recent web search for
BeagleBone showing current availability
from popular distributors such as Mouser,
Sparkfun and Newark so there's plenty of
inventory with next day shipping.
OEMs can source the same computer for their machines for a really long time.
So, physically wiring a BeagleBone Black
to a ClearPath SC motor
is actually quite straightforward.
Let's get started.
Here we're using the Linux based BeagleBone
as a host directly communicating to
four ClearPath motors
via a local USB 2.0 port
to a four axis breakout board.
You can also use one of the local UARTs as
opposed to the USB 2.0 port.
This breakout board called an SC4-HUB
conditions the I/O and communication
signals from the BeagleBone itself,
and like the BeagleBone itself the breakout board is open-source and can be modified
to directly fit your machine and I/O
requirements.
The blue cables, one to each motor,
carries the communication signals
along with a couple of local I/O points
which we're not using today.
Here's an alternative schematic view of our exact
setup showing the BeagleBone, the ClearPath motors and all other options.
See our accessories guide for a complete
list of options and cables for use with
the ClearPath  SC motors.
ClearPath SC itself is expandable from any host like
a PC a BeagleBone or Raspberry Pi you
can daisy chain up to four of these
breakout boards per host port for a
total of 16 axes per USB or serial port.
The ClearPath SC C++ class library
supports multiple ports, so a single board
computer can command up to 16, 32, 48 or even more axes per single board computer.
Let's review the software for these platforms.
All of these single board computers can run several derivatives of Linux or other
operating systems like QnX and
VxWorks.
And like the hardware, the software is
open-source and is entirely free.
There are plenty of forums, instructional
videos and websites providing
technical support and code examples.
With ClearPath SC there are no cryptic 2-letter-codes
and archaic development tools.
sFoundation's English-like syntax,
and tools like keyword-auto-completion and context-sensitive-help enable you to learn quickly.
And Teknic's C++ class
library, all open source,
is naturally royalty-free with popular
development environments like the
Eclipse IDE along with the ClearPath 
C++ API you can create embedded
applications that natively achieve
throughput in excess of a thousand
commands per second.
But for this environment we've already completed a
lot of the heavy lifting for you
including: preparing a boot image of
Ubunto Linux for BeagleBone Black along
with instructions for flashing this
image from an SD card.
Instructions for installing and configuring Eclipse, a popular IDE.
Instructions for downloading
and synchronizing the source code for
the C++ class library, and there's
several well-documented motion and I/O
source code examples that cover many of
the topics discussed today all as
Eclipse projects.
These instructions, code
examples and more are all found as web
links within the video description below.
ClearPath SC integrated servos include
the rare-earth permanent magnet
brushless servo motor, a high resolution
encoder, a digital servo drive, along with
an integral motion controller.
Single-stage NEMA 23 brushless smart
motors list for $299
with substantial discounts for OEM
volumes.
There are a couple of unique
points worth mentioning with the ClearPath SC integrated servo motors.
One is a
distinct and separate diagnostic port on
all ClearPath motors that can be used
to independently view and diagnose code
running from any host like this
BeagleBone Black.
So even though our main,
four axis C++ application code is
running live on a Linux computer, this
ClearView application enables us to
view everything happening in real time
on this particular node.
For example we can view velocity profiles,
positional accuracy,
actual torque,
and even local I/O all with no effect on the main application
running on the Linux single board computer.
For this demonstration I use ClearView to get all the motors
configured, tuned and optimized before a
single line of C++ code was compiled on
a Linux based BeagleBone Black.
ClearPath SC motors come in two firmware types, basic and advanced.
Both versions support multi-threaded applications,
running natively on Linux or Windows.
Here we're showing the basic firmware which,
as you can see in slow motion,
provides multi-axis synchronization.
The advanced firmware adds more capabilities
such as:
a Spline Motion Engine enabling
different motion profiles such as
asymmetric accelerations.
These are profiles with different excels and decels.
Head Moves,
which run at a lower velocity
before accelerating to your final peak velocity.
Tail Moves,
which run at a lower
final velocity before coming to a stop-
this is appropriate for applications
like clamping.
And you can further increase the
multi axis coordination
with triggered move commands both
software and hardware triggers.
The advanced firmware also includes the
patented G stop vibration suppression
algorithms,
helpful for getting around mechanical resonances.
There's also a wide range of automatic, conditional torque limits,
and many more features.
So that's it for this overview video of
a BeagleBone Black controlling
four ClearPath SC integrated servo motors.
Remember that the ClearPath  library and
application code was written in C++ and
is therefore portable across other
hardware platforms like the Raspberry Pi.
I hope this TekTips video was helpful and informative.
If so, please click the thumbs up like button!
Click the Teknic logo to
subscribe and you'll get notified
whenever we release a new video.
And please feel free to comment and ask questions,
we love getting feedback it's
often very helpful for everyone.
Thanks for watching.
