[ Pobierz całość w formacie PDF ]
SysParam No.41 CANConfig.Bit13 = 0 (RTR1 Disabled) (ReadOnly)
= 1 (RTR1 Enabled) (ReadOnly)
SysParam No.41 CANConfig.Bit12 = 0 (RTR0 Disabled) (ReadOnly)
= 1 (RTR0 Enabled) (ReadOnly)
RTR Configuration Procedure
1. Write the system parameter No.39 or No.40 (RTR0 ID or RTR1 ID) via SDO communication using
the command 'SetRTRID'.
2. Reset the parameter configuration for the requested data frame. Send the command 'ConfigRTR'
with the parameter 'action' = 2 (Reset) via SDO communication.
3. Register new parameters for the requested data frame. Execute the command 'AddRTRParame-
ter'. The command answers with a negative acknowledge ('F' = 0x0046) if the buffer is full.
4. Enable the RTR communication channel using the command 'ConfigRTR' with the parameter 'ac-
tion' = 1 (Switch On).
Page: 48 / 51 maxon motor control Edition March 03 / Subject to technical changes!
maxon motor
Communication Guide 4-Q-EC Servoamplifier DES 50/5
RTR Message Mapping
Msg1/3: ID = RTR0/RTR1 ID Msg2/4: ID = RTR0/RTR1 ID
RTR = 1 RTR = 0
No data CanByte1 = Registered Param1 LowByte
CanByte2 = Registered Param1 HighByte
CanByte3 = Registered Param2 LowByte
CanByte4 = Registered Param2 HighByte
CanByte5 = Registered Param3 LowByte
CanByte6 = Registered Param3 HighByte
CanByte7 = Registered Param4 LowByte
CanByte8 = Registered Param4 HighByte
RTR Communication Example
SysParam No. 39 = RTR0 ID = 386
SysParam No. 40 = RTR1 ID = 387
Example: Read the status parameters: opStatus, error, canError, velocityIs
Configuration via SDO communication:
ConfigRTR(action = 2) //Reset parameter configuration
AddRTRParameter(paramSel = 0,paramNbAddr = 128) // Bit0 = 0 -> RTR0;
// Bit4 = 0 -> paramMode;
// Bit8 = 0 -> WORD (16-bit)
// paramNbAddr = 0x0080 = 128d (opStatus)
AddRTRParameter(paramSel = 0,paramNbAddr = 137) // Bit0 = 0 -> RTR0;
// Bit4 = 0 -> paramMode;
// Bit8 = 0 -> WORD (16-bit)
// paramNbAddr = 0x0089 = 137d (error)
AddRTRParameter(paramSel = 0,paramNbAddr = 138) // Bit0 = 0 -> RTR0;
// Bit4 = 0 -> paramMode;
// Bit8 = 0 -> WORD (16-bit)
// paramNbAddr = 0x008A = 138d (canError)
AddRTRParameter(paramSel = 0,paramNbAddr = 134) // Bit0 = 0 -> RTR0;
// Bit4 = 0 -> paramMode;
// Bit8 = 0 -> WORD (16-bit)
// paramNbAddr = 0x0086 = 134d (velocityIs)
ConfigRTR(action = 1) // Switch on RTR communication
Results: opStatus = 0xC407 = 50183d
error = 0x8002 = 32770d
canError = 0x8001 = 32769d
velocityIs = 0x050C = 1500d
Msg1: ID = 386 Msg2: ID = 386
RTR = 1 RTR = 0
No data CanByte1 = 0x07
CanByte2 = 0xC4
CanByte3 = 0x02
CanByte4 = 0x80
CanByte5 = 0x01
CanByte6 = 0x80
CanByte7 = 0x0C
CanByte8 = 0x05
Edition March 03 / Subject to technical changes! maxon motor control Page: 49 / 51
maxon motor
4-Q-EC Servoamplifier DES 50/5 Communication Guide
5.4 Using a DES in a CAN Network via RS232
5.4.1 Configuration
If a DES has to be used in CAN network then it is generally necessary to configure first each Module-
ID. This parameter should be configured if another device is already using the same ID. To avoid con-
fusion it is therefore recommended to configure separately each DES-ID by means of the delivered
GUI and serial interface (RS232) before building the connection to the CAN bus. A configuration over
CAN bus is of course possible, but then the user must be sure that the operation is not interfering with
other DES modules.
5.4.2 Control of CAN using the Serial Interface
A remote DES in a CAN network can be controlled and configured by using a Serial Communication
Interface (SCI, UART) and a DES connected to a host system with the serial protocol described for the
standard EIA-RS232. The following figure illustrates a possible network scenario with a DES con-
nected to a PC and other CAN modules.
PC
PCI SCI
CAN
DES DES
adapter
node 2 node 4
node 0
Termination
CAN bus line
Termination
I/O
DES
module node 3 node n
node 1
Figure 5.8: Connections on a CAN network with a PC host system over SCI and CAN adapter card
The communication from an host system like a PC and a DES in a CAN network can be of course es-
tablished by means of a CAN interface for the intern system bus (for example PCI). However for simple
applications the user can send every CAN message and use most of the DES commands with the help
of the serial protocol. The DES connected over RS232 to the PC will act as an interface converting the
message from SCI to CAN. It is therefore possible to operate on remote DES without the need of extra
CAN adapter cards.
Page: 50 / 51 maxon motor control Edition March 03 / Subject to technical changes!
maxon motor
Communication Guide 4-Q-EC Servoamplifier DES 50/5
5.4.3 Command Instruction Example
As already mentioned DES commands are exchanged over CAN using the BI communication features.
We present here an example of instruction requiring an answer from the receiver. This is the case of
the command ReadVersion (see also the equivalent example for the RS232 protocol).
Supposing that we desire to read the version of a DES with Module-ID = 3 (Module-Ch), then we can
send a CAN standard message to the bus with the ID = 3 and the CAN bytes containing the BI mapped
as described.
The frame to send to the CAN bus for the command ReadVersion is composed as follows:
ID CANbyte1 CANbyte2 CANbyte3 CANbyte4
OpCode Param1 Param1
L_byte H_byte
0x0003 0x00 0x1A 0x00 0x00
ID: Module-ID = 3
OpCode: ReadVersion = 0x1A
Param1 (L-byte): = 0x00 (VersionsGroup)
Param1 (H-byte): = 0x00
The DES will then answer with a CAN standard message with the ID = RPDO-ID and an BI containing
the required information.
ID CANbyte1 CANbyte2 CANbyte3 CANbyte4 CANbyte5 CANbyte6
(len-1) OpCode Param1 Param1 Param2 Param2
L_byte H_byte L_byte H_byte
0x0201 0x01 0x00 0x50 0x10 0x03 0x40
ID: RPDO-ID = 0x0201
OpCode: Answer = 0x00
Param1: Software version = 0x1050
Param2: Hardware version = 0x4003
Edition March 03 / Subject to technical changes! maxon motor control Page: 51 / 51
[ Pobierz całość w formacie PDF ]