EasyManua.ls Logo

Scanlab RTC 5 PC Interface Board - select_rtc

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
403
innovators for industry
Ctrl Command select_rtc
Function defines, in a multi-board system, the active RTC
®
5 board for an application (user
program). See chapter 6.6, page 83.
Call
NoOfSelectedCard = select_rtc( CardNo )
Parameter
CardNo
(DLL-internal) number of the RTC
®
5 board as an unsigned 32-bit value
Result The returned (unsigned 32-bit) value is
CardNo
if access rights exist for the specified board or if the specified board is not allo-
cated to another application (in this latter case, access rights are acquired through
select_rtc – as via acquire_rtc, see below)
the number of the active board if
CardNo
exceeds the number of RTC
®
5 boards found
during initialization or if
CardNo
= 0
0 otherwise (particularly when the specified board is reserved by another application or
if a version compatibility error is detected and activation of the board therefore can’t
succeed) (get_last_error return code
RTC5_ACCESS_DENIED
and possibly
RTC5_VERSION_MISMATCH
)
Comments Activation of a board for an application already occurs when the DLL for this application
is initialized (see init_rtc5_dll, page 306). The select_rtc command offers the possi-
bility of changing the active board at any time. All the application’s commands subse-
quent to select_rtc (except for multi-board commands) will be forwarded to the
corresponding active board.
If the specified board is reserved for another application, select_rtc will have no effect
(return value 0, get_last_error return code
RTC5_ACCESS_DENIED
).
If no access rights are assigned for the specified board, and it is not in use by another
application, then the board will not only be activated but also – if it passed the version
compatibility check (see below) – automatically reserved for this application (as via
acquire_rtc) and therefore unavailable to other applications (return value:
CardNo
). If a
board is acquired (as via acquire_rtc), a version compatibility check will be performed.
If a version error is detected, then access to the board will be denied and select_rtc will
have no effect (return code 0, get_last_error return code
RTC5_ACCESS_DENIED
|
RTC5_VERSION_MISMATCH
).
If the specified board is already the active board for this application, select_rtc will have
no effect (return value:
CardNo
).
•The select_rtc command also has no effect if
CardNo
exceeds the number of RTC
®
5
boards found during initialization (see rtc5_count_cards, page 396) or if
CardNo
= 0
(real boards begin at 1). The return value is then the number of the active board (see
above). Therefore, the command
select_rtc( 0 )
can be used to determine the
number of the active board at any time.
The select_rtc command is also available without explicit access rights to a particular
RTC
®
5 board.
select_rtc is not available as a multi-board command.
RTC
®
4
RTC
®
5With the RTC
®
4, this command only activates the specified board (unconditionally).
With the RTC
®
5, this command additionally returns a value and either assigns access rights
in some circumstances (as via acquire_rtc) for the specified board when none had existed
or it has no effect.

Table of Contents

Related product manuals