Operation
2
Robot Arm" command sent by the host controller, and then send a series of commands to the Magellan Motion
Processor to execute this motion sequence. At the end of the motion sequence the user application code might send
an "Arm Extended" message confirming the movement sequence has completed.
One method of achieving this is to use the Prodigy/CME PC/104 card's peripheral mechanism described in
Section 3.2.1, "Peripheral Connections," on page 60 to open, and operate, a low-level communications link via the
serial, CANbus, or Ethernet link. This method has the advantage of giving relatively direct control over the
communication traffic. The disadvantage is that the user has to implement specific send and receive communications
in the host controller, and the C-Motion Engine needs to have similar code implemented that can process these
messages.
Another method that may be more convenient, particularly during early debugging of the user's application code, is to
use a capability of the PRP system to connect directly to the user application code on the C-Motion Engine. Messages
sent and received by the C-Motion Engine from a host controller are stored in a special buffer, and can be easily read
or written to by the user application code. In addition, PMD's Pro-Motion application supports a simple way of
entering, sending, and/or receiving such messages. This makes it easy to manually enter commands from Pro-Motion
and exercise the user application code which is programmed to parse these messages.
To utilize this approach, a PRP
messages within the C-Motion Engine a special 'user packet' peripheral is opened. For more information see the
Prodigy/CME Programmer's Reference.
In addition to these communications commands, when sent to the
performs a basic connection check. The message body is empty. A return without a PRP error code indicates that the
C-Motion Engine is accessible and processing commands.
2.4.5
To develop code that is downloaded to the C-Motion Engine, a communications link is required between the C-
Motion Engine and the PC-based C-Motion Engine Development Environment. This link contains the information
required for code downloads, as well as other information utilized during application debugging.
While serial, CANbus, or Ethernet can all be used as the communications link during development, for the Prodigy/
CME PC/104 cards, typically this link is the Ethernet bus, because it is more convenient and faster than serial and
CANbus.
Selecting which Prodigy/CME PC/104 communication channel will be used for code download is specified via the
C-Motion development system. For more information see the C-Motion Development Tools Manual.
2.4.6
During development, the user can use procedure calls similar to printf() from the downloaded application on the C-
Motion Engine to send messages to the PC Development Environment for display in a special console window. These
console messages may be useful for checking code progress, displaying internal variables, or for other code
development-related purposes.
The default console channel is Serial 2, however this can be changed using the PRP action
specified as Serial, CANbus or Ethernet/UDP.
44
Send
or
Receive
Connecting to the C-Motion Engine Code
During Development
Debug Console Window
action is sent to the
CMotionEngine
CMotionEngine
Prodigy/CME PC/104 User's Guide
resource. To receive these
resource, the PRP action
NOP
Set
with the
Device
resource
Need help?
Do you have a question about the Prodigy Series and is the answer not in the manual?