A2C-SG2-M12
WWW.LILLIESYSTEMS.COM
17 of 44
7
Initial Setup
The sensor comes with factory setting such as CAN filters, CAN Identifiers, bandwidth, mode etc. To prepare the sensor for
operation some CAN settings might need to be changed. This is described in this section.
7.1
CAN Identifier
The CAN Identifier is the identifier which the sensor sends when transmitting messages.
The factory default value is 0x125.
7.1.1
Command: Set CAN ID
To change the CAN ID to other values send the following message:
Command
Sub Command
Data[0]
Data[1]
Data[2]
Data[3]
Data[4]
Data[5]
0x68
STD_EXT
ID MSB
ID
ID
ID LSB
DLC = 0x06 (values above 0x06 are also valid, but Data bytes are not used)
STD_EXT:
0x01 = CAN Standard ID (11bit identifier)
0x02 = CAN Extended ID (29bit identifier)
ID: This is the CAN Identifier that the sensor uses when transmitting data, sent at an unsigned 32bit integer
[0x000 – 0x7FF] for CAN Standard ID (11bit identifier).
Data[0] and Data[1] must both be 0x00!
[0x00000000 – 1FFFFFFF] for CAN Extended ID (29bit identifier)
7.1.2
Command: Get Standard CAN ID
Command
Sub Command
Data[0]
Data[1]
Data[2]
Data[3]
Data[4]
Data[5]
0xE8
Any value
DLC = 0x02 (values above 0x02 are also valid, but Data bytes are not used)
Reply
Command
Sub Command
Data[0]
Data[1]
Data[2]
Data[3]
Data[4]
Data[5]
0xE8
STD_EXT
ID MSB
ID
ID
ID LSB
DLC = 0x06
The reply format follows the same format as setting the CAN ID as seen in 7.1.1
7.2
Baud rate
The Baud rate is the communication speed on the CAN bus. It can be set to predefined values or to a custom value. The maximum
CAN bus cable length is dependent on the baud rate. In general, bus speed of 1 Mega bits is used up to 40m, 500kbits/s up to
100m, 250kbits/s up to 250m and 50kbits/s up to 1000m. These values can vary and depends on number of stubs etc.
7.2.1
Command: Set baud rate
The default baud rate from the factory is 500kbits/s. To change the baud rate to another value send the following message:
Command
Sub Command
Data[0]
Data[1]
Data[2]
Data[3]
Data[4]
Data[5]
0x67
BAUD
AUTOTRANS
(char) ‘S’
0x53
(char) ‘A’
0x41
(char) ‘F’
0x46
(char) ‘E’
0x45
DLC = 0x08
BAUD: See table below for valid values (firmware lower than 3.35 only support messages from 1-9)
0x01 = 1 Mb/s – sampling point 87.5%
0x02 = 500 kb/s – sampling point 87.5%
0x03 = 250 kb/s – sampling point 87.5%
0x04 = 125 kb/s – sampling point 87.5%
0x05 = 100 kb/s – sampling point 87.5%
0x06 = 50 kb/s – sampling point 87.5%
0x07 = Reserved for future use
0x08 = Reserved for future use
0x09 = Custom Baud rate.
0x0A = 1 Mb/s – sampling point 75%
0x0B = 500 kb/s – sampling point 75%
0x0C = 250 kb/s – sampling point 75%
0x0D = 125 kb/s – sampling point 75%