5 — VEHICLE CONTROL LANGUAGE (VCL)
Curtis Model 1351 – December 2018
pg. 104
Controlling a Receive Mailbox
The receive mailbox processing is a bit more complex than the transmit mail box, although there are
many similarities, such as the mailbox must be enabled for any actions to occur and must be disabled
before any setup functions.
Since there are two modes of operation, halt and over-write, there are multiple way to check and pull
data from the receive mailbox.
If the halt-on-reception method is used, the VCL program should check the status of the receive flag.
If it is set, the data is new and can be used. The flag must be cleared before any new data is received.
If the over-write method is used, the VCL program may check the counter to see how many messages
have been received. This is an incrementing counter than can be cleared. If the VCL program code does
this after each check of the mailbox, then this counter will say how many message have been missed
(>1). The receive buffer is double buffered such that the incoming data is fully loaded before being set
as the active receive mailbox.
The receive mailboxes can also be set to time-out if they do not get new data. This timeout works on
the incoming data, not the data buffer, thus, even the mailboxes that are set to halt-on-reception are
checked for new messages coming in at or below the timeout rate. If the timeout is exceeded, the flag is
set and the message buffer will not be updated further until the timeout flag is cleared. The data in the
mailbox is the last data received before the timeout. It is important to note that the message counter
will continue to count if new messages matching the mailbox start coming in again, but they will not be
received into the mailbox until the timeout flag is cleared. But, the counter could be used to determine
that messaging has started again.