EasyManua.ls Logo

Scanlab RTC 5 PC Interface Board - init_rtc5_dll

Scanlab RTC 5 PC Interface Board
622 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...
RTC
®
5 PC Interface Board
Rev. 1.9 e
10 Commands And Functions
306
innovators for industry
Ctrl Command init_rtc5_dll
Function initializes control of the installed RTC
®
5 boards for an application (user program)
Call
InitErrorNo = init_rtc5_dll()
Result Error code as an unsigned 32-bit value
If multiple errors occurred simultaneously, then multiple bits will be set.
The meanings of bit numbers, error types and error constants is identical to those for the
command get_error.
Comments The command init_rtc5_dll must be called before starting each application; otherwise
no RTC
®
5s will be accessible by the application. init_rtc5_dll detects all available RTC
®
5
boards and establishes corresponding board management. If no RTC
®
5 boards are
found, the error code
RTC5_NO_CARD
is returned.
If an error occurs when reading the PCI configuration register (get_last_error return
code
RTC5_CONFIG_ERROR
), then an
RTC5_ACCESS_DENIED
error will also be generated.
The board then remains inaccessible until the error gets cleared by a PC restart.
•The init_rtc5_dll command automatically assigns the application access rights to the
found boards (as via an acquire_rtc command) if access rights aren’t already assigned
to another application (any number of boards and applications may be used, but each
particular board cannot be used simultaneously by multiple applications). The first
initialization acquires all found boards for itself. Subsequent initializations started by
other applications will result in return of an
RTC5_ACCESS_DENIED
error code by the
init_rtc5_dll command. The boards will then only be accessible by these applications
through DLL-internal functions that require no access rights – e.g. get_error
(page 263), get_last_error (page 270) or select_rtc (page 403) (most multi-board
commands, too, are only callable for boards with existing access rights). If an applica-
tion has access rights for a board, then the application must first explicitly release its
access rights with release_rtc (page 392) or free_rtc5_dll (page 259) before the board
can be used by another application via init_rtc5_dll or acquire_rtc (page 227).
An
RTC5_ACCESS_DENIED
error code will be returned if access was denied by at least one
of the found boards. Which board(s) denied access can be determined via
get_error(CardNo)
(
CardNo
from 1 to the number of found boards) or directly after
init_rtc5_dll (before the next command) via
get_last_error(CardNo)
.
If a board is acquired via init_rtc5_dll (as via acquire_rtc, then a version compatibility
check will be performed. If a version error is detected, then access to the board will be
denied (return code
RTC5_ACCESS_DENIED
|
RTC5_VERSION_MISMATCH
).
Only one application can perform initialization at any one time. Subsequent initializa-
tions started by other applications will wait until the current initialization is complete.
If an application calls the init_rtc5_dll command multiple times, then the board
management created by the prior call will be deleted for this application and the orig-
inally-assigned access rights canceled. Board management will then be newly created
and access rights newly assigned.
Each initialization of an application via init_rtc5_dll causes the DLL-internal numbers
for all found RTC
®
5 boards to be newly reassigned (the relationship between the DLL-
internal numbers and the installed boards can be determined via get_serial_number
(page 278)). When the accessible board with the smallest DLL-internal number is initial-
ized, it then simultaneously becomes the active board and the target of non-multi-
board commands. select_rtc (page 403) can be called at anytime to change the active
board. If no access rights exist for any board, then the board with the highest DLL-
internal number (see rtc5_count_cards, page 396) will be the active board, in which
case only DLL-internal commands that require no access rights can be used.

Table of Contents

Related product manuals