CAN-bus communication. TechnoCAN protocol

TechnoCAN is an alternate protocol to TMLCAN – the default CAN-bus protocol for the Technosoft drives/motors without CANopen. TechnoCAN was specifically designed to permit connection of the Technosoft drives/motors without CANopen on a CANopen network where messages are exchanged using CANopen protocol. TechnoCAN and CANopen do not disturb each other and therefore can co-exist on the same physical bus.

On request, the Technosoft drives/motors without CANopen may be delivered with TechnoCAN protocol. The difference between the drives/motors with TMLCAN protocol and those with TechnoCAN protocol is done only through the firmware: all the Technosoft products equipped with TechnoCAN have a firmware number starting with 2 i.e. a firmware code is F2xxY, where 2xx is the firmware number and Y is the firmware revision.

TechnoCAN is based on CAN2.0A using 11 bits for the identifier. It accepts the following baud rates: 125kb, 250kb, 500kb (default after reset), 800kb and 1Mb. Like TMLCAN, TechnoCAN offers the possibility to connect a PC via a serial RS-232 link to any drive/motor from the CANopen network and through it to access all the Technosoft drives/motors. In this case, this drive/motor connected both to CAN-bus and RS-232 becomes a relay axis (see Communication protocols – Overview for details)

 

In TechnoCAN the TML instructions are split into 8 categories:

a)Normal – includes all the TML instructions addressed to a single drive/motor (axis)
b)TakeData – includes the answer “TakeData” to the request “GiveMeData”
c)Group – includes all the TML instructions multicast to a group of drives/motors
d)Host – includes the answers to all the other on line TML commands except “TakeData”  
e)PVT – includes the instruction PVTP (the instruction is to long to be sent as a normal message)
f)Synchronisation – includes the synchronization message for the group 0
g)Broadcast – includes all the TML instructions addressed to the group 0 (to the all drives in the system) except the request GiveMeData.
h)TakeData2 – includes the answers “TakeData2” to the request “GiveMeData2”

Each category is mapped in the following range of COB-ID (Communication Object Identifier – CANopen terminology for a CAN message identifier):

ProtocolTechnoCANmapping

TechnoCAN uses only COB-IDs outside of the range used by CANopen. Thus, TechnoCAN protocol and CANopen protocol can co-exist and communicate simultaneously on the same physical CAN bus, without disturbing each other.

 

 

The next table shows how TechnoCAN COB-IDs are assigned in relation with the CANopen COB-IDs.

 

CANOpen and TechnoCAN COB-IDs

 

ProtocolTechnoCANCOBID

Remarks: In comparison with TMLCAN, TechoCAN has the following restrictions:

The maximum number of axes is 31: possible Axis ID values: 1 to 31
The maximum number of groups is 5: possible Group ID values: 1 to 5

Normal messages encapsulation: COB-ID: 121h – 13Fh

ProtocolTechnoCANCOBID121-13f

Host messages encapsulation: COB-ID: 141h – 15Fh

ProtocolTechnoCANCOBID141-15f

Remark: Host messages occur only when a drive/master answers to a data request (other then “GiveMeData”) where the Sender Axis ID has the HOST bit set to 1. This happens for example when the host is a PC connected to one of the drives/motors via RS-232 and asks a data from another drive/motor. The answer will be sent to the relay axis as a Host message. The Host messages do not occur when the request is sent by a drive or by a host/master connected directly on the CAN bus.

Take Data messages encapsulation: COB-ID: 161h – 17Fh

ProtocolTechnoCANCOBID161-17f

Remarks: In the Take Data messages, the 10-byte code of the Take Data TML instruction is compacted to 8-bytes. This is done in the following way:

From the 16-bit Operation Code, only the first 10LSB are transmitted. The 6MSB are always constant: 0x2D (101101b) and are not transmitted. The receiver of a Take Data message must add 0x2D on the 6MSB of the Operation Code received in order to restore the full 16-bit code for TakeData instruction.
The HOST bit is transmitted in bit 2 of byte 1. There is no need to send the GROUP bit because the GiveMeData request can’t be sent to a group of drives/motors.
The first data word of the TakeData TML instruction is the Sender Axis ID. As the maximum number of drives is limited to 31, only bits 8-4 are useful and are transmitted.

Group messages encapsulation: COB-ID: 001h – 01Fh

ProtocolTechnoCANCOBID001-01f

PVT messages encapsulation: COB-ID: 041h – 05Fh

ProtocolTechnoCANCOBID041-05F

Remarks: In the PVT messages, the 10-byte code of the PVT TML instruction is compacted to 8-bytes. This is done in the following way:

The Operation Code is not transmitted. The receiver of a PVT message adds 0x6 on the 9MSB of the Operation Code received and the Counter value on the 7LSB in order to restore the full 16-bit code for PVT instruction.
The first data word of the PVT instruction contains the 15LSB of the 24 bits Position
The second data word of the PVT instruction contains the 8LSB of the 24 bits Speed value and the 8 MSB of the 24 bits Position value.
The third data word of the PVT instruction contains the 16MSB of the 24 bits Speed value.
The fourth data word of the PVT instruction contains the 9bits Time value.

Synchronization messages encapsulation: COB-ID: 020h

ProtocolTechnoCANCOBID020

Remarks:

The message has zero data bytes
The Operation Code is 0x1000
The synchronization messages are broadcast messages; they are received by every drive connected to the network

 

Broadcast messages encapsulation: COB-ID: 200h

ProtocolTechnoCANCOBID200

 

Take Data 2 messages encapsulation: COB-ID: 101h – 11Fh

ProtocolTechnoCANCOBID101-11F

Remarks:

The message will be never receive by one of the Technosoft drive, the message is dedicate for other drives.
The COB-ID contains the Expeditor Axis ID for the host to get the answers one by one, prioritized in the ascending order of the expeditors’ axis ID.
The VT bit specifies the data length (VT = 0 for 16bits or VT = 1 for 32 bits) and is transmitted in the first byte sent.
The P bit specifies if the message is TakeData2, in reply to a GiveMeData2 message, or a PONG, in reply to a PING message. The PING message is a broadcast message that requests the Axis ID and the firmware version of the drives in the network. For P=0 the message is Take Data2 and for P = 1 the message is a PONG (the VT bit is automatically reset and it has no meaning).

 

Example 1: A host connected on a CANopen network sends to drive/motor with axis ID = 5 the TML instruction “KPP = 0x1234” (set proportional part of the position controller with value 0x1234). The Axis ID Code and the TML instruction binary code are:

Binary code of TML instruction KPP =0x1234

ProtocolTMLCANMessageExampleContains

Remark: Use Binary Code Viewer to get the binary code of TML instructions

 

The host must send a TechnoCAN message with the following contents:

TechnoCAN message: TML instruction KPP =0x1234 sent to axis 5

ProtocolTechnoCANExample

Remark: The last 4 bytes are not used and are not transmitted

 

Example 2: A host connected on a CANopen network wants to get the value of the position error from the drive/motor with the axis ID=5.  The host axis ID is 3. The position error is the 16-bit TML variable named POSERR and its address in the TML data memory is 0x022A. The host sends to axis 5 a “GiveMeData” request for the TML variable POSERR and waits for the “TakeData” answer.

The Axis ID Code and the binary code of “GiveMeData” request for POSERR are:

Binary code of GiveMeData request for POSERR value sent to axis 5

ProtocolTechnoCANExample_2_1

The host must send a TechnoCAN message with the following contents:

TechnoCAN message: GiveMeData request for POSERR value sent to axis 5

ProtocolTechnoCANExample_2

Remark: The last 2 byes are not used and are not transmitted.

Supposing that the drive/motor with Axis ID = 5 returns a position error POSERR = 2, the Axis ID Code and the binary code of the “TakeData” answer is:

Binary code of TakeData with POSERR value from axis 5

ProtocolTechnoCANExample_3_1

The host gets a TechnoCAN message with the following contents:

    TechnoCAN message: TakeData with POSERR value from axis 5

ProtocolTechnoCANExample_3

Remark: The last 2 byes are not used and are not transmitted.

Example 3: A PVT command is sent to the drive with the axis ID 5 like following: pvtp -1000L, -10, 500U, 0 (set the coordinates for the next point the position at -1000 IU = 0,5 rot = FFFC18h, the speed at -10IU = 300 rpm = FFF600 and the time 500IU = 0,5s = 01F4 ).

Binary code of PVT command sent to axis 5

ProtocolTechnoCANExample_3_2

The TechnoCAN message sent has the following contents:

    TechnoCAN message: PVT command for axis 5

ProtocolTechnoCANExample_4

Example 4: If a Technosoft drive/motor receives the TML instruction SETSYNC 20, it becomes the synchronization master and starts sending every 20ms a synchronization message and its time to the all drives connected in the CAN bus network.

At a moment the master time has the value 0x246C46F and the code of TML instruction is the following:

Binary code of Set Master Time command sent to all axes

ProtocolTechnoCANExample_5_1

The TechnoCAN messages are:

The synchronization message that when it is received by everybody specifics time variables are saved.

    TechnoCAN message: Synchronization command for all axes

ProtocolTechnoCANExample_5_2

Remark: The last 8 bytes are not used and are not transmitted.

The master broadcast messages with the command to the slaves to set the master time

TechnoCAN message: Set Master Time command to all axes

ProtocolTechnoCANExample_5_3

Example 5: If for example the axis 2 encounters a control error, the drive sends a message with the value of the error register MER (0x0008) with a TakeData2 instruction which has the following content:

Binary code of TakeData 2 with MER register value from axis 2

ProtocolTechnoCANExample_6_1

Remark: The VT bit is set to zero

The TechnoCAN message sent has the following contents:

    TechnoCAN message: TakeData2 command from axis 2

ProtocolTechnoCANExample_6

Remark: The last 3 byes are not used and are not transmitted.

See also:

Communication protocols – Overview

Message structure. Axis ID and Group ID

Serial communication. RS-232 and RS-485 protocols

CAN-bus communication. TMLCAN protocol