Mantracourt Electronics Limited
DCell & DSC MantraCAN User Manual
52
CAN ID
CAN Data
Base ID
Descriptor
Command Number
0x65
0x6
0x64
Hexadecimal
101
6
100
Decimal
Not Acknowledged Response From Slave. For example if the device did not support command number 100
CAN ID
CAN Data
Base ID + 1
Descriptor
Command Number
0x65
0x15
0x64
Hexadecimal
101
21
100
Decimal
Data Type Conversions and Rounding
Type Conversion
Depending on the protocol, an integer/byte parameter may need to be converted to or from a floating-point
representation for reading or writing.
The rules are as follows
For reading, integer and byte parameters are treated as unsigned, and never read negative
– i.e. read value ranges are 0 to 65535.0 and 0 to 255.0
For writing, values written to integer and byte parameters are truncated to the nearest integer, and negative or
positive values are acceptable
NOTE:
Floating-point data is not always exact, even when reading integral data
E.G. could get 3.999974 instead of 4
E.G. for a byte write 240, 240.1 and 239.66 are all the same value
Rounding
Although rounding is applied when writing to integral values, data read from a device is
not
rounded off.