21.11.2013 Views

CANgate User's Manual - dataTaker

CANgate User's Manual - dataTaker

CANgate User's Manual - dataTaker

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

RECV 1 0x603 3.8 3.5 ALL FORMAT .25 "%f,"<br />

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<br />

factor of 0.25 and returned as a floating point number (range 0-3.75) followed by a comma.<br />

RECV 1 0x112 4 8 1000<br />

Once per second (1000ms), return the most recent values of data bytes 4-8 of received ID 0x112 messages.<br />

RECVE – Receive Extended-ID CAN Messages<br />

{ slot } RECVE CANport RxID { startByte{.bit} endByte{.bit} sampleRate } { FORMAT formatOptions }<br />

This command is exactly the same as RECV, except that the CAN identifier is an extended mode (29 bit) identifier, as<br />

opposed to a standard mode (11 bit) identifier.<br />

The allowable range for RxID is therefore 0-0x1FFFFFFF<br />

SEND – Transmit Standard-ID CAN Message<br />

{ slot } SEND CANport TxID hexData { sampleRate }<br />

where:<br />

slot is the memory slot being defined (integer, 0-150). If not specified then 0 is assumed. If <strong>CANgate</strong> is in Run Mode<br />

then zero is the only value that can go here.<br />

CANport is the CAN port to use (integer, 1-2)<br />

<br />

<br />

<br />

TxID is the CAN identifier to include in the transmitted message (integer, 0-0x7FF)<br />

hexData is up to 8 bytes of hex data to include in the transmitted message. Non hex characters (eg. _) may be<br />

inserted between bytes to make the string easier to read.<br />

sampleRate is the rate at which to send messages (integer, in ms, must be multiple of 100ms). If this parameter is 0 or<br />

not specified, the memory slot will only send a message when it is polled by the host system (using the RP command).<br />

When polled, a SEND memory slot transmits a raw CAN message. No data is returned to the host system.<br />

Note that it is not possible to set up a RECV slot on the same CAN port to monitor messages sent by <strong>CANgate</strong>. If this is<br />

required, connect the two CAN ports together and set up the RECV slot on the other port.<br />

Examples<br />

SEND 2 0x302 1122FF07; RP<br />

This will immediately send a CAN message on CAN port 2. The message's identifier will be 0x302 and the data field will be<br />

1122FF07. The DLC (data length code) field in the CAN frame will be set to 4.<br />

SEND 2 0x119 FF110203_040599CC 2000<br />

Every 2000ms, send the indicated 8-byte data field with CAN ID 0x119.<br />

SENDE – Transmit Extended-ID CAN Message<br />

{ slot } SENDE CANport TxID hexData { sampleRate }<br />

This command is exactly the same as SEND, except that the CAN identifier is an extended mode (29 bit) identifier, as<br />

opposed to a standard mode (11 bit) identifier.<br />

The allowable range for RxID is therefore 0-0x1FFFFFFF<br />

RQST – Request OBD Data<br />

{ slot } RQST CANport hexData { startByte{.bit} endByte{.bit} ECUaddr sampleRate } { FORMAT formatOpt }<br />

where:<br />

slot is the memory slot being defined (integer, 0-150). If not specified then 0 is assumed. If <strong>CANgate</strong> is in Run Mode<br />

then zero is the only value that can go here.<br />

CANport is the CAN port to use (integer, 1-2)<br />

<br />

<br />

<br />

hexData is 1-39 bytes of data to include in the transmitted request message. The first byte is the ISO-14230 mode<br />

byte, the remainder of the data are parameters. The number and meaning of the parameters vary depending on the<br />

mode byte. Non hex characters (eg. _) may be inserted between bytes to make the string easier to read. See OBD-II<br />

Modes and PIDs (P40) for more details on some common OBD request messages.<br />

startByte{.bit} is the starting bit position of the field of interest within the received message. Bytes are numbered from<br />

1, bits are numbered from 8 (MSB) down to 1 (LSB). If startByte is 0 or not specified, a default value is chosen based<br />

on the mode byte. If .bit is not specified then .8 is assumed.<br />

endByte{.bit} is the ending bit position (inclusive) of the field of interest. If endByte is 0 or not specified then this will be<br />

the last received byte in the message. If .bit is not specified then .1 is assumed.<br />

UM-0086-A2 <strong>CANgate</strong> User’s <strong>Manual</strong> Page 17

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!