UM-0086-A2
CANgate User’s Manual
Page 17
RECV 1 0x603 3.8 3.5 ALL FORMAT .25 "%f,"
As each ID 0x603 message is received, return the value of the upper 4 bits of data byte 3 (0-15). This is then scaled by a
factor of 0.25 and returned as a floating point number (range 0-3.75) followed by a comma.
RECV 1 0x112 4 8 1000
Once per second (1000ms), return the most recent values of data bytes 4-8 of received ID 0x112 messages.
RECVE – Receive Extended-ID CAN Messages
{ slot }
RECVE
CANport
RxID
{ startByte{
.
bit}
endByte{
.
bit}
sampleRate }
{
FORMAT
formatOptions }
This command is exactly the same as
RECV
, except that the CAN identifier is an
extended mode
(29 bit) identifier, as
opposed to a standard mode (11 bit) identifier.
The allowable range for
RxID
is therefore
0-0x1FFFFFFF
SEND – Transmit Standard-ID CAN Message
{ slot }
SEND
CANport
TxID
hexData
{ sampleRate }
where:
slot
is the memory slot being defined (integer,
0-150
). If not specified then
0
is assumed. If CANgate is in Run Mode
then zero is the only value that can go here.
CANport
is the CAN port to use (integer,
1-2
)
TxID
is the CAN identifier to include in the transmitted message (integer,
0-0x7FF
)
hexData
is up to 8 bytes of hex data to include in the transmitted message. Non hex characters (eg.
_
) may be
inserted between bytes to make the string easier to read.
sampleRate
is the rate at which to send messages (integer, in ms, must be multiple of 100ms). If this parameter is
0
or
not specified, the memory slot will only send a message when it is polled by the host system (using the
RP
command).
When polled, a
SEND
memory slot transmits a raw CAN message. No data is returned to the host system.
Note that it is not possible to set up a RECV slot on the same CAN port to monitor messages sent by CANgate. If this is
required, connect the two CAN ports together and set up the RECV slot on the other port.
Examples
SEND 2 0x302 1122FF07; RP
This will immediately send a CAN message on CAN port 2. The message's identifier will be 0x302 and the data field will be
1122FF07. The DLC (data length code) field in the CAN frame will be set to 4.
SEND 2 0x119 FF110203_040599CC 2000
Every 2000ms, send the indicated 8-byte data field with CAN ID 0x119.
SENDE – Transmit Extended-ID CAN Message
{ slot }
SENDE
CANport
TxID
hexData
{ sampleRate }
This command is exactly the same as
SEND
, except that the CAN identifier is an
extended mode
(29 bit) identifier, as
opposed to a standard mode (11 bit) identifier.
The allowable range for
RxID
is therefore
0-0x1FFFFFFF
RQST – Request OBD Data
{ slot }
RQST
CANport
hexData
{ startByte{
.
bit}
endByte{
.
bit}
ECUaddr
sampleRate }
{
FORMAT
formatOpt }
where:
slot
is the memory slot being defined (integer,
0-150
). If not specified then
0
is assumed. If CANgate is in Run Mode
then zero is the only value that can go here.
CANport
is the CAN port to use (integer,
1-2
)
hexData
is 1-39 bytes of data to include in the transmitted request message. The first byte is the ISO-14230
mode
byte
, the remainder of the data are parameters. The number and meaning of the parameters vary depending on the
mode byte. Non hex characters (eg.
_
) may be inserted between bytes to make the string easier to read. See
(P40)
for more details on some common OBD request messages.
startByte{
.
bit}
is the starting bit position of the field of interest within the received message. Bytes are numbered from
1, bits are numbered from 8 (MSB) down to 1 (LSB). If
startByte
is
0
or not specified, a default value is chosen based
on the mode byte. If
.
bit
is not specified then
.8
is assumed.
endByte{
.
bit}
is the ending bit position (inclusive) of the field of interest. If
endByte
is
0
or not specified then this will be
the last received byte in the message. If
.
bit
is not specified then
.1
is assumed.