ADwin-Gold II
, Manual February 2013
155
CAN interface
Read_Msg_Con
ADwin
Read_Msg_Con
Read_Msg_Con
checks if a complete new message has been received in a
specified message object.
If so, the message is saved in
CAN_Msg
and the identifier of the message is
returned.
Syntax
#Include
ADwinGoldII.inc / GoldIITiCo.inc
ret_val
=
Read_Msg_Con
(
can_no
,
msg_no
)
Parameters
Notes
In contrary to
Read_Msg
,
Read_Msg_Con
makes sure the message is
consistent: If a new message arrives while reading an old message, the-
re is no mixture of old and new message.
To receive a message, follow these steps:
•
Enable the message object for receive with
En_Receive
.
•
Check for a new message, and if, store the message in
CAN_Msg
with
Read_Msg
.
You can read a received message only once.
See also
,
,
Valid for
Gold II-CAN
T11 TiCo
can_no
Number (1, 2) of CAN interface.
LONG
msg_no
Number (1…15) of message object.
LONG
ret_val
-1: no new message arrived.
>0:new message;
ret_val
= message identifier.
LONG