![Performance Motion Devices PR8358120 Скачать руководство пользователя страница 61](http://html.mh-extra.com/html/performance-motion-devices/pr8358120/pr8358120_user-manual_1529622061.webp)
Accessing Card Resources
Prodigy/CME PC/104 User’s Guide
61
3
Example
Figure 3-2 on page 61 shows a network configuration. The host controller needs to initiate, send and receive a message
to/from a specific device connected on the CANbus port.
Figure 3-2:
Example
Network
Configuration
This sequence will be accomplished in three steps. PRP messages will be assembled that comprise the
Open
action,
and then in turn the
Send
and
Receive
actions. As for all PRP messages, the resource ID, the address, and the Action
ID must be specified. In this example, to start the sequence the Resource is a 4 specifying a
Peripheral
, the Action ID
for
Open
is 2, and the PRP address will be loaded with a 0. The message body is loaded with a code for the sub-action
OpenCAN
as well as the detailed CANbus communications parameters to establish the connection such as baud rate,
send address, and receive address. For the exact message body of this and all PRP actions refer to the
Prodigy/CME
Programmer’s Reference
.
To simplify the nomenclature for PRP messages, a shorthand will be used which contains the mnemonic ‘PRP,’ the
Resource ID, the string ‘Addr,’ the resource address, and the PRP action. Any additional information pertaining
to the error code or message body will be contained in the comment for the message.
NewPeriphID = PRP Device, Addr 0, Open
// Send a request to open a connection to the device being
// addressed via the CANbus port.
// The Message body contains the detailed CANbus parameters
// for that connection.
// The Address of the new Peripheral connection is contained in
// the body of the return message.
PRP Peripheral, Addr NewPeriphID, Send
// Send a message, contained in the message body, to the CAN
// bus connection created using the Open command. Note that
// the Peripheral address provided in the previous command is
// used to identify which Peripheral connection the message
// should be sent to.
PRP Peripheral, Addr NewPeriphID, Receive // Receive a message. The string will be contained in the message
// body of the return message, from the CANbus Peripheral
// connection.
Ethernet/TCP
C-Motion
Engine
Magellan
Prodigy/CME
PC/104 Card
Host Controller
CANbus
device
CANbus
device
CANbus
Содержание PR8358120
Страница 6: ...vi Prodigy CME PC 104 User s Guide This page intentionally left blank ...
Страница 8: ...viii Prodigy CME PC 104 User s Guide This page intentionally left blank ...
Страница 56: ...Operation 56 Prodigy CME PC 104 User s Guide 2 This page intentionally left blank ...
Страница 68: ...Accessing Card Resources 68 Prodigy CME PC 104 User s Guide 3 This page intentionally left blank ...
Страница 88: ...Electrical Reference 88 Prodigy CME PC 104 User s Guide 4 This page intentionally left blank ...
Страница 98: ...Interconnect Module 98 Prodigy CME PC 104 User s Guide 5 This page intentionally left blank ...
Страница 102: ...102 Prodigy CME PC 104 User s Guide This page intentionally left blank ...