ADwin-Gold II
, Manual February 2013
149
CAN interface
En_Receive
ADwin
En_Receive
En_Receive
enables a specified message object to receive messages.
Syntax
#Include
ADwinGoldII.inc / GoldIITiCo.inc
En_Receive
(
can_no
,
msg_no
,
id
,
id_extend
)
Parameters
Notes
A message object can only receive messages from the CAN bus when
you have previously enabled it to receive with
En_Receive.
The message object only receives messages with the identifier you
have specified.
See also
,
Valid for
Gold II-CAN
Example
Rem Please select the appropriate include for ADbasic /
TiCoBasic
#Include
ADwinGoldII.inc / GoldIITiCo.inc
Init:
Init_CAN
(
1
)
'Initialization CAN controller 1
En_Receive
(
1
,
1
,
200
,
0
)
'Initialize message object 1 to
'receive CAN messages with
'identifier 200
T11 TiCo
can_no
Number (1, 2) of CAN interface.
LONG
msg_no
Number (1…15) of the message object.
LONG
id
Identifier (0…2
11
or 0…2
29
) of the messages,
which can be received in this message object.
LONG
id_extend
Length of the identifer:
0: 11 bits.
1: 29 bits.
LONG