5 — VEHICLE CONTROL LANGUAGE (VCL)
Curtis Model 1351 – December 2018
pg. 108
function
SRDO_Rcv_Handle = Setup_Receive_SRDO()
Sets up the timing
detection and fault functions for a receive SRDO
The receive mailboxes must already be setup prior to using this function. Since the
SRDO consists of two messages and is received and checked by both CAN ports,
there are four mailboxes used total. Note that Only the Primary First mailbox must
be defined since the Second message is identical with the data inverted.
syntax
Setup_Receive_SRDO(Primary_Mailbox_Handle_first,
primary_Mailbox_Handle_second, Supervisor_
mailbox_handle_first, supervisor_mailbox_handle_
second, Cycle_Timeout, Interval_Timeout)
arguments:
Primary_Mailbox_Handle_first
The Primary mailbox
(Primary_Handler)
Primary_Mailbox_Handle_second
The Primary mailbox
(Primary_Handler)
Supervisor_Mailbox_Handle_first
The Supervisory mailbox
(Supervisor_Handler)
Supervisor_Mailbox_Handle_second
The Supervisory mailbox
(Supervisor_Handler)
Cycle_Timeout
The max time allowed between Primary
Mailbox first messages receives
Interval_Timeout
The max time, in milliseconds, allowed
between reception of first and second
mailbox receives
returns:
The Handle to the SRDO reception function. It
is used to enable and to check the status of
the SRDO receive function
reported errors:
function
Status = check_SRDO_receive()
Check for proper timing and data
integrity of the SRDO reception
syntax
check_SRDO_receive(SRDO_Rcv_Handle)
SRDO_Rcv_Handle
is the handle provided by the SRDO Receive Setup function
(above). It is used to enable the SRDO function (after the mailboxes have all be
setup) and to check the SRDO timing and data integrity.
If it returns a non-zero value into Status, the SRDO timing or address is wrong.
The data will not be placed into the defined variables for the RSDO data.