EasyManua.ls Logo

Scanlab RTC6 PCIe Board - Error Handling

Scanlab RTC6 PCIe Board
1004 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
RTC6 boards
Doc. Rev. 1.0.21 en-US
6 Developing RTC6-User Programs
130
innovators for industry
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 or write_da_x)
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).
The bits assigned to these errors are set or
accumulated in the RTC6 DLL with each command in
the board-specific error variables:
LastError
Error code
Is automatically reset at the beginning of every
command
Therefore, is a listing of occurred errors from
the most recently executed command
C
an be queried by get_last_error
(1)
AccError
Cumulative error code
Is reset when initializing the RTC6 DLL
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
(1)
Error handling takes place separately:
for each board
each user program
A reset_error does not delete the error code of
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 RTC6 DLL and when sending to
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
that establish communication with the
RTC6 PCIe Board. Commands that do not establish
communication with the
RTC6 PCIe Board (for
example, rtc6_count_cards, set_rtc4_mode or
get_serial_number) neither generate nor alter
LastError
or
AccError
(see also comments in the
corresponding command descriptions).

Table of Contents