page 41
Function
CAN_RECEIVE
Library
CRxxxx.LIB
Function symbol
Purpose
Configures a data reception object and reads the reception
buffer of the data object.
Parameters
Function inputs
Function
outputs
Description
CAN_RECEIVE must be called once for each data object during
the initialization phase to inform the CAN controller of the
identifiers of the data objects.
In the further program cycles CAN_RECEIVE is called to read
the corresponding reception buffer, for long program cycles this
is done several times. The programmer must make sure by
evaluating the byte AVAILABLE that newly received data objects
are retrieved from the buffer and are further processed. Each
call of the function decrements the byte AVAILABLE by 1. If the
value of AVAILABLE equals 0, the buffer contains no data.
By evaluating the bit OVERFLOW an overflowing data buffer
can be detected. If the bit OVERFLOW is set, at least 1 data
object is
lost
.
Name
Data type
Description
CONFIG
BOOL
For the configuration of the data object the
bit must be set TRUE once. For data
transmission to commence the CONFIG bit
must be set to FALSE.
CLEAR
BOOL
Deletes the data buffer (queue).
ID
WORD
Contains the number of the data object
identifier 0 ... 2048.
Name
Data type
Description
DATA
ARRAY
The array contains max. 8 data bytes.
DLC
BYTE
The number of the transmitted bytes in
the array DATA, possible values 0 ... 8.
RTR
BYTE
Is not used
AVAILABLE
BYTE
Number of the messages received
OVERFLOW
BOOL
TRUE: Overflow of the data buffer.
Data
loss!
FALSE: The buffer is not yet full.
Содержание ecomat 100 R 360 Series
Страница 1: ...System manual ecomat 100 type R 360 ...
Страница 14: ...page 14 ...
Страница 26: ...page 26 ...
Страница 86: ...page 86 ...
Страница 100: ...page 100 ...
Страница 126: ...page 126 ...
Страница 146: ...page 146 ...
Страница 162: ...page 162 ...
Страница 163: ...page 163 Annex 2 Wiring Annex 2 1 Type CR0015 ...
Страница 164: ...page 164 Annex 2 2 Type CR0016 ...
Страница 165: ...page 165 Annex 2 3 Type CR0017 ...
Страница 166: ...page 166 Annex 2 4 Type CR0501 ...