24.06.2014 Views

EPOS2 Application Notes Collection - Maxon Motor

EPOS2 Application Notes Collection - Maxon Motor

EPOS2 Application Notes Collection - Maxon Motor

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

USB or RS232 to CAN Gateway<br />

Command Translation<br />

11.4 Command Translation<br />

The USB/RS232 command set is designed approximate to CANopen services. All USB/RS232 commands<br />

have a directly corresponding service in the CAN network, thus simplifying the gateway functionality.<br />

Between two subsequent USB/RS232 commands, no data must be stored or buffered, thus minimizing<br />

Gateway’s memory use. All received data are directly forwarded to the CAN bus.<br />

USB/RS232 Command<br />

CANopen Service<br />

ReadObject Initiate SDO Upload / Expedited Transfer<br />

InitiateSegmentedRead Initiate SDO Upload / Normal Transfer<br />

SegmentRead Upload SDO Segment<br />

WriteObject Initiate SDO Download / Expedited Transfer<br />

InitiateSegmentedWrite Initiate SDO Download / Normal Transfer<br />

SegmentWrite Download SDO Segment<br />

SendNMTService NMT Service<br />

ReadLSSFrame LSS Service<br />

SendLSSFrame LSS Service<br />

Table 11-157<br />

Command Translation – USB/RS232 to CANopen Service<br />

11.5 Limiting Factors<br />

The number of segments has a big influence on the data exchange performance. Exchanging data<br />

directly with a device connected to RS232 (no gateway), a data segment can transfer up to 63 Bytes per<br />

command, thus for 1kB of data, 17 commands must be sent. Compared to sending data to a device<br />

addressed via gateway, 147 commands must be sent. CANopen services (normal transfer) allow only 7<br />

bytes to be transferred in a segment. Therefore, the CANopen segment limits also the RS232 segment.<br />

Please keep in mind; the gateway is not capable of buffering data nor to split data into several CANopen<br />

services.<br />

Considering the segment size, CANopen is the limiting factor for the communication performance. Considering<br />

the bit rate of the two field buses, the RS232 interface is the limiting factor. Communication via<br />

gateway cannot take advantage of the CAN bus’ high bit rate, it is limited by the RS232’s slow bit rate<br />

and the small CANopen segment size.<br />

Description USB Protocol RS232 Protocol CANopen<br />

USB to<br />

CANopen<br />

Gateway<br />

RS232 to<br />

CANopen<br />

Gateway<br />

Max. bit rate 1 MBit/s 115.2 kBit/s 1 MBit/s 1 MBit/s 115.2 kBit/s<br />

Max. segment<br />

size<br />

63 Bytes 63 Bytes 7 Bytes 7 Bytes 7 Bytes<br />

Conclusion<br />

Transfer Rate Fast Slow Fast Fast Slow<br />

Segment Size Big Big Small Small Small<br />

Table 11-158<br />

USB or RS232 to CAN Gateway – Limiting Factors<br />

However, these limiting factors must be put into perspective, because most of the elements in the<br />

Object Dictionary are 32-bit parameters, or even smaller. Thus, segmented transfer is used very rarely.<br />

Segmented transfer will only be used to read the data recorder’s data buffer or for firmware download.<br />

maxon motor control<br />

<strong>EPOS2</strong> Positioning Controllers Document ID: rel3956 11-167<br />

<strong>EPOS2</strong> <strong>Application</strong> <strong>Notes</strong> <strong>Collection</strong> Edition: April 2013<br />

© 2013 maxon motor. Subject to change without prior notice.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!