Mantracourt Electronics Limited
DCell & DSC MantraCAN User Manual
21
If the identifier 1ABCD is to be specified:
MSByte
Byte
Byte
LSByte
00
01
AB
CD
Hexadecimal
value
NODEIDH = 0x1
NODEIDL = 0xABCD
Decimal value
NODEIDH = 1
NODEIDL = 43981
The above values are sent in the floating point IEEE standard
To connect
multiple
devices on the same bus, it is first vital to set all the ID’s to different values.
This is because if two devices with the same ID are connected to the same bus, it is not possible to talk to them
individually: So in particular, you cannot correct the problem by changing the ID of one of them!
If a bus connects to two devices with the same ID, the only solution is to remove one of them and connect it to a
one-to-one link to change its station number.
The new value of NODEIDL or NODEIDH does not take effect until the RST command is issued or the device is
power cycled.
To Change the ID of your Device
1.
First set
NODEIDL and NODEIDH
to a suitable new value (making sure that no other device of the same number is
also connected!)
2.
Send a
RS
T command or power cycle the device.
3.
Change the device settings in Instrument Explorer by selecting
Change Settings
from the
Communications
menu.
CAN Bit Rate, BPS
The
BPS
parameter is a read/write byte value specifying a standard communications bit rate according to the
following table –
BPS value
0
1
2
3
4
5
6
7
Bit rate
(bps)
20K
50K
100K
125K
250K
500K
800K
1M
Warning: When changing this setting it is possible to lose communication with the device. As well as keeping
track of the correct bit rate, it is also essential in this case to be sure that your hardware supports the rate you
are changing to.
The evaluation kit supports all possible DCell/DSC baud rate settings UPTO 1Mbps
The new value of BPS does not take effect until the RST command is issued or the device is power cycled.
To Change The BPS, follow a similar sequence to changing the STN value
1.
First set
BPS
to the new value
2.
Send a
RST
command or power cycle the device.
3.
Change the device settings in Instrument Explorer by selecting
Change Settings
from the
Communications
menu.
Select new bit rate.
Identifier Size, IDSIZE
Determines if the identifier is 11bit, standard, or 29bit extended. A 0 in IDSIZE selects 11bit (standard) and a 1
selects 29bit (extended).
CAN Bus, CANTXERR, CANRXERR, CANSTATUS
These parameters provide diagnostic data for the CAN bus.
CANTXERR