SDM-CAN CAN-Bus Interface User Guide
The diagnostic commands are listed below:
BINS
– This command will cause a hex dump of the bins configured by the
datalogger program. The output for each line is as follows:
Bin number, Data type, Start bit, Number of bits, Buffer pointer, Bin flags,
Number of values, TQUANTA, TSEG1, TSEG2, SDM mode and CAN ID.
These fields are in raw format and may contain flags to indicate modes.
This command is used by Campbell Scientific for diagnostic purposes only.
BUFFERS
– Takes no parameters. This command will dump the buffers
configured by the datalogger program.
The output format is:
On the first line after the command, the number of buffers used in shown in hex
format, then on each successive line the buffer set-up is dumped in the following
hex form: Buffer Number, Frame ID, Info Byte, Flags, Working Buffer, Read
Buffer, Bin Number Pointer. This command is only normally used by Campbell
Scientific for diagnostic purposes.
CANBAUD nnnn
– Scans the CANBUS to attempt to ascertain the current baud
rate. Parameter 'n' is in the range of 0-255 and is the amount of time, in steps of
50ms, the SDM-CAN should dwell at each baud rate looking for CANBUS
activity. If the 'n' parameter is omitted, two seconds dwell time will be used by
default.
The CANBUS is scanned for the following baud rates:
20K, 50K, 125K, 250K, 500K, 800K and 1 Megabaud.
As soon as the baud rate is found, the bus parameters TQUANTA, TESG1,
TSEG2 and frames / n*50msec are reported to the user. The SDM-CAN will then
be set to, and stay at, this baud rate until the changed by the datalogger following a
re-compilation of the program by the user, or by a datalogger SDM
communications error which will force the SDM-CAN to be reset. If no baud rate
can be detected, an error is reported to the user.
Because any communication errors cause a default back to the datalogger set baud
rate, it is not recommended that this command is used for anything other than
CANBUS diagnostic purposes.
CLRERROR
– Takes no parameters. This command will clear all the error
counters Transmit, Receive, Overrun and Watch-dog to zero and clear a bus off
condition.
COMP
– Takes no parameters. This command will force the datalogger to re-
send all of the configuration information again. This command is used by
Campbell Scientific for debugging purposes only.
HELP or ?
– Prints a list of valid user commands.
HEXDUMP aaaa bbbb
– The first parameter ‘aaaa’ is the start address and the
second parameter ‘bbbb’ is the number of bytes to dump. This command will
dump the SDM-CAN’s full memory address range in a hex format. Each line that
is output starts with the address followed by a16 byte value and then the ASCII
characters. Any unprintable characters are represented by a ‘.’ character.
MONITOR
nnnn – This command takes parameters in the range n=0 to n=2,
where:
0 = monitor CANBUS for IDs used by the datalogger program (this is the default
if the parameter is missing).
1 = monitor CANBUS for IDs that are allowed to pass through the simple IDfilter.
2 = monitor all CANBUS messages on the bus.
The monitor command will output a CAN frame in hex format when received.
This command has a ring buffer that can hold 20 frames before it overflows.
5-2