UM-0086-A2
CANgate User’s Manual
Page 23
RP – Poll Memory Slot
RP
{ slot1
slot2 }
where:
slot1
is the first memory slot to poll (
0-150
, default:
0
)
slot2
is the last memory slot to poll (
0-150
, default:
0
)
This command will
poll
memory slots
slot1
to
slot2
inclusive. If no parameters are specified then Slot 0 is polled.
What does polling a slot mean?
For
a
passive
memory slot (RECV, RECVE, RECVJ or GPS), the most recent received value is formatted and
returned to the host. Alternatively the minimum, maximum or average (calculated since the last poll) may be returned
instead, if the
FORMAT
clause specifies to do so. If no data at all have been received then no value will be returned.
For
an
active
memory slot (SEND, SENDE, RQST, RQSTJ ), CANgate will transmit the required CAN message. In
the case of the request types, CANgate will then wait for a response and return the required data to the host.
If no response is received to a request, or if no data at all have been received at the time that a passive slot is polled, then no
value will be returned. If there was text specified in the format string then that text it will still be returned.
If any slots in the specified range have not been defined then they will be skipped (nothing will be returned for the undefined
slots).
Note:
When passive slots are polled, the data is returned instantly, while for RQST/RQSTJ slots the data will only be
returned when a response is received from the ECU. This means that if a mixture of "receive" and "request" slots are polled
all at once then the order of responses may not match the order of the memory slots.
Examples
RP 1 150
Poll all defined memory slots.
RQSTJ 2 65226 3 6 FORMAT "%f\n"; RP
SEND 1 0x142 112233; RP
The
RP
command is often appended when defining an active memory slot in Slot 0. This usage is not applicable to passive
slots because at the point where the
RP
command is executed it is unlikely that any data has been received since the slot
was defined, so nothing will be returned.
CONNECT – Set CAN Bit Rate
CONNECT
CANport
bitrate
where:
CANport
is the CAN port to use (integer,
1-2
)
bitrate
is the CAN bitrate in kbps (integer,
0
,
10
,
20
,
50
,
125
,
250
,
500
,
1000
)
Before a CAN port can be used it is necessary to specify the bitrate using the
CONNECT
command.
Initially, the bitrate is set to
0
, which will disable the port. If the bitrate is set incorrectly, bus errors will result and the port will
be disabled for a period of two seconds, after which CANgate will re-attempt connection.
The currently selected bitrate setting is saved to flash memory, so it will automatically be set if CANgate restarts following a
power interruption.
Examples
CONNECT 2 250
Configure the CAN port 2 for connection to a 250kbps CAN network. (Note that J1939 based CAN networks always use a
bitrate of 250kbps.)
VERBOSE – Enable Extended Messages
VERBOSE
state
where
state
is either
ON
or
OFF
. Default is
OFF
.
In
Verbose
mode, CANgate will return error and confirmation messages as required. Also, all received commands will be
echoed back to the host computer. This is useful for troubleshooting.
In
Normal
(non-verbose) mode, no unsolicited messages are returned to the host. Data values are returned, as is text that is
generated in direct response to a command (eg
VERSION
). Commands are not echoed.