![background image](http://html1.mh-extra.com/html/ls/a2c-sg2-m12/a2c-sg2-m12_manual_1943703037.webp)
A2C-SG2-M12
WWW.LILLIESYSTEMS.COM
37 of 44
15.1.2
Command: Calibrate input channels using integer data (signed 32bit integer)
Command
Sub
Command
Data[0]
Data[1]
Data[2]
Data[3]
Data[4]
Data[5]
0x19
Channel
Data MSB
Data
Data
Data LSB
High/Low
0x80
DLC = 0x08
Channel:
0x00 = Calibrate channel 1
0x01 = Calibrate channel 2
High/Low:
0x00 = Low value of calibration data
0x01 = High value of calibration data
Example 1
Using 2 point calibration on channel 2, low value of 1000 and high value of 500000
Byte 0
Byte 1
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
0x19
0x01
(channel 2)
0x00
0x00
0x03
0xE8
0x00 (low)
0x80
DLC = 0x08
Now we need to set the high value. A signed int of 500000 will in bytes be: 0x00 0x07 0xA1 0x20
Byte 0
Byte 1
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
0x19
0x01
(channel 2)
0x00
0x07
0xA1
0x20
0x01 (high)
0x80
DLC = 0x08
Make sure to save the calibration constants using command 0x21. See 17.1.1
16
Set Default Calibration Values
To return to the default calibration constants send the below command. This will have no effect until the calibration data is saved and
the sensor restarted. See command 17.1.1
16.1.1
Command: Set Default Calibration Constants
Issue the following command to set the default calibration constants:
Command
Sub
Command
Data[0]
Data[1]
Data[2]
Data[3]
Data[4]
Data[5]
0x22
0xFF
DLC = 0x02 (values above 2 are also valid, but Data bytes are not used)
17
Save Current Calibration Constants
After changing calibration constants in the sensor, these constants will remain unchanged until the sensor is reset. By saving the
current calibration constants to the sensor, these will be loaded at start-up.
The saved values do not include the other parameters in the sensor, which can be saved using the command in section 19
NB: Since the calibration constants are stored in FLASH memory which have a limited number of erase / write cycles, the
user must ensure that this command is not called more than 10.000 times within the sensor’s lifetime.
17.1.1
Command: Save Current Calibration Constants
Issue the following command to save the current calibration constants:
Command
Sub
Command
Data[0]
Data[1]
Data[2]
Data[3]
Data[4]
Data[5]
0x21
0xFF
DLC = 0x02 (values above 2 are also valid, but Data bytes are not used)