RTC
®
5 PC Interface Board
Rev. 1.9 e
6 Developing User Applications
87
innovators for industry
native restoration method is not possible. The
intermixed loading of protected functions via
differing applications should therefore be
avoided.
• If, during loading a protected function, the
is called before a subse-
command is transferred, then
the function will not be stored on the RTC
®
5
board.
• The input pointer will generally not be inherited
(the input pointer location currently saved in the
DLL for the acquiring application is used, maybe
corrected via
). On the other
hand, output pointers of lists can be queried after
an acquisition via
• After acquisition and until the next
load_…
command, the list status (with reference to LOAD
and READY) might be incorrect. But for further
execution this is not important, and the status
will be newly set after the next
load_…
command.
• Other settings such as
or laser settings
are not relevant to the DLL. Though settings used
by the previous application can not generally be
queried, new settings can of course be estab-
lished as desired.
• Error handling is performed separately for each
board and each application (user program).
When access rights are exchanged, this data is
not included.
6.8 Error Handling
So that RTC
®
5 errors can be caught at program
runtime via suitable programming, the RTC
®
5
performs general error handling. In addition, some
commands allow for specific error handling.
General errors occur, for example, if an application
has no access rights for the board
(
RTC5_ACCESS_DENIED
), or if the board fails to
respond to a control command (
RTC5_TIMEOUT
), or if
PCI communication problems occur during loading
(
RTC5_SEND_ERROR
).
Examples of specific errors are: calling a command
with an unallowed (uncorrectable) parameter
(
RTC5_PARAM_ERROR
, e.g. see
or
), or rejected loading of a list command
(
RTC5_REJECTED
, e.g. due to an illegal input pointer),
or transmitting a control command at an improper
time (
RTC5_BUSY
, when a list is still
being processed).
In such cases, the control commands will not be
executed; list commands will typically be replaced
with
RTC5_PARAM_ERROR
or
RTC5_IGNORED
, see
as an example).
For each command, the DLL will set and accumulate
the bits corresponding to these errors in the (board-
specific) error variables
LastError
and
AccError
.
• The error code
LastError
will be automatically
reset at the beginning of every command and
therefore is a listing of occurred errors from the
most recently executed command.
LastError
(1)
.
• The cumulative error code
AccError
, on the other
hand, only gets reset when the DLL is initialized.
But it can also be reset by the application via the
command.
AccError
is a listing of
errors occurring since the last error reset
(
.
(1) The described mechanism only applies for commands that
establish communication with the RTC
®
5. Commands that
don’t
establish communication with the RTC
®
5 (e.g.
) will
neither generate nor alter
LastError
or
AccError
(also
see comments in the corresponding command descriptions).