6.8 Error Handling
In order to catch errors in the program flow, the
RTC6 PCIe Board carries out a general error handling.
With some commands there is also an individual error
handling.
General errors occur, for example, if:
• the user program has no access rights for the
board (RTC6_ACCESS_DENIED)
• the board fails to respond to a control command
(RTC6_TIMEOUT)
• PCI communication problems occur during
sending (RTC6_SEND_ERROR)
Individual errors occur, for example, if:
• calling a command with an unallowed
(uncorrectable) parameter (RTC6_PARAM_ERROR,
see, for example,
get_value
• rejected sending of a list command
(RTC6_REJECTED, for example, due to an invalid
input pointer)
• sending a control command at an improper time
(RTC6_BUSY, for example, goto_xy, when a list is
still being processed)
In such cases, the control commands are not
executed and list commands are typically each
replaced by
list_nop
(for example, for
RTC6_PARAM_ERROR
or RTC6_IGNORED, see
set_end_of_list
as an example).
RTC6 boards
Doc. Rev. 1.0.21 en-US
6 Developing RTC6-User Programs
The bits assigned to these errors are set or
accumulated in the
the board-specific error variables:
• LastError
• AccError
or write_da_x)
Error handling takes place separately:
• for each board
• each user program
A
another user program with current access rights to
the specified board.
If access rights are exchanged, this data is not also
exchanged.
Error handling only takes place during processing of
commands within the
the RTC6 PCIe Board. Error handling takes place
during execution of a list program.
An example code of how to incorporate board-
specific error variables is provided in the command
description of get_error.
(1) The described mechanism only applies for commands
RTC6 DLL
– Error code
– Is automatically reset at the beginning of every
command
– Therefore, is a listing of occurred errors from
the most recently executed command
– Can be queried by
get_last_error
– Cumulative error code
– Is reset when initializing the
– Can be reset by the user program itself by
reset_error
– Are all accumulated error bits since the last
error bit reset by
reset_error
– Can be queried by
get_error
reset_error
does not delete the error code of
RTC6 DLL
that establish communication with the
RTC6 PCIe Board
. Commands that do not establish
RTC6 PCIe Board
communication with the
example, rtc6_count_cards,
get_serial_number) neither generate nor alter
LastError
AccError
or
(see also comments in the
corresponding command descriptions).
with each command in
(1)
RTC6 DLL
(1)
and when sending to
(for
set_rtc4_mode
or
130
Need help?
Do you have a question about the RTC6 PCIe Board and is the answer not in the manual?